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 version of HTML to conform to.
The doctype defines the version of HTML you are using and provides important information to the browser so that it can render your pages more quickly and consistently.
The document type declaration also allows validation software to check the syntax of the page:
HTML 5
HTML 4.01 Strict, Transitional, Frameset
"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
"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
"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 if the title is not a visible part of the web page, it is still important to improve the quality of the website because it is visible in the following locations:
Search engine list
The title bar of the window
The
title in the user’s bookmarks should be Keep it as short and descriptive as possible.
When a user searches for a website on the internet, most search engines will display the title of the website in the search results. Make sure the title matches the content of the page. In this way, users are more likely to visit your website by clicking on these links.
When a user visits your website, the title is visible in the title bar of the window. Make sure that the title still describes the content of the site even if the window is minimized.
After a user visits your website, the title of the page will be stored in the history folder (the user may even save the page to his favorites). For subsequent successful visits, also make sure the title clearly describes your site.
Excellent title:
<title>HTML Tutorial</title>
<title>XML Introduction</title>
Example of gap title::
<title>Introduction</title>
<title>Chapter 1</title>
W3Cschool has a set of well-organized and easy-to-understand tutorials on HTML, CSS, JavaScript, DHTML, XML, XHTML, WAP, ASP, and SQL, and contains many examples and source codes.
<h1> element
<h1> element is used to describe the top-level title of the web page.
Because some browsers display the <h1> element as a large font by default, some web developers use the <h2> element instead of the <h1> element to display the top title. Doing so will have no impact on readers, but will confuse search engines and other software that are trying to "understand the structure" of the page.
Be sure to use <h1> for top-level headings, and <h2> and <h3> for lower levels.
You can try to construct your web page based on this template:
This is the main headingSome initial text This is a level 2 headingThis is some text. This is some text. This is some text. This is a level 3 headingThis is some text. This is some text. This is some text. This is a level 3 headingThis is some text. This is some text. This is some text. |
If you don't like the default heading font size, you can change it using a style or stylesheet.