all over the place, and then your phb says "make the warning section have a blue backround", all you have to do is update your css and then with no code change to current code base and a simple one line update to the css you're done!
TacoVendor beat me to the <blink> joke, so
i'll have to be serious. I voted for
<tt>, because until
i started hanging out at the Monastery, i never used this
tag. I like to use it in my posts to markup CPAN modules,
subroutines, methods, and variables, as long as i don't have to use the [ or < symbols (which require escaping or
'inline' <code> tags). Here is an example.
That's why i like [cpan://Time::Piece]. Not only is it a
drop-in replacement for <tt>localtime</tt> and
<tt>gmtime</tt>, <tt>Time::Piece</tt> also ...
Why? What's the difference. I am sure that there is a good
one, but i don't understand why you just say "you should
this!" without explaining why. Also, if you were a
nitpicker then you would have said "use <em> tags" instead, because that's the XHTML way (all lower cased
Letsee, i just tested this html:
<p>this is <i>italic</i></p>
<p>this is <em>emphasis</em></p>
<p>this is <tt>teletype</tt></p>
<div> is widely used for the CSS box layout. The alternative is to devolve into nested tables. Sure, for simple text markup, <div> isn't used much, but its becoming invaluable for designers (and will become more so when/if IE ever fixes its CSS support).
---- I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
Note: All code is untested, unless otherwise stated
But most of the time I see <div> tags used where a <p> or some other tag that actually has meaning would be better. The problem with (or the point of) <div> and <span>. tags is that they don't have any meaning.
This means that you are putting information (content) in a 'block' that appears to have no meaning at all.
Though I can see the use of the construct in some cases, just applying <div> and <span> anywhere you want a layout change is bad practice.
For instance, this:
<span class="bold">Some header</span><br>
Actually CSS should have been included as an option. Since any type of presentational HTML should be avoided if possible. Centralize all of your styling in your CSS files and you have one place to change the look of your site. Decided that h2 headers on your site should be white with a blue background? Change one line of CSS to update your whole site.
I normally use <div>, but I voted
<span>, which basically amounts to
the same thing. The only other style tags I use
with any regularity are <em>,
<strong>, and <cite>.
Of these, <strong> is the one I
use most by far -- but not nearly as much as
<div>. I do sometimes apply styles
to other tags (<p> and <td>
come to mind), but in those cases I'm not including
the tag for the purpose of applying
style (unless you count semantic things like
paragraphitude as style, which I don't), so I don't
think those count as style tags.