Jump to content
Killersites Community
A2JC4life

validation question

Recommended Posts

Can anyone tell me what this means?

 

Missing xmlns attribute for element html. The value should be: http://www.w3.org/1999/xhtml

<html>

✉

Many Document Types based on XML need a mandatory xmlns attribute on the root element. For example, the root element for XHTML might look like:
<html xmlns="http://www.w3.org/1999/xhtml">

 

I get this error when attempting to validate my WordPress theme. If I add the attribute it specifies, I get a different error, about the xmlns not existing or something. What do I need to do?

Share this post


Link to post
Share on other sites

Make sure your doctype and opening html tag look like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 

Share this post


Link to post
Share on other sites
Guest iOCreations

Can anyone tell me what this means?

 

Missing xmlns attribute for element html. The value should be: http://www.w3.org/1999/xhtml

<html>

✉

Many Document Types based on XML need a mandatory xmlns attribute on the root element. For example, the root element for XHTML might look like:
<html xmlns="http://www.w3.org/1999/xhtml">

 

I get this error when attempting to validate my WordPress theme. If I add the attribute it specifies, I get a different error, about the xmlns not existing or something. What do I need to do?

 

Just a small note to understand why that is needed, The DOCTYPE element is nedded to define the document type definition for the specific page. It is required if your page needs to be be XHTML compliant and validated from W3C standards.

 

Unfourtantely, there are quite a large number of websites on the net which are not w3c validated, and this can couse a lot of issues when viewing websites on different browsers. Always try to validate websites before going online.

 

Jonathan Caruana

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×