Web Quality -Important HTML Elements


For improving web quality, <DOCTYPE>, <title>, and <h1> are all important tags.


<!DOCTYPE> Element

All HTML and XHTML pages should use the <Doctype> element to define which HTML version they conform to.

The doctype defines the HTML version you are using and provides important information to the browser so that it can render your page more quickly and consistently.

The document type declaration also enables validation software to check the syntax of the page:

HTML 5

<!DOCTYPE html>

HTML 4.01 Strict, Transitional, Frameset

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">

XHTML 1.0 Strict, Transitional, Frameset

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

XHTML 1.1

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">


<title> Element

The <title> element is one of the most important HTML elements. Its main function is to describe the content of the web page.

Even though the title is not a visible part of the web page, it is still important for improving the quality of the website, because it is visible in the following places:

  • Search engine listings
  • The window title bar
  • In the user's bookmarks

The title should be as short as possible and descriptive.

When a user searches for a website on the internet, most search engines will display the website's title in the search results. Make sure the title matches the content of the web page. This way, users are more likely to click these links to visit your website.

When users visit your website, the title is visible in the window's title bar. Make sure that even when the window is minimized, the title still serves to describe the content of the website.

After users visit your website, the page title is stored in the history folder (users may even bookmark the page in their favorites). For successful future visits, also make sure the title clearly describes your website.

Good title examples:

Examples

<title>HTML Tutorial</title>

<title>XML Introduction</title>

Poor title examples::

Examples

<title>Introduction</title>

<title>Chapter 1</title>

Example Tutorial provides a complete set of well-organized, easy-to-understand tutorials on HTML, CSS, JavaScript, DHTML, XML, XHTML, WAP, ASP, SQL, including many examples and source code.


<h1> Element

The <h1> element is used to describe the top-level heading of a web page.

Because some browsers display the <h1> element in a very large font by default, some web developers use the <h2> element instead of the <h1> element to display the top-level heading. This does not affect readers, but it can confuse search engines and other software that try to "understand the structure of the web page."

Make sure to use <h1> for the top-level heading, and <h2> and <h3> for lower levels.

You can try to structure your web page according to this template:

This is the main heading

Some initial text

This is a level 2 heading

This is some text. This is some text. This is some text.

This is a level 3 heading

This is some text. This is some text. This is some text.

This is a level 3 heading

This is some text. This is some text. This is some text.

If you don't like the default heading font sizes, you can use styles or style sheets to change them.

Other extensions