CarolW
03-11-2008, 03:12 PM
After years (perforce), I'm trying to fix up and work on my web site. I went to fix one page (contact info that needs updating), uploaded it, and then went to validate it with the W3C Markup service. I got this error:
Validation Output: 1 Error
1. Error Line 3, Column 1: Missing xmlns attribute for element html. The value should be: http://www.w3.org/1999/xhtml.
<html lang="en-us" xml:lang="en-us">
?
Many Document Types based on XML need a mandatory xmlns="" on the root element. For example, the root element for XHTML will look like:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Here's the start of my document (the page). I don't remember a thing from my previous efforts, where I was working beyond my capabilities anyway. I have dozens of pages to fix, just for this ONE error! That's okay; I plan to change them anyway - change to PHP, so I'll have to edit every page anyway.
I know I'm SUPPOSED to understand what these words mean (that is, what W3C says), but I don't. Help!
Quoting the first three lines of the page as I submitted it (so the error is present there):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en-us" xml:lang="en-us">
So how do I fix this?
Exactly what should I change, and how?
(Do you need more lines from the header? well, in case you do, I'll quote the entire header.)
So, it looks like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
<meta content="text/html; charset=utf-8" http-equiv=
"content-type" />
<title>CoDog Contacts: dog behavior and care, calming signals</title>
<link rev="made" href="mailto:cwhitney@islandnet.com" />
<meta http-equiv="Content-Type" content=
"text/html; charset=utf-8" />
<meta name="author" content="Carol Whitney" />
<meta name="description" content=
"CoDog: Carol's most highly-recommended sources for information on dogs, their nature and behavior, care and teaching" />
<meta name="keywords" content=
"CoDog, calming signals, dog-care, nature of dogs, behavior, clicker-training" />
<link rel="stylesheet" href="codog.css" type="text/css" />
</head>
Thanks!
Tue, 11 Mar 2008 13:09:29
Disoriented Granny again!
Validation Output: 1 Error
1. Error Line 3, Column 1: Missing xmlns attribute for element html. The value should be: http://www.w3.org/1999/xhtml.
<html lang="en-us" xml:lang="en-us">
?
Many Document Types based on XML need a mandatory xmlns="" on the root element. For example, the root element for XHTML will look like:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Here's the start of my document (the page). I don't remember a thing from my previous efforts, where I was working beyond my capabilities anyway. I have dozens of pages to fix, just for this ONE error! That's okay; I plan to change them anyway - change to PHP, so I'll have to edit every page anyway.
I know I'm SUPPOSED to understand what these words mean (that is, what W3C says), but I don't. Help!
Quoting the first three lines of the page as I submitted it (so the error is present there):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en-us" xml:lang="en-us">
So how do I fix this?
Exactly what should I change, and how?
(Do you need more lines from the header? well, in case you do, I'll quote the entire header.)
So, it looks like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
<meta content="text/html; charset=utf-8" http-equiv=
"content-type" />
<title>CoDog Contacts: dog behavior and care, calming signals</title>
<link rev="made" href="mailto:cwhitney@islandnet.com" />
<meta http-equiv="Content-Type" content=
"text/html; charset=utf-8" />
<meta name="author" content="Carol Whitney" />
<meta name="description" content=
"CoDog: Carol's most highly-recommended sources for information on dogs, their nature and behavior, care and teaching" />
<meta name="keywords" content=
"CoDog, calming signals, dog-care, nature of dogs, behavior, clicker-training" />
<link rel="stylesheet" href="codog.css" type="text/css" />
</head>
Thanks!
Tue, 11 Mar 2008 13:09:29
Disoriented Granny again!