martes, 20 de noviembre de 2012

The HTML document


The HTML document

1. The syntax in XHTML 1.0

<html> Element indicates, on a web page, the beginning of the HTML page content. This would be the complete syntax in XHTML 1.0 strict:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Again, brevity is not the priority here.

2. The syntax in HTML5

In HTML5 what prevails is simplicity, only the essential remains. This would be the syntax in HTML5:

<html lang="en">
Sufficient to specify the language of the page. That's it.

The character encoding

1. The syntax in HTML 4 and XHTML 1.0

It usually indicates which character encoding has been used in a web page. Before indicated twice: in a meta element in the HTTP header, and content, with the charset attribute.

In HTML 4.01 Transitional:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
In XHTML 1.0 strict:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
2. The syntax in HTML5

Again, in HTML5 has been given priority to simplicity:

<meta charset="UTF-8" />
Well have what is necessary for proper management by web browsers.

scripts

The declaration of the scripts also lost importance and syntax is now more concise. It has gone from:

src="miScript.js" <script type="text/javascript"> </ script>
to:

<script src="miScript.js"> </ script>
This simplification is that now assumes that the scripts are written in JavaScript. On the other hand, what other language could be used, if not?
Always starting from the same principle: simplification and unification of language in the statement of CSS styles, it has gone from:

href="miHoja.css" <link rel="stylesheet" type="text/css" />
to:

href="miHoja.css" <link rel="stylesheet" />

No hay comentarios:

Publicar un comentario