HTML <head> best practices

Luke picture Luke · Nov 9, 2008 · Viewed 7.4k times · Source

There are <meta> tags and other things you can place in the <head> of your HTML document. What <meta> tags etc. and best practices do you make use of in your HTML document to make it more accessible, searchable, optimized etc.

Answer

andyk picture andyk · Nov 9, 2008

In my case:

  • Title (should do [Section Name - Site Name] for better SEO)
  • Meta tag for Content-type, description, and keywords
  • Link to stylesheet(s) (don't forget to specify the media="").
  • <script> tag that links to external javascript files.

All tags should follow the W3C's standard. The W3C site has a more technical and detailed section about the HTML <head> section.