Quote:
Originally Posted by rogue_ronin
-- attributes: the formatting is all I'm after -- is there a better way, in a single tag, to indicate alignment? Without CSS?
|
Nope. It's just that I am bent on using CSS whenever possible, because it can be easily centralized into one file.
Quote:
-- <whatever id="..."> is XML, right? Why is this better? I assume one can link to the created/named tag?
|
Yes, you can link to any tag. It allows me to minimize the number of tags, e.g.:
Code:
<h2 id="chapter-5">Chapter 5</h2>
...
<a href="#chapter-5">jump to chapter 5</a>
vs.
Code:
<h2><a name="chapter-5">Chapter 5</a></h2>
...
<a href="#chapter-5">jump to chapter 5</a>
Quote:
-- I've never understood <span> and <div> more than generally as a sort of box to drop things into.
|
Exactly. I use them to style things where I want the style centralized and can't use a better tag (e.g. because it's not allowed), or where I need the style to span multiple tags:
Code:
.story { font-style: italic; }
.story em {font-style: normal; }
<div class="story">
<p>Lorem ipsum <em>blabla</em> etc. etc.</p>
<p>More text with <span class="underline">underlined</span> text.</p>
</div>
Also to mark sections:
Code:
<div class="chapter">
<h2 id="chapter-2">Chapter 2</h2>
<p>...</p>
<p>...</p>
</div>
Quote:
-- I actually do that too, with the final product (ie: class="chapter", class="subtitle"), but aren't these attributes? I do it so that if someone wants to convert/strip my HTML, it's easy to find. But I don't drop it on every paragraph or blockquote. I can see why I might do it on a blockquote, though.
|
It depends. I do mark e.g. telepathy/thoughts-to-self with <em class="thought"> or emphasised foreign (or intentionally misspelled) words with <em class="foreign">, but I do leave "normal emphasis" classless.