PDA

View Full Version : What's wrong with this html header?


effpeetee
05-04-2008, 07:05 PM
What's wrong with this html header? Trying to validate a page and it doesn't like this header.:confused:

Any thoughts?

Frank

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Title here<title>
<META NAME="RATING" CONTENT="general">
<META NAME="LANGUAGE" CONTENT="EN-GB">

gnomeontherun
05-04-2008, 07:54 PM
I think it has to do with this line

<html="http://www.w3.org/1999/xhtml">

First you have it referencing the XHTML DOCTYPE when you set it to HTML 4.01. I don't think you can put the extra stuff in there besides just <html>.

effpeetee
05-04-2008, 08:35 PM
Thanks, I'll try that.

Frank

Apostropartheid
05-04-2008, 08:44 PM
I think it has to do with this line

<html="http://www.w3.org/1999/xhtml">First you have it referencing the XHTML DOCTYPE when you set it to HTML 4.01. I don't think you can put the extra stuff in there besides just <html>.
Rather, he's referencing the XHTML namespace--the doctype is a different thing. Valid attributes in HTML for the html element include lang and dir (:

It's invalid in XHTML anyway: it's <html xmlns="http://www.w3.org/1999/xhtml">

gnomeontherun
05-04-2008, 08:54 PM
You just want to show me up Cyan! :P

Yeah...like in other posts, I just get confused with all of the specific names of these elements. I looked up the <html> and had nothing about that namespace, but thanks for the info. I'm slowly getting all of the nuances of coding...its tedious!

abduraooft
05-05-2008, 09:27 AM
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Title here<title>
<META NAME="RATING" CONTENT="general">
<META NAME="LANGUAGE" CONTENT="EN-GB">
[/CODE]
All tags and attributes should be lowercase, like <meta name=""
After all these meta tags must be self closed at the end like
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
to keep the xhtml standards (which says all tags must be closed)

I thought it's xhtml strict :-(

effpeetee
05-05-2008, 10:36 AM
All tags and attributes should be lowercase, like <meta name=""
After all these meta tags must be self closed at the end like

I thought that this was only for xhtml. The Doctype is for html.

Frank

gnomeontherun
05-05-2008, 04:54 PM
Its not a requirement for HTML, just XHTML.