Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Order of elements in “head” section of html document

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #38217
    GMB
    Participant

    I am wondering if there is a fixed/correct order for elements appearing in the “head” section of an html document. I’m working on a project and often have style and script elements and am not sure if they should appear in that order and before or after the title of the document. The following is typical of this project:




    Title Here

    Is this all right? Should the title precede the style and script? Any help would be appreciated.

    Thanks in advance.

    #103486
    karlpcrowley
    Participant

    I normally do it in this order;
    Meta charset (this should always be before the title)
    Title
    Other meta tags
    Styles

    and move my JavaScript to the end of the document before the closing the body

    #103487
    theacefes
    Member

    I do the same thing. :)

    #103489
    GMB
    Participant

    Thanks for the comments.

    And if I had a bit o’ script, it would appear just after the JS call before closing the body, like so:



    Right?

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Other’ is closed to new topics and replies.