xml version="1.0" encoding="utf-8" ?>
Quoting the comment I left at Simon Willison's weblog concerning the difference between DIV and SPAN tags:
On a pretty simplistic level,
DIVis meant for marking up pieces (chunks/divisions) of code or text, whileSPANis meant for marking phrases, usually within text paragraphs or sentences. For example:[snip]
<div class="Examples">
<p>This is a paragraph of text. To mark up a book title, use the span tag. For example, <span class="book title">Good Omens</span> by Neil Gaiman and Terry Pratchet.</p>
<p>This is another paragraph, just to show that it's appropriate to have multiple paragraphs, and other block elements, within a single div tag.</p>
</div>*crosses fingers, hopes this is rendered as hoped, and wishes Simon W had a Preview button*
last updated 2003.5.30 Micah Sittig
Jim asked why I used two classes on my book title. I answered there, but I'll illustrate here. By including CSS code like the following:
.title { font-style: italic; }
.book:after { content: url("minibook.gif"); }
.movie:after { content: url("miniscreen.gif"); }I can decorate both book and movie titles in similar and different ways. For example, the Bible is a famous book, and Gone With The Wind is a famous movie.
last updated 2003.5.31 Micah Sittig