Jump to content

validation question


A2JC4life

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?

Link to comment
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"> 

Link to comment
Share on other sites

  • 2 months later...
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...