asp.net.ph

Skip Navigation LinksHome > Abakada: Back to Basics > Authoring Your Web Pages > HTML Elements

HTML Elements

Previous: Using Style Sheets   Next: Anchors and Links


Elements That Govern Structure

The elements that are used to govern a document’s structure are:

  • Headings: the <Hx> element
  • Paragraphs: the <P> element
  • Lists: the <UL>, <OL>, and <DL> elements

Tables: the <TABLE> element and Dividers: the <DIV> element are covered in later chapters.

Headings: the Hx element

A heading element briefly describes the topic of the section it introduces.

HTML has six levels of headings, from H1 to H6, in descending order of significance. Browsers usually render headings in larger and bolder fonts than normal body text.

To denote a heading, we write:

<Hx>Heading Text</Hx>

with x specifying the heading level. The start and end tags are both required.

Though there is no mention of using headings in a specific order in the HTML specification, heading information may be used by editors to construct a table of contents for a document automatically, so this is something to consider.

As much as possible, use heading levels in order, with one heading level 1 at the top of the document, and if necessary several level 2 headings, and so on.

If you do not like the way heading levels are formatted, fix it with attributes or styles, instead of skipping heading levels.

Formatting Headings with CSS

The following CSS declarations show how styles for heading elements on this site are formatted. For more information on CSS, please see Style Sheet Basics and Using Style Sheets.

h1 {
   font-size:19pt;
   color:#ffc;
   text-align:right;
   padding-right:8}
h2 {
   font-size:15pt;
   color:#963;
   padding-left:8}
h3 {
   color:#369;
   padding-left:8}
h4 {
   font-size:13pt;
   color:#663;
   padding-left:8}
h5 {
   font-size:11pt;
   color:#666;
   padding-left:8}

For the complete list of attributes applicable to headings, see the Hn element in the HTML Reference.


More ...
Back to top


© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note