Búsqueda personalizada

Elemento de lista Tutorial on web display in different browsers.

HTML Document.
Tutorial DOCTYPE, DTD and display mode browsers.
Autor: Wmasterfacil www.wmasterfacil.com
Many definitions are taken as is or simplified the recommendation of the W3C "HTML 4.01 Specification" section that are in HTML / CSS, on this website.
Basically, browsers have two viewing modes, the 'Quirks mode' and standard mode.
The reason for this is that although it is logical that there is only the standard mode, which is the one according to the specifications of HTML and CSS in browsers some years ago, these standards were not properly implemented, and old web developers used procedures 'undesirable' to overcome the failures of implementation of these browsers, and web pages are displayed correctly.
To keep these old websites still displaying correctly now, the makers of browsers maintain the 'old mode' (the Quirks mode) and the standard mode, which is to be used by developers today.
The first thing we must take into account when scheduling our website is to decide which mode we want to apply to display our website. Once the decision, we must translate the code from our site. This is done by the declaration DOCTYPE that specifies DTD the mode used to view our website.
A DTD (Document Type Definition) specifies the rules that govern the programming language we use to build our website. In other words, writing a DOCTYPE declaration to specify a particular DTD, we will indicate the programming language and version of it where our website is built, and this way the browser will display according to the statement, our Web.
 

Elemento de lista  DOCTYPE:

To set the display mode of the Web, we will use the DOCTYPE declaration as first line of our HTML document. The different DOCTYPE declarations we can put are:
Elemento de lista  < !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" >
This declares the document to be HTML 4.01 transitional. HTML 4 Transitional includes all elements and attributes of HTML 4 Strict most disapproved elements and attributes (most of which are related to the visual presentation). HTML 4 transitional recognizes the relatively poor browser support for style sheets, allowing the presentation features of HTML to be used as a transition to HTML 4 strict. It is called Transitional because it is designed as a transition to HTML 4 strict.
Elemento de lista  < !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd" >
This declares the document to be HTML 4.01 Frameset. HTML 4 Frameset is a variant of HTML 4 Transitional for documents that use frames, that is identical to HTML transitional but accepting the possibility of working with frames.
Elemento de lista  < !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
This is the HTML 4.01 Strict DTD, which excludes the presentation attributes and elements that W3C expects to end the use of age as support stylesheets. Authors should use the Strict DTD when possible, but may use the Transitional DTD when necessary support elements and attributes of presentation. If this DTD declare the browser will act compliance standards (Standards compílanse). This will imply that only can use HTML tags 4.01. This is the way recommended by the W3C, as it is compatible with CSS and can be interpreted correctly by all browsers, making it much easier passage to our XHTML documents that most likely would replace the HTML in the coming years.
 
If we want to know if our page Web is in agreement with the defined DTD we can do it from http://validator.w3.org/
NOTE: If we did not specify any DTD in our document HTML we will be using Quirks mode visualization.
NOTE 2: In the tutorial on modeling boxes, the differences between browsers to understand the dimensions of the boxes does not exist if we use the standard mode, ie the strict DTD. It is in Quirks mode or in a transitional mode, when the differences appear between Internet Explorer and other browsers.
Comentarios a este tutorial

^ Top

   Policies

¡CSS Válido! Valid HTML 4.01 Transitional