n/t
what is the XHTML equivalent of <font>?
Collapse
X
-
Tags: None
-
There is no <font> tag, but rather a tag called <span>.
To style it, you use <span style=""> (it take the same elements as standard CSS).
So, just stick CSS styling elements in and you'll get the equivalent.
Here are the two CSS models (W3C standards):
-
As daemon stated, the <font> tag has been deprecated. The replacement is using css font or the constituent attributes of it such as font-family These, in xhtml, can be used on pretty-well any element's style.Comment
-
To expand on that and make it simple without having to read any lengthy W3 pages, if you want to do inline (even though inline isn't really that great) font styling, you can simply do this:
<span style="font-family: verdana,sans-serif; size: 12px; color: #000000;">Stuff</span>
You can, of course, leave out any of the attributes you don't need, like color/size.
<span style="font-family: verdana,sans-serif; size: 12px;">Stuff</span>
<span style="font-family: verdana,sans-serif; color: #000000">Stuff</span>
<span style="font-family: verdana,sans-serif;">Stuff</span>"63,000 bugs in the code, 63,000 bugs, you get 1 whacked with a service pack, now there's 63,005 bugs in the code."
"Before you critisize someone, walk a mile in their shoes. That way, when you critisize them, you're a mile away and you have their shoes."
Utopia Software - Current Software: Utopia News Pro (news management system)Comment
-
-
CSS classes don't stand alone. You need some kind of tag to use the CSS class. That was what my question was about.
In my case I am creating custom titles for my vB3 groups and I want to know what tag I should use in the custom title field besides font. There is no reason for me to use classes for my titles since each title is the only instance of that particular style.Comment
-
Here's what we're using for our Admin Titles - it works fine, but is it considered "correct"?HTML Code:<span style="color:darkblue" title="Administrator"><i><b>Username</b></i></span>
Comment
-
Well, you 'can' use the font-tag in XHTML, except in XHTML-strict. It's not forbidden there, but using <span ... + CSS-fomatting is the better choice anyway.Comment
-
CSS classes don't stand alone. You need some kind of tag to use the CSS class. That was what my question was about.
Not, strictly. You can have:
HTML Code:<style type="text/css"> /*<![CDATA[*/ /* This class will be available to whichever tag that you wish to declare the class attribute for*/ .clsRed{color:#ff0000; background-color:transparent} /* This class will be available to tags fo type span only that you wish to declare the class attribute for*/ span.clsBlue{color:#0000ff; background-color:transparent} /*]]>*/ </style>
Sandman:
<span style="color:darkblue" title="Administrator"><i><b>Username</b></i></span>
<span style="color:darkblue;font-style:italic; font-weight:bold;" title="Administrator">Username</span>
even better, of course, as a class:
HTML Code:<style type="text/css"> /*<![CDATA[*/ .admin{color:darkblue;font-style:italic; font-weight:bold;} /*]]>*/ </style> .... <span class="admin" title="Administrator">Username</span>
Comment
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Comment