What a standard HTML-document starts with? Surely wiith its type description! And here we use a declaration named DOCTYPE!.
At first you shall make up your mind concerning what ktype of document you are going to create.
What do we actually need DOCTYPE for? DOCTYPE is some kind of a document definition for the browser.
To note that in the Internet space you may meet many documents that contain an incomplete DOCTYPE declaration or don't contain it at all. If DOCTYPE is absent, the browser chooses the document type by default that may differ from what you expect to see.
That's why to avoid possible mistakes always indicate a complete DOCTYPE! declaration.
XHTML 1.0 specification supposes three types of the documents.
They are Strict, Transitional and Frameset.
Each of this types has its own DTD and has its own features and predestination.
Strict is used to obtain more comprehensive document structure without burdening it with useless tags and attributes. Such a structure supposes that all the elements of the page are to be coded in CSS. A HTML document is to describe here only its logical structure.
Transitional is the most frequent XHTML type nowadays. This document type was created to keep multiple HTML features. At some point this is some kind of transition of old HTML-document into a new one. But most likely this type of document will be crowded out with time.
Frameset is the type od XHTML document dedicated to describe documents that contain some set of frames i.e. frameset and frame- elements. Every frame is independent since there is a possibility to upload a separate page into every frame. DOCTYPE declaration for all these XHTML document types are indicated below. Your second step is to indicate the coding of your document.
DOCTYPE declaration for all these XHTML document types are indicated below:
XHTML 1.0 Strict<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"; "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">XHTML 1.0 Transitional
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" XHTML 1.0 Frameset
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd" Your second step is to indicate the coding of your document. This is to be done with the help of meta tag in the title of the document within the head element.
Document coding description:<meta http-equiv="Content-Type" content="text/html"; charset="utf-8">The coding is set as the value of charset parameter in http-equiv attribute.
The choice of the coding to use depends on the languages used in the document and on its aim. If you are unsure what coding to use or you don't have any specific requirements, you shall use UTF-8 coding.
UTF-8 Coding is convenient due to its compatibility with Latin-1 symbols. Such a document may be easily edited in any editor that does not support Unicode and UTF-8 coding in particular.
In addition, you will not feel uncomfortable if it occurs that your document shall contain a couple of words in Japanese that you could not have forseen in advance.
The list of meta-tags is followed by a rather important element named title.
After title you shall indicate the connection of your exterior CSS-file with the help of style or link elements.
Let's consider three CSS connection elements:1. All the styles are described in HTML:
<style type="text/css" media="all">div{...}</style>2. The styles are uploaded from the exterior file:
<link href="all.css" rel="stylesheet" type="text/css" />or
<style media="all" type="text/css">@import "all.css";</style>Media parameter indicates what type of facilities the current block of styles corresponds to. Nowadays we can indicate the following media types:
screen - the monitor screen.
tty - dedicated for the facilities that use a set of fixed width, i.e. teletypes, terminals or portable equipment with information outlet capacities
tv - dedicated for the TV-set like facilities (which are characterized by low resolution, color display, limited scrolling on the screen).
projection - dedicated for projection apparatuses.
handheld - dedicated for portable facilities (small monochrome screens with limited band and bitmapped graphics).
print - dedicated for paginal opaque files and documents viewed on the screen in the preview print mode.
braille - facilities based on the braille system for the blind.
aural - dedicated for для phonemic synthesizers.
all - for all the facilities.
Close