473,396 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Element "x" undefined when using validator

Hi all I'm getting tons of these errors when running the w3c validator on my
template page.

Basically it will say for example: element "TITLE" undefined.

Do I need to put this into lowercase or uppercase or have I got completely
the wrong end of the stick and need to define my doctype to another?

Currently I have this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Feb 10 '06 #1
4 6896
Tom Eldridge wrote:
Hi all I'm getting tons of these errors when running the w3c validator on my
template page.

Basically it will say for example: element "TITLE" undefined.

Do I need to put this into lowercase or uppercase or have I got completely
the wrong end of the stick and need to define my doctype to another?

Currently I have this:

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


In XHTML all element and attribute names must be lower case.

Steve

Feb 10 '06 #2
Tom Eldridge wrote:
Hi all I'm getting tons of these errors when running the w3c validator on
my template page.

Basically it will say for example: element "TITLE" undefined.
Which means there is no TITLE in the language your Doctype claims you are
using.
Do I need to put this into lowercase or uppercase or have I got completely
the wrong end of the stick and need to define my doctype to another? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


http://www.w3.org/TR/xhtml1/#h-4.2

Although I suggest switching to HTML 4.01 Strict, it is far more suitable
for todays WWW.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Feb 10 '06 #3
Tom Eldridge wrote:
Hi all I'm getting tons of these errors when running the w3c validator on my
template page.

Basically it will say for example: element "TITLE" undefined.

Do I need to put this into lowercase or uppercase or have I got completely
the wrong end of the stick and need to define my doctype to another?

Currently I have this:

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


Case matters in XML, of which XHTML is an instance. All XHTML tag and
attribute names are lower-case.
Feb 10 '06 #4
Tom Eldridge wrote :
Hi all I'm getting tons of these errors when running the w3c validator on my
template page.

Basically it will say for example: element "TITLE" undefined.
It means you may have misdeclare the title element. It should be (it
must be) in your <head>...</head> section. If you declare your
<title>...</title> elsewhere than in the head section, then the
validator will report this as an error.

Do I need to put this into lowercase or uppercase or have I got completely
the wrong end of the stick and need to define my doctype to another?

Currently I have this:

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


Elements and attributes in XHTML must be lowercased.
I suggest you use HTML 4.01 strict and not XHTML for your document.
Whatever you decide, it is in your best interest to use a strict DTD,
not a transitional DTD.

Recommended DTDs to use in your Web document.
http://www.w3.org/QA/2002/04/valid-dtd-list.html

Also, if you use Firefox, then you can check your documents offline with
HTML Tidy.

HTML Tidy validator for Firefox
http://users.skynet.be/mgueury/mozilla/

It will report you several errors that W3C markup validator will not.

More resources on this matter:
Web page validators and validation tools
http://www.gtalbot.org/NvuSection/Nv...tml#validators

Gérard
--
remove blah to email me
Feb 14 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: frankabel | last post by:
Hi all! I have the following xml file: " <items> <item>hi</item> <item>hello</item> </items> " and need to read all the content between <items> and </items> tags and saved in a string, in...
2
by: AR | last post by:
Hi, How can I get strings separately which contain text nodes of a given element using XSL and XPath? For example, <a> aaa 111 <b>
1
by: Raghuram Banda | last post by:
Hi All, Can any one help me how to create a HIDDEN element using JavaScript (DOM) dynamically The following codes works fine with IE but not in Netscape currentElement =...
15
by: Barry | last post by:
Hi group, Does anyone know why I get a W3 validator error (click the validation link at the bottom of the page) for http://www.polisource.com/consumer-protection.shtml saying "Line 227, column...
1
by: BillGatesFan | last post by:
Does anyone have any code to get Attributes of an XML Element Using XPATH. I have been trying all day and cannot get this to work. I have been using XPathNavigator, XPathDocument and the...
7
by: Zhang Weiwu | last post by:
Dear all How does javascript realiablily tell if a variable is a reference to an HTML Element "<select>", without causing browser to pop up error message? if (variable.constructor ==...
3
by: blackrunner | last post by:
ERROR in my Query?! ERROR: Element GESCHLECHT is undefined in FORM. i think everything ok. Maby somebody can help me here Element GESCHLECHT is undefined in FORM. The error occurred...
13
by: esteban | last post by:
I need to know how can obtain the id of a element when this lost focus, the reason is because I have more than one editbox and my function needs of the id for validation, could you help me with a...
5
by: Edwin | last post by:
I am trying to write an application among which one of the functions is to determine the number of unique extensions found in a directory and all of its sub directories. I am trying to use Linq to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.