Skip to content

Instantly share code, notes, and snippets.

@mxlje
Created April 20, 2014 10:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mxlje/11110455 to your computer and use it in GitHub Desktop.
Save mxlje/11110455 to your computer and use it in GitHub Desktop.
<h1>The Document Outline in HTML - When to use a heading tag for a heading?</h1>
<p><strong> On a lot of websites, especially the ones with ready made templates, we see that the heading tags <code>&lt;h1&gt;</code> to <code>&lt;h6&gt;</code> are used incorrectly. This happens as the differention between style and markup is not considered in the right way. </strong></p>
<p>To make a nice looking website, you need only two files:</p>
<ol>
<li>an HTML Document for the structure</li>
<li>a CSS File for the styling</li>
</ol>
<h2>What is interesting for the Bot</h2>
<p>When it comes to search engines, the do not really care how your website looks. So the CSS file is just for us humans. The search engines bot however pays very close attention to the HTML Document. And it is our job to make it easy for the bot to understand important aspects of your document.</p>
<p>So the answer when to use a heading tag for a heading is as follows: Always. But if you only want to style please to not confuse styling with markup and give the element a different selector.</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment