Re: Behavior with html and lang

Hi Michael,

Please see my comments below your quote, inline.

On 2018/09/06 12:30, Michael Warenycia wrote:
> So, my initial HTML tag was:
>
> <!DOCTYPE html>
>
> The site issued a warning saying that I should declare the language in 
> the html tag, so then I submitted it with:
>
> <!DOCTYPE html lang="en">
Yes, like Steve said, that is the doctype, or the doctype declaration, 
not the html tag/element. The doctype just tells the browser to deal 
with the document in standards mode. Webpages will behave unexpectedly 
without a doctype, and of course, it is nonconforming.
>
> That threw a bogus doctype error and a quirky doctype error. So then I 
> submitted:
>
> <html lang="en">
>
> and it threw back a warning saying it expected !DOCTYPE to be in 
> there. I can't do anything to make it happy :(
>
>
>
We always need to put in the <!DOCTYPE html> at the top of our documents 
when using the HTML parser. The HTML parser is recommend for most people 
to use, and is what most webpages use.

The textarea at this URL will show you what a simple HTML document looks 
like: https://validator.w3.org/nu/#textarea

You can have a go on that page and see what markup is valid. However, 
you may be interested in having a look around on the web and see if 
there is a tutorial on how to use HTML and CSS. Here's a good place to 
start: 
https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web

Hope that helps.

-- 
Dean Edridge: https://dean.kiwi
dean@dean.kiwi — @deanedridge

Received on Friday, 7 September 2018 11:03:12 UTC