HTML Headings

HTML offers six levels of headings, using paired tags, from Heading 1 ( <h1> ... </h1> ) to Heading 6 ( <h6> ... </h6> ).
Each browser displays the headings in boldface, using its default font and descending font sizes, from Heading 1 (the biggest) to Heading 6 (the smallest).
- You can add CSS styles to change the Heading's font size, color, and other properties..

Use <h1>, <h2>, ..., for headings only.
Headings are important, search engines use document headings to index the structure and content of your web pages.


  - Example:
HTML codeDisplays in browser
<html> 
<head>
<title>Document title</title>
</head>
<body>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
</body>
</html>
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6

HTML Comments

Comments are used to insert notes into the document that are not displayed by the browser.
To add a comment, use the <!-- --> tag, placing the comment between the two pairs of dashes.
  - Example:
<!-- This is a comment, Start Menu -->
<ul>
 <li>Menu one</li>
 <li>Menu two</li>
</ul>
<!-- End Menu -->
Comments can be any length and are not restricted to one line.
Although browsers don't display comments when they display the web page, they can be viewed in the source code of the web page.
- To view the source code for the page currently displayed in Internet Explorer, click the Page drop-down menu, and then click View Source.
- To view the source code in Mozilla Firefox, click the View menu, and then click Page Source (or Ctrl+U).

Daily Test with Code Example

HTML
CSS
JavaScript
PHP-MySQL
Which attribute is used in <img> tag for the address of the image?
href src rel
<img src="http://coursesweb.net/imgs/webcourses.gif" width="191" height="63" alt="Courses-Web" />
Which CSS code hides the element on page?
display: none; display: inline; position: relative;
#id {
  display: none;
}
What instruction stops the execution of a while() or for() statement?
continue prompt() break
for(var i = 0; i< 8; i++) {
  if(i > 1) break;
  alert(i);
}
Indicate the function that can create a constant.
define() include() defined()
define("CONSTANT_NAME", "value");
echo CONSTANT_NAME;
HTML Headings and Comments

Last accessed pages

  1. Read Excel file data in PHP - PhpExcelReader (38034)
  2. Ajax-PHP File Manager (3049)
  3. Making DIV Contents Scroll Horizontally, with multiple Div`s inside (5229)
  4. Diamond shape with CSS (1286)
  5. Register and show online users and visitors (14198)

Top accessed pages

  1. Courses Web: PHP-MySQL JavaScript Ajax HTML CSS Flash-AS3 (49620)
  2. Read Excel file data in PHP - PhpExcelReader (38034)
  3. PHP-MySQL free course, online tutorials PHP MySQL code (36948)
  4. Get Attribute (ID, Class, Name, Title, Src) with jQuery (33324)
  5. PHP PDO - exec (INSERT, UPDATE, DELETE) MySQL (30696)