HTML5 Guidelines for Web Developers

(coco) #1

14 Chapter 1—Overview of the New Web Standard


Figure 1.5 Attributes no longer used in HTML5

How do we know in detail which elements and attributes should no longer
be used? It would be very time-consuming to have to keep searching through
the HTML5 differences. A better solution is offered by the HTML5 validator at
http://html5.validator.nu: The validator knows exactly what is right and wrong.
Let’s give it a try: We select Text Field as input mode and replace the line <p></p>
in the preset HTML basic frame with the following wrong markup:

<center>
<acronym>WHATWG</acronym>
</center>

The error messages this returns look like this—at least at the time of this writing:


  1. Error: The center element is obsolete. Use CSS instead.

  2. Error: The acronym element is obsolete. Use the abbr element instead.


The link in Use CSS instead leads us directly to the WHATWG Wiki, to the page
Presentational elements and attributes, where we can read details regarding cor-
rect use. The validator also shows syntax errors directly, as you can see in the
next test. Let’s try the following source code:

<!DOCTYPE html><title>
Free download pdf