Treehouse: Grow your CSS skills. Land your dream job.

Essential Things to Place in HEAD?

  • # January 14, 2013 at 2:55 pm

    Aside from the stylesheet linking, and other linking scripts– what are some ESSENTIAL things to place in the portion of your HTML file?

    # January 14, 2013 at 3:23 pm

    Meta keywords, meta description, title & character encoding

    # January 14, 2013 at 3:31 pm

    Disregard the keyword metatag completely. It doesn’t have any effect on search ranking.

    # January 14, 2013 at 5:28 pm

    I include the doctype in the head section so the browsers know what version of HTML I’ll be using. Hope that helps.

    # January 14, 2013 at 5:30 pm

    meta charset=’utf-8′

    # January 14, 2013 at 5:43 pm

    HTML5 Shiv/Shim within a conditional comment.

    # January 14, 2013 at 8:37 pm

    You could also, as a suggestion, view the source of any site (including this one: view-source: to get an idea of what to include in the head section.

    # January 14, 2013 at 9:39 pm

    it’s not essential per se, but i almost always include modernizr.

    it includes both an HTML Shiv (which allows old browsers to recognize html5 tags), and also enables device/browser feature detection by writing conditional css and js. which really helps with progressive enhancement.

    # January 14, 2013 at 10:33 pm



    # January 15, 2013 at 1:03 am

    Language attribute on your “html” tag. Discovery “link” to your rss feed (if you have one). meta “viewport.” Unique meta description for every page. rel canonical tag.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.