Xml:lang no namespace

Not sure what it is asking for me to do here I think its saying to add another lang at the end and I did that but didnt work…

Line 5, Column 57: When the attribute xml:lang in no namespace is specified, the element must also have the attribute lang present with the same value.
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

Pretty self explanatory. You need the lang attribute which equals what you set in the xml:lang. The error message gives you all you need.

When the attribute xml:lang in no namespace is specified


the element

Talking about <html> since that’s the one invalid

must also have the attribute lang present

Ok the lang=“” attribute

present with the same value.

So to use the xml:lang=“en”…I need lang=“en” (see how both values match?)

So presumably this is your finished product.

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

Hmm, thought you were getting rid of everything XHTML in our last conversation :smiley: ?

well I just changed this <!doctype html>…should I just take this off too? <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

It (xmnls) is optional in HTML5. You can just remove it.

The XML can be removed as well.

Right because it is there by default right? and can i put this? @RyanReese

 <html lang="en">

Unless you plan on doing any XML then leave it out. I say just leave it out. It’s not default.

And yes your <html> is exactly how I have it set up. I’d keep it like that. Nothing fancy :slight_smile: .

cool thanks.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.