Forum Moderators: open
I'm reverting the doctype for my projects from xhtml 1.0 strict to html 4.01 strict. In xhtml strict, there's this other stuff within the html tag:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Showing my complete ignorance (other than what I've read on line) I think the "xmlns="http://..." is called a prolog?
Anyway, since I'm going to be using the 4.01 strict doctype from now on, is there any specific "prolog" to be enclosed within the html tag?
Just trying to get it right.
Thanks to all in advance
xmlns in the above example is an XML namespace declaration, which does not exist in HTML 4. You should continue to define the language of the document via the lang attribute however. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
[b]<html lang="en">[/b]
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>HTML 4.01 Strict template</title>
</head>
...I think the "xmlns="http://..." is called a prolog?
The XML Prolog/declaration I think you are refering to is this line:
<?xml version="1.0" encoding="utf-8"?>
which appears above the DOCTYPE in XML / XHTML documents. Although it should strictly be included in XHTML documents it often isn't - I believe it to be optional(?) - it will also cause IE6 to render in quirks mode (as will anything before the DOCTYPE).
There is no 'Prolog' in HTML.