Html5 validation error with title tag

Hello, I am checking my source for html 5.

But I get this error and now have an idea how to solve it:

<meta charset="utf-8"><title>Rode kruis Vrijwilligers applicatie</title><link href="/css/blitzer/jquery-ui-1.8.11.custom.css" media="screen" rel="stylesheet" type="text/css" > 

This is mistake:

The title of the XHTML element is not permitted as a child of the XHTML element in this context. (Suppression of further errors from this subtree.)

Any idea?

+4
source share
3 answers

In XHTML, which is strictly associated with XML rules, each open tag must be nested and closed properly, tags such as <area />,<base />,<basefont />,<br />,<hr />,<input />,<img />,<link />,<meta /> , are only useful with attributes, so you need to close them with "/"> "instead of"> "In XML, the way you open and close a tag in to the same tag, this is what your html should look like:

 <!doctype html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>Rode kruis Vrijwilligers applicatie</title> <link href="/css/blitzer/jquery-ui-1.8.11.custom.css" media="screen" rel="stylesheet" type="text/css" > </head> <body> Test. </body> </html> 
+5
source

You need to close the meta tag - this is an empty tag:

 <meta charset="utf-8" /> 

XHTML is an XML dialect, so empty elements must be closed (therefore <br> XHTML is not valid, but <br /> is).

+3
source

As mentioned in the comments on the first answer (which should also fix the problem), another approach is to use plain HTML5 without the XML requirement. For example, the following code will be checked:

 <!doctype html><html><head> <meta charset="utf-8"><title>Rode kruis Vrijwilligers applicatie</title><link href="/css/blitzer/jquery-ui-1.8.11.custom.css" media="screen" rel="stylesheet" type="text/css" > </head><body>Test.</body></html> 

If the middle line is the source code.

Checked with direct input here: http://validator.w3.org/

+2
source

All Articles