0% found this document useful (0 votes)
6 views2 pages

HTML, CSS, and JavaScript Basics

The document summarizes key HTML elements and tags such as <html>, <head>, <body>, <img>, <ul>, <ol>, <li>, and <a> that define the structure and content of a web page. It also describes common CSS properties like color, font-family, font-size, border, padding, and margin that control how HTML elements are displayed. Additionally, it mentions JavaScript functions, methods, and control structures like getElementById(), if/else, for loops, and switch statements that add interactive functionality to web pages.

Uploaded by

hakdog
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

HTML, CSS, and JavaScript Basics

The document summarizes key HTML elements and tags such as <html>, <head>, <body>, <img>, <ul>, <ol>, <li>, and <a> that define the structure and content of a web page. It also describes common CSS properties like color, font-family, font-size, border, padding, and margin that control how HTML elements are displayed. Additionally, it mentions JavaScript functions, methods, and control structures like getElementById(), if/else, for loops, and switch statements that add interactive functionality to web pages.

Uploaded by

hakdog
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Borromeo, Ma. Louvi Kaye M.

ICT-Mabini

HTML-Hyper Text Markup Language


-describes the structure of a Web page
-elements are represented by tags

 The <!DOCTYPE html> declaration defines this document to be HTML5


 The <html> element is the root element of an HTML page
 The <head> element contains meta information about the document
 The <title> element specifies a title for the document
 The <body> element contains the visible page content
 The <h1> element defines a large heading
 The <p> element defines a paragraph
 Use the style attribute for styling HTML elements
 Use background-color for background color
 Use color for text colors
 Use font-family for text fonts
 Use font-size for text sizes
 Use text-align for text alignment

Images are defined with the <img> tag


-The source file (src), alternative text (alt), width, and height are provided as attributes
-lists are defined with the <ul> (unordered/bullet list) or the <ol> (ordered/numbered
list) tag, followed by <li> tags (list items)
- links are defined with the <a> tag. The link address is specified in the href attribute
<html>- Defines the root of an HTML document
<hr>- Defines a thematic change in the content
<pre>- element defines preformatted text
The HTML <strong> element defines strong text, with added semantic "strong"
importance

CSS-Cascading Style Sheets


-describes how HTML elements are to be displayed on screen, paper, or in other media
-It can control the layout of multiple web pages all at once

 Use the HTML style attribute for inline styling


 Use the HTML <style> element to define internal CSS
 Use the HTML <link> element to refer to an external CSS file
 Use the HTML <head> element to store <style> and <link> elements
 Use the CSS color property for text colors
 Use the CSS font-family property for text fonts
 Use the CSS font-size property for text sizes
 Use the CSS border property for borders
 Use the CSS padding property for space inside the border
 Use the CSS margin property for space outside the border

CSS background properties:

 background-color
 background-image
 background-repeat
JavaScript is the programming language of HTML and the Web.
- One of many JavaScript HTML methods is getElementById()
-JavaScript code must be inserted between <script> and </script> tags
-A JavaScript function is a block of JavaScript code, that can be executed when "called"
for.

break Terminates a switch or a loop


continue Jumps out of a loop and starts at the top
debugger Stops the execution of JavaScript, and calls (if available) the debugging function
do ... while Executes a block of statements, and repeats the block, while a condition is true
for Marks a block of statements to be executed, as long as a condition is true
function Declares a function
if ... else Marks a block of statements to be executed, depending on a condition
return Exits a function
switch Marks a block of statements to be executed, depending on different cases
try ... catch Implements error handling to a block of statements
var Declares a variable

You might also like