Forum Moderators: open

Message Too Old, No Replies

What is xmlns

in plain english?

         

Clark

1:17 am on May 22, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I noticed the Wordpress has a header with "xmlns" in it. I googled it and it's lots of technical jargon.

Which is worth the time if you care about the details...but overall, I doubt it's needed in most cases.

Can someone explain briefly what this is for and why this value might differ from the default?

Thanks.

encyclo

1:29 am on May 22, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



xmlns
stands for "XML namespace". A namespace is a unique identifier for a variant of XML. It is a method to avoid conflicts with different XML variants which use the same element names.

But all that's detail, as you are talking about XHTML here, which you're not serving as XML but as HTML. As such, the

xmlns
is ignored because the parser is seeing HTML not XML. The browser will consider it as an unknown attribute and simply discard it.

So your best bet is to remove it, remove the XHTML doctype and switch to a full HTML 4.01 one, remove the trailing slashes off the meta and stylesheet link elements, and just stick to good old HTML. :)

  • Why most of us should NOT use XHTML [webmasterworld.com]
  • FAQ: Choosing the best doctype for your site [webmasterworld.com]
  • Dabrowski

    1:44 am on May 22, 2007 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    I was on the verge of moving up(?) to XHTML 1.0 when encyclo posted the thread on HTML 5. I'm sticking firmly with HTML4.01/STRICT until it arrives!

    Clark

    8:26 am on May 22, 2007 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    Thank you!

    tomda

    9:55 am on May 22, 2007 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    So your best bet is to remove it, remove the XHTML doctype [...] and just stick to good old HTML.

    Doing this on Wordpress is almost impossible, unless you have plenty of time to kill.