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
<title>Document title</title>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
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 -->
 <li>Menu one</li>
 <li>Menu two</li>
<!-- 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

Which tag defines the clickable areas inside the image map?
<map> <img> <area>
<img src="image.jpg" usemap="#map1">
<map name="map1">
  <area shape="rect" coords="9, 120, 56, 149" href="#">
  <area shape="rect" coords="100, 200, 156, 249" href="#">
Which CSS property defines what is done if the content in a box is too big for its defined space?
display overflow position
#id {
  overflow: auto;
Click on the event which is triggered when the mouse is positioned over an object.
onclick onmouseover onmouseout
document.getElementById("id").onmouseover = function(){
  document.write("Have Good Life");
Indicate the PHP variable that contains data added in URL address after the "?" character.
if(isset($_GET["id"])) {
  echo $_GET["id"];
HTML Headings and Comments

Last accessed pages

  1. jQuery get XML data (3779)
  2. SHA256 Encrypt hash in JavaScript (3583)
  3. Batman Cobblebot Caper (371)
  4. Adding data from HTML Table Rows in Form fields (3729)
  5. Penalty Fever (700)

Popular pages this month

  1. Qwop (7150)
  2. Drag Racer V3 (4904)
  3. Bubbles3 (1994)
  4. List with All the Games (1670)
  5. Butterfly Kyodai (1590)