natural primary language and Editing Tip

Post here if your topic is about CSS HTML Validator but doesn't fit in another forum.
Walter Metzger
Rank II - Novice
Posts: 48
Joined: Tue Feb 26, 2008 12:57 pm
Location: Germany

natural primary language and Editing Tip

Post by Walter Metzger »

Good day,

First
with Validator Pro 11.0032 I get the (new?) message (Warning for line 9)

The natural primary language is not specified. It is highly recommended that the "lang" and/or "xml:lang" (for XHTML) attribute be used with the "html" tag to specify the primary language. For example, use lang="en" for English or lang="fr" for French. Specifying the language assists braille translation software, speech synthesizers, translation software, and has other benefits.

My line 9 is
<html xmlns="http://www.w3.org/1999/xhtml">

Sorry, i do not understand the warning and could not find a tip, what do I have to to?

Second
with Validator Pro 11.0032 I get the (new?) Comment

Editing Tip: This document was specified as UTF-8 encoded. Editing documents with the wrong encoding may cause document corruption. Make sure that any editor used to edit a document properly supports the document's encoding and properly loads it with the correct encoding. CSE HTML Validator's editor supports UTF-8 and other common encodings.

I have defined:

<?xml version="1.0" encoding="UTF-8"?>
and
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />

I translate all german special characters as "ä, ß" etc.
I use only HTML Validator's editor, so I have no problems or?

Thanks for answers
and greetings
Happy Christmas
and a Good New Year 2012
Walter Metzger (no snow in our region)
Germany
User avatar
Albert Wiersch
Site Admin
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX

Re: natural primary language and Editing Tip

Post by Albert Wiersch »

Walter Metzger wrote:Good day,

First
with Validator Pro 11.0032 I get the (new?) message (Warning for line 9)

The natural primary language is not specified. It is highly recommended that the "lang" and/or "xml:lang" (for XHTML) attribute be used with the "html" tag to specify the primary language. For example, use lang="en" for English or lang="fr" for French. Specifying the language assists braille translation software, speech synthesizers, translation software, and has other benefits.

My line 9 is
<html xmlns="http://www.w3.org/1999/xhtml">

Sorry, i do not understand the warning and could not find a tip, what do I have to to?
Hello,

You can use something like this (assuming the primary language of your page is English):
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Walter Metzger wrote:Second
with Validator Pro 11.0032 I get the (new?) Comment

Editing Tip: This document was specified as UTF-8 encoded. Editing documents with the wrong encoding may cause document corruption. Make sure that any editor used to edit a document properly supports the document's encoding and properly loads it with the correct encoding. CSE HTML Validator's editor supports UTF-8 and other common encodings.

I have defined:

<?xml version="1.0" encoding="UTF-8"?>
and
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />

I translate all german special characters as "ä, ß" etc.
I use only HTML Validator's editor, so I have no problems or?
No, you shouldn't have any problems with recent versions of CSE HTML Validator's editor as it should see the XML declaration that specifies UTF-8 encoding and thus open the document with that encoding; but if you ever see that characters are not what they should be, then there is a problem and you should investigate further before saving the document as there is the possibility of corruption.
Walter Metzger wrote:Thanks for answers
and greetings
Happy Christmas
and a Good New Year 2012
Walter Metzger (no snow in our region)
Germany
You're welcome! Merry Christmas to you as well (and Happy New Year)!
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
Walter Metzger
Rank II - Novice
Posts: 48
Joined: Tue Feb 26, 2008 12:57 pm
Location: Germany

Re: natural primary language and Editing Tip

Post by Walter Metzger »

Good evening Albert,

I replaced
<html xmlns="http://www.w3.org/1999/xhtml">
with
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
and the message "warning" no longer appears.

Thanks for your help
Walter