Search code examples
htmlxhtmlxhtml-1.0-strict

HTML5 (XHTML style strict format of coding)


Like the title says, what exactly does that mean? Ive tried googling for answers but I still dont understand? so the entire document has to be in a HTML5 format right? and the syntax has to be in strict XHTML?

so is this the correct header to use in this situation? Thank you so much :)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
       <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
       <title>Page Title</title>
       <link rel="stylesheet" href="style.css" type="text/css" media="screen" charset="utf-8"/>
</head>

<body>

</body>

</html>

Solution

  • I think you are looking for polyglot HTML5. It's still HTML, but "could be served" as XML.

    This is how the base structure looks like:

    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
      <head>
        <title>title</title>
      </head>
      <body>
      </body>
    </html>
    

    Here is another article: http://www.xmlplease.com/xhtml/xhtml5polyglot/