Flux rss
Bookmark Bookmark & Share
Struttura di un documento HTML Estrutura de um documento HTML Struktur eines HTML Dokuments Structure d'un document HTML Disposición de documentos HTML

HTML document

An HTML page is a simple file containing text formatted with HTML tags. Traditionally, the file is given an .htm or .html extension, but a web page may have other extensions as well.

A web page can be built from even the most basic text editors (such as a notepad application, for example), but there are also more advanced editors out there.

WYSIWYG ("What You See Is What You Get") editors are graphical-interface editors for working on a web page so as to better visualise what visitors to the site will see. With this kind of editor, tags can be added with just a mouseclick, and their attributes can be modified by entering their properties in a form. However, in order to get the best possible use out of this kind of editor, it helps a great deal to already have a good understanding of HTML.

There are also HTML editors which display tags, attributes, and their values in different colours in order to make them easier to read. They sometimes include tools for checking whether the HTML code is valid.

Traditionally, the file is given an .htm or .html extension, but a web page may have other extensions as well, including:

  • .asp for a page generated dynamically by ASP (Active Server Pages);
  • .cgi for a page generated dynamically with CGI (Common Gateway Interface);
  • .php, .php3 or .php4 for a page generated dynamically in PHP;
  • .pl for a page generated dynamically in Perl (Practical Extraction and Report Language);
  • etc.

HTML Document Layout

An HTML document begins with the tag <HTML> and ends with the tag </HTML>. It also contains a header describing the title of the page, and a body where the page's content is located.

The header is delimited by the tags <HEAD> and </HEAD>. The body is delimited by the tags <BODY> and </BODY>.

For example, this is a very minimalist HTML page:

<HTML>
<HEAD>
<TITLE>Page title</TITLE>
</HEAD>

<BODY>
Page content
</BODY>
<HTML>

Document Type Declaration

The HTML page should include the document type declaration, a reference to the HTML standard being used, in order to specify which coding standard the page employs. The declaration is made by adding a line like this one:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<HTML>
	<HEAD>...</HEAD>
	<BODY>Page content</BODY>
</HTML>

This indicates which DTD (Document Type Definition) is being used. The DTD is a reference to the characteristics of the language being used. The table below summarises the declarations for the main versions of HTML:

Version Declaration
HTML 2.0 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 4.0//EN">
HTML 3.2 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
HTML 4.01
  • Strict: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd">
  • Transitional: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  • Frameset: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
XHTML 1.0
  • Strict: <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  • Transitional: <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-loose.dtd">
  • Frameset: <!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.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


Last update on Thursday October 16, 2008 02:43:14 PM.This document entitled « HTML document layout » from Kioskea (en.kioskea.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the licence, as this note appears clearly.
Display keyboard keys in an HTML document Display keyboard keys in an HTML document USB host controller When connecting a USB 2.0 device, Windows displays the following message: Install a high speed USB host controller or This device will function at reduced speed if you... en.kioskea.net/faq/sujet-2115-display-keyboard-keys-in-an-html-document
How to make a space in your html document How to make a space in your html document In HTML there is no way that the web browser can recognise the spaces inserted consecutively in between the letters. You can either try it in EI, Mozilla and Opera. The only way to do so is... en.kioskea.net/faq/sujet-1540-how-to-make-a-space-in-your-html-document
Managing images in HTML How do you display images on a web page? Having a few images on a website can make it more attractive and user-friendly. However, it is important not to go overboard, since images can take a long time to load, and in some cases can make a document... en.kioskea.net/contents/html/htmlimages.php3
Validate a HTML documentValidate a HTML document HTML Validator Other Validators HTML is a standard published by the W3C with relatively strict syntax rules. Respect for the standard to maximize the chances for optimal viewing on almost all browsers and... en.kioskea.net/faq/sujet-1859-validate-a-html-document
Modifying the height of element HTMLModifying the height of element HTML The style property “height” can be used to modify the height of an html element in javascript. For this you can refer to the following: Below is an indication of how to do this... en.kioskea.net/faq/sujet-910-modifying-the-height-of-element-html
How to read a .DOCX documentHow to read a .DOCX document Download Microsoft Compatibility Pack Download XML Translator Making use of online Tools For MAC users The new Office 2007 includes a new format for the word documents that bears the .docx extension.... en.kioskea.net/faq/sujet-317-how-to-read-a-docx-document
Outlook issue with HTML form (Solved)Hello, I have a small website with a very simple HTML form that allows user to send his data; then the webmaster receives an email with the data included in the form. My problem is that, when ever Outlook is set up on a machine, the email button open... en.kioskea.net/forum/affich-247-outlook-issue-with-html-form
How to convert .doc ,.html,.xls file into .pdHello, i wanted a sample class for the conversion of .doc ,.html, .xls file into .pdf file the the PHP . needed urgently Thanks in advance en.kioskea.net/forum/affich-30014-how-to-convert-doc-html-xls-file-into-pd
Header and footer in HTML (Solved)Hello, Is it possible to include a header and footer file using HTML? I have my file (saved as a .html) and need to be able to include the HTML for the header and footer. Anyone know how I can do this? Thanks a lot. en.kioskea.net/forum/affich-196-header-and-footer-in-html
Download Free Word/Doc Txt to Image Jpg/Jpeg Bmp Tiff PngIt is usually the images that we insert into Word, Excel or PowerPoint documents. This time, it is the opposite, because we are going to convert these documents to image formats. All to Jpg / JPEG Image Bmp Tiff Png Converter is a powerful tool which... en.kioskea.net/telecharger/telecharger-1630-free-word-doc-txt-to-image-jpg-jpeg-bmp-tiff-png
Download Microsoft Keyboard Layout CreatorKeyboard Layout Creator Microsoft is what you need to define your keyboard layout when Microsoft does not support your language or enter your favourite symbols in a text by a single click. Keyboard Layout Creator Microsoft widens the basic features... en.kioskea.net/telecharger/telecharger-1959-microsoft-keyboard-layout-creator
Download HTML Calendar Maker ProHTML Calendar Maker Pro is a creation software of a monthly web page calendar. Easy to use, it does not require any knowledge on programming. The calendar is customizable: modification of colours and fonts, insertion of image and edition of the code... en.kioskea.net/telecharger/telecharger-2347-html-calendar-maker-pro
Adobe Systems Inc. Acrobat 6.0 Standard Upgrade MacInc ., Adobe's document standard is an essential part of the computing landscape. PDF stands for "Portable Document Format", and its primary achievement is to preserve document layout and appearance so that it looks right and prints correctly wherever... en.kioskea.net/guide/607834927-adobe-systems-inc-acrobat-6-0-standard-upgrade-mac
YouTube showing Besson documentary 'Home'YouTube webpage. YouTube on Friday announced it is showing "Home," an environmental documentary about Earth produced by French filmmaker Luc Besson, at the same time as it is being released in theaters. YouTube on Friday announced it is showing... en.kioskea.net/actualites/youtube-showing-besson-documentary-home-12975-actualite.php3
HTML MarkupHTML, A Markup Language HTML is not a programming language. Rather, it is used for describing the layout and format of content, written in the form of simple text. An HTML page is a basic text file containing tags for specifying text format,... en.kioskea.net/contents/html/htmlbalise.php3
Introduction to HTMLIntroduction to HTML HTML (HyperText Mark-Up Language) is what is known as a "mark-up language" whose role is to prepare written documents using formatting tags. The tags indicate how the document is presented and how it links to other documents.... en.kioskea.net/contents/html/htmlintro.php3
Mini HowTo DocumentsMini HOW-TO Documents The mini HowTo documents are a set of documentations written by different people on very specific topics concerning Linux. Below you will find a (non exhaustive) list of HowTo documents written or translated into... en.kioskea.net/contents/linux/howto.php3