Contents

[edit]

Tidy: missing </...>

[edit]

Cause:

A closing tag is missing. Most HTML tags need to be closed, though the exact set of tags varies according to which DTD you're using. For example, in HTML 4.01, the <img> tag does not need to be closed. In XHTML 1.0 and higher, however, it needs to be closed with a trailing slash, eg <img />. Such tags are called "empty elements".

[edit]

Example 1 - Missing Closure (Normal)

Good<head><title>hello</head>
Good<head><title>hello</title></head>
[edit]

Example 2 - Missing Closure (Empty Elements)

Good<img src="whatever.jpg" width="20" height="400" alt="Whatever">
Good<img src="whatever.jpg" width="20" height="400" alt="Whatever" />
[edit]

Solution:

Add the closing tag. Usually the is the same as the opening tag. As noted above, however, XHTML requires some tags to be closed with a trailing slash. According to XHTML 1.0 Transitional DTD, the following tags are "empty":


[edit]

References:

Retrieved from "http://www.htmlpedia.org/wiki/Tidy_6"