[html5] What replaces <tt> in HTML5?
Jim Garrison
jim at garrison.cc
Tue Apr 28 13:43:48 PDT 2009
> On Tue, 28 Apr 2009, Jim Garrison wrote:
>> I am trying to figure out the best way to replace <tt> as I migrate to
>> HTML5.
>
> Are you using <tt> to mark up computer code, variables, sample computer
> output, user input, for emphasis, to give a span of text in an alternate
> voice or mood, a span of text to be stylistically offset from the normal
> prose without conveying any extra importance, or something else?
I am trying to mark up XML code. Many of the files I want to display
have few (if any) newlines, so I want to be able to display with
line-wrapping enabled.
>From what you've said, I now believe that <code> is my best bet.
> [...]
>> Ideally I would like to be able to say "give me the most appropriate
>> monospace font considering the current font-family in use" instead of
>> "give me the default monospace font on the system." (Just as, for
>> instance, the <b> element uses the best bold font based on the current
>> font family)
>
> This is a separate question. I don't think CSS has a solution for this
> yet, but I recommend raising it with the CSS working group:
>
> http://lists.w3.org/Archives/Public/www-style/
>
Will do.
Thanks,
Jim
More information about the Help
mailing list