Forum Moderators: open

Message Too Old, No Replies

HTML Prolog for 4.01 strict

Is there one?

         

neophyte

2:20 am on Jul 31, 2007 (gmt 0)

10+ Year Member



Hello All -

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

encyclo

2:29 am on Jul 31, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The
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>

penders

1:15 pm on Jul 31, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



...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.

neophyte

1:18 am on Aug 1, 2007 (gmt 0)

10+ Year Member



encyclo and Penders -

Thank you both for your replies and clarification to my post!

Neophyte