Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Html5 validation error with title tag

Hello I am validating my source against html 5.

But I am getting this error and have now 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 the error:

XHTML element title not allowed as child of XHTML element meta in this context. (Suppressing further errors from this subtree.)

Any idea's?

like image 930
sanders Avatar asked Dec 21 '22 14:12

sanders


1 Answers

In XHTML which is strict about XML rules, every tag that is opened should be nested and closed properly, tags such as <area />,<base />,<basefont />,<br />,<hr />,<input />,<img />,<link />,<meta /> are only usefull with attributes so you have to close them by "/>" instead of ">" In XML thats how you open and close a tag in 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>
like image 95
Neo Avatar answered Jan 09 '23 08:01

Neo