Web Quality - Important HTML Elements
- Previous Page Web Standards
- Next Page Stylesheet
For improving web quality, <DOCTYPE>, <title>, and <h1> are all important tags.
<DOCTYPE> element
Doctype means a "document type declaration" (DTD).
All HTML and XHTML pages should use the <Doctype> element to define which HTML version they comply with.
The doctype defines the HTML version you are using and provides important information to the browser so that it can present your page more quickly and consistently.
The document type declaration also allows validation software to check the syntax of the page:
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 DTD
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
See also:HTML <!DOCTYPE> tag
The <title> element
The <title> element is one of the most important HTML elements. Its main function is to describe the content of the webpage.
Even if the title is not a visible part of the webpage, it is still important for improving the quality of the website, as it is visible in the following locations:
- Search engine list
- 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 title of the website in the search results. Ensure that the title matches the content of the webpage. This way, users are more likely to click on these links to access your website.
When a user visits your website, the title in the window title bar is visible. Make sure that even when the window is minimized, the title still describes the content of the website.
After a user visits your website, the title of the web page is stored in the history folder (users may even add the web page to their favorites). To ensure successful future visits, please also make sure that the title clearly describes your website.
Good titles:
<title>HTML Tutorial</title> <title>XML Introduction</title>
Poor titles:
<title>Introduction</title> <title>Chapter 1</title> The <title>CodeW3C.com has a set of well-organized, easy-to-understand HTML, CSS, JavaScript, DHTML, XML, XHTML, WAP, ASP, SQL tutorials, including a large number of examples and source code.</title>
See also:HTML <title> Tag
The <h1> element
The <h1> element is used to describe the top-level title on the web page.
Since some browsers will display the <h1> element by default in a large font, some web developers use the <h2> element instead of the <h1> element to display the top-level title. This will not affect the reader, but it may confuse search engines and other software that try to 'understand the structure of the web page'.
Please make sure to use <h1> for the top-level title, and <h2> and <h3> for lower levels.
You can try to construct your web page based on this template:

If you do not like the default title font size, you can use styles or style sheets to change it.
See also:HTML <h1> - <h6> Tags
- Previous Page Web Standards
- Next Page Stylesheet