Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Web Quality - Important HTML elements


May 27, 2021 Site quality


Table of contents


Web Quality - Important HTML elements


For the promotion of web quality, the labels are important for the promotion of web quality.


<! DOCTYPE

All HTML and XHTML pages should use the element of the .lt; Doctype?gt; to define which HTML version to follow.

doctype defines the version of HTML you are using and provides the browser with important information to render your page more quickly and consistently.

Document type declarations also enable validation software to examine 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">


The element

The element is one of the most important HTML elements. Its main function is to describe the content of a Web page.

Even if the title is not a visible part of the page, it is still important to improve the quality of the site because it is visible in the following places:

  • A list of search engines
  • The title bar of the window
  • The user's bookmark

The title should be as short and descriptive as possible.

When a user searches for a site on the Internet, most search engines display the site's title in search results. M ake sure that the title matches the content of the page. This makes it more likely that users will be able to access your website by clicking on these links.

When a user visits your site, the title is visible in the title bar of the window. Make sure that even if the window is minimized, the title can also be used to describe the content of the site.

After a user visits your site, the title of the page is stored in a history folder (the user even likes the page in his favorites). For subsequent successful visits, also make sure that the title clearly describes your site.

Excellent title:

<title>HTML Tutorial</title>

<title>XML Introduction</title>

Examples of gaps in the title:

<title>Introduction</title>

<title>Chapter 1</title>

W3Cschool has a well-organized, easy-to-understand set of HTML, CSS, JavaScript, DHTML, XML, XHTML, WAP, ASP, SQL tutorials, and includes many instances and source code.


The element

The element is used to describe the title at the top of the page.

Because some browsers will default to display the element as a large font, some web developers will use the element instead of the element to display the top-level title. Doing so will not affect the reader, but will confuse search engines and other software that are trying to "understand the structure of the web".

Be sure to use slt;h1> for the top-level title, and slt;h2> and .lt;h3?gt; for the lower level.

Try constructing your web page based on this template:

This is the main heading

Some initial text

This is a level 2 heading

This is some text. T his is some text. This is some text.

This is a level 3 heading

This is some text. T his 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 title font size, you can use styles or style sheets to change them.