Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Nov 2005
    Posts
    750
    Thanks
    138
    Thanked 1 Time in 1 Post

    HTML language declarations

    Hello

    At the top of my Web page I have:

    Code:
    <!DOCTYPE html>
    
    <head>
      <title></title>
        list of meta names here
    </head>
    The validator gives me a 'declaring language' error and one tutorial here

    http://www.w3.org/International/tuto...e-declarations

    states I should use
    <html lang="en">
    (all my pages are in English).

    To remove the error, then, can I use:
    Code:
    <!DOCTYPE html lang="en">
    at the top of the page, bearing in mind that I thought Google expected language statements to be under 'meta names'?

    Thanks

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,620
    Thanks
    0
    Thanked 645 Times in 635 Posts
    You have left out the HTML tag completely. You should have coded it as:

    Code:
    <!DOCTYPE html>
    <html lang="en">
    <head>
      <title></title>
        list of meta names here
    </head>
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • Users who have thanked felgall for this post:

    SteveH (05-23-2013)

  • #3
    Regular Coder
    Join Date
    Nov 2005
    Posts
    750
    Thanks
    138
    Thanked 1 Time in 1 Post
    That's removed the error message in the validator now, thank you, Felgall.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •