Redefining span this way makes about as much sense as redefining (just to get a little perl into this) print to mean foreach.

<span> has a legitimate use -- to make a part of a markup element different from the rest. For example:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http:/ +/www.w3.org/TR/html4/loose.dtd"> <html> <head> <style type="text/css"> span { color: red; } blockquote{ margin-left: 6em; margin-right: 8em; font-style: italic } .red { color: red; background-color:transparent; } .b { font-weight: bold; color: green; background-color:#dddddd; } .black { color: black; background-color: #aaaaff; width: 8em; max-width:8em; text-align:center; } foobar { color: blue; background-color: transparent; font-size: 1.8em; font-style: italic; } .foobar { color: blue; background-color: red; font-size: 1.8em; font-style: italic; } </style> <title>My title</title> </head> <body> <p><span>this should be red... and it is, because browsers will genera +lly allow this abuse.</span> But a decent validator (CSS specific or +html/css) will tell you something like this:</p> <blockquote>The &quot;span&quot; tag has no attributes. Attributes are + normally used with the &quot;span&quot; element to provide functiona +lity.</blockquote> <p>Normal text. <span>red text</span> and back to normal.</p> <p><span class="b">And this bold, green and with a grey background.</s +pan></p> <p class="black">Black</p> <p class="span">Red? Not today! <foobar> ...because span is NOT a clas +s.</foobar> However, turning again to our validator:</p> <blockquote>The &quot;foobar&quot; is not a recognized element in this + selector. Is it misspelled?</blockquote> <p>Well, no, but while it works, there's no guarantee that it will tom +orrow ... or even today, in some browsers.</p> <p>dot_foobar (or even id foobar) would be a valid selector... used li +ke this: <span class="foobar">text rendered as spec'ed by dot_foobar< +/span></p> </body> </html>

So if you're going to give advice on css, please do so with good advice; that is, with a decent respect for standards.


In reply to Re^2: (OT) CSS Codes by ww
in thread (OT) CSS Codes by locked_user domjoel

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.