w3schools
Search W3Schools :  
  
HOME HTML CSS XML JAVASCRIPT ASP PHP SQL MORE...   References Examples Forum About

Web Quality - Important HTML Elements

« Previous Next Chapter »

<!DOCTYPE>, <title>, and <h1> are important tags to web page quality.


The <!DOCTYPE> Element

Doctype means a "document type declaration" (DTD).

All HTML and XHTML pages should contain a <!DOCTYPE> element to define which HTML version it conforms to.

The doctype defines which version of HTML or XHTML you are using, and gives important information to your browser so it can render your page faster and more consistently.

The doctype declaration also allows validating software to check the syntax of your 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

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

Read more about Doctype and Page Validation at W3Schools.


The <title> Element

The <title> 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 your web page, it is important to the quality of your web site because it will be visible in

  • search engine lists
  • the browser's title bar
  • user's bookmark

The title should be as short and descriptive as possible.

When a user search for a web site, most search engines will display the title of your web site in the search result. Make sure the title match the content the user is looking for. Then it is more likely the user will click on the link to visit your web site.

After a user has visited your website, the title of your web page will be stored in the user's history folder. Make sure the title clearly describes your pages for future visits.

Good title examples:

<title>HTML Tutorial</title>

<title>XML Introduction</title>

Bad title examples:

<title>Introduction</title>

<title>Chapter 1</title>

<title>W3Schools has a collection of award winning, well organized, and easy to understand HTML, CSS, JavaScript, DHTML, XML, XHTML, WAP, ASP, SQL tutorials with lots of working examples and source code. </title>


The <h1> Element

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

Because some web browsers display the <h1> element in a very large font by default, some web developers will use the <h2> element instead of the <h1> element for main headings. This will not confuse the reader,  but it will confuse most search engines and other software that will try to "understand" the structure of the web page.

Use <h1> for main headings, and <h2> and <h3> for lower level headings.

Try to structure your headings after 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 size for headers, use CSS to change it.


« Previous Next Chapter »


Altova® MissionKit® - Integrated Suite of XML tools

Altova MissionKit

The Altova MissionKit, recent winner of the Jolt Product Excellence and Productivity Award for Best Development Environment, is an integrated suite of tools ideal for:

  • XML development
  • Web & Web services development
  • Data mapping & integration
  • Rendering & publishing XML & database data
  • XBRL validation, taxonomy editing, transformation & rendering

The MissionKit for XML Developers includes XMLSpy®, MapForce®, and StyleVision® plus 3 additional tools for less than the price of 2.

Try all 6 products free for 30 days!

Download a fully-functional free trial

  Altova Missionkit


WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Top 10 Web Hosting
UK Reseller Hosting
Web Hosting
FREE Web Hosting
Top Web Hosting
Windows Hosting
WEB BUILDING
Download XML editor
FREE Flash Website
FREE Web Templates
Website Monetization
FLIGHT TICKETS
Find the cheapest flight
to any destination now!
EDUCATION
US Web Design Schools
HTML Certification
JavaScript Certification
XML Certification
PHP Certification
ASP Certification
STATISTICS
Browser Statistics
Browser OS
Browser Display
W3Schools.com HOME | TOP | PRINT | FORUM | ABOUT
W3Schools is for training only. We do not warrant the correctness of its content. The risk from using it lies entirely with the user.
While using this site, you agree to have read and accepted our terms of use and privacy policy.
Copyright 1999-2009 by Refsnes Data. All Rights Reserved.