Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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

by jeffa (Bishop)
on Aug 18, 2003 at 20:24 UTC ( #284710=note: print w/ replies, xml ) Need Help??


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

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 ...
Pesonally, i think the extra typing is worth it, but some might claim it's not being lazy. ;)

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)


Comment on Re: My favorite HTML font style tag is...
Download Code
Replies are listed 'Best First'.
Re: Re: My favorite HTML font style tag is...
by theAcolyte (Pilgrim) on Aug 20, 2003 at 05:17 UTC

    I'm a nitpicker. I admit it. Since you're using <tt> to show emphasis, you should really use <EM> </EM> and then use your stylesheet to make your EM equivalent to teletype.

    - Erik

    ---------------------------------------------------------------------------

    Promoting web standards since 3 PM today.

      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 elements).

      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>
      and viewed it with lynx, which 'rendered' the <i> and <em> tags, but not the <tt> tag. If this is what you were referring to, then yes, i should switch. But i probably won't. ;)

      jeffa

      L-LL-L--L-LL-L--L-LL-L--
      -R--R-RR-R--R-RR-R--R-RR
      B--B--B--B--B--B--B--B--
      H---H---H---H---H---H---
      (the triplet paradiddle with high-hat)
      
        Ya, my XHTML is garbage, thanks for reminding me.

        The reason for using <em> over <i> or <b> in this situation is the idea of structure vs. presentation.

        In an ideal world, your HTML would only mark up your content structurally ...

        • <em> rather then <i> or <b> for emphasis
        • <code> rather then <pre> for mono-spaced code
        • <h1> for a headline instead of <font>

        Why bother, you ask? (Well, even if you don't....) Because not all devices that render HTML pages are visual -- example, if someone is looking at your page on a Palm Pilot, then the palm can interpret emphasis the best way it can. Also, search engines are better equiped to deal with structural markup -- markup that signifies what type of data something is.

        Once you can do all your mark-up structurally, you can use CSS to have your HTML visually styled in the user-agents that can handle it, and the ones that can't will still be able to digest it easily.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://284710]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2015-07-08 06:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls