Semantic html, at it's core, is really just using HTML correctly, ensuring your selection of markup is appropriate given the meaning of the content you are communicating.
The term has only really come about because people generally have not followed this principle over the years and have thereby mixed presentation with structure. There's probably numerous reason now why people care more about semantic html now than before (web going 'cross platform', accessibility, flow of social data between different websites, SEO, etc).
Your latter explanation fits in most with my understanding of semantic html. E.g.:
Not semantic:
CODE
<div class="my-header">Andy's Website</div>
Semantic
CODE
<h1>Andy's website</h1>
Similarly people often incorrectly use html to visually present their content in a certain way when really all presentation should be handled via CSS:
non-semantic:
CODE
<div id="navigation">
<a href="/home.html">Home</a><br />br />
<a href="/news.html"><b>News</b></a><br />br />
<a href="/contact.html">Contact Us</a><br />br />
</div>
semantic
CODE
<ul id="navigation">
<li><a href="/home.html">Home</a></li>
<li class="current-page"><a href="/news.html">News</a></li>
<li><a href="/contact.html">Contact Us</a></li>
</ul>
The class attribute can be used to give extra contextual information; which is something the microformats organisation are trying to standardize:
http://microformats.org/get-started/As a rule I always fully code my pages in html before doing anything in CSS to make sure they structure of the content is semantic and that I can make sense of the content firstly by just reading the source and secondly by viewing the page with the default browser presentation.
Good presentation on semantic html:
http://www.tantek.com/presentations/2004et...anticspres.htmlHope all this helps!
This post has been edited by SoLi: 30 Jun, 2009 - 03:53 AM