Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: My favorite HTML font style tag is...

by Joost (Canon)
on Aug 19, 2003 at 11:44 UTC ( #284860=note: print w/replies, xml ) Need Help??

in reply to My favorite HTML font style tag is...

Hate all of them. <em> <cite> <del> <code> <strong> <h1> etc are so much better. Maybe sometimes I'd use <div> and <span> but I try to avoid it.


-- #!/usr/bin/perl -w use strict;$;= ";Jtunsitr pa;ngo;t1h\$e;r. )p.e(r;ls ;h;a;c.k^e;rs ";$_=$;;do{$..=chop}while(chop);$_=$;;eval$.;

Replies are listed 'Best First'.
Re: Re: My favorite HTML font style tag is...
by hardburn (Abbot) on Aug 19, 2003 at 13:42 UTC

    <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.
    -- Schemer

    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:

      <p> <span class="bold">Some header</span><br> Some paragraph. </p>

      Is much better written:

      <h3>Some header</h3> <p> Some paragraph. </p>

      - Don't laugh too hard at the above example, I've seen plenty of this in real sites made by supposedly professional companies.


      -- #!/usr/bin/perl -w use strict;$;= ";Jtunsitr pa;ngo;t1h\$e;r. )p.e(r;ls ;h;a;c.k^e;rs ";$_=$;;do{$..=chop}while(chop);$_=$;;eval$.;
        I suggest you go browse CSS Zen Garden.

        Then you will understand the power of one <div> clapping :)




        Ok, but what about:
        <h3><span>Some</span> header</h3> <p> Some paragraph. </p>
        with this CSS:
        h3 span { color: red; }
        Some designs need that.
        He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.

        Chady |

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://284860]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (13)
As of 2018-06-25 13:01 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.