[personal profile] tropicsbear posting in [community profile] style_system
So I heard that the font tag and associated tags are being deprecated? (I'm not sure? This also includes center?) So I started using span when needed in my entries. The problem is that the text isn't displaying accurately anymore.

In the layout I'm using, italicized text displays as Old Standard TT or Georgia, and bolded text is displayed as Lato or Calibri. If I just use b or i, the text displays correctly. But if I use span (like, < span style="font: italic;" >*text*< /span >, the different fonts are gone.

This is the layout CSS I'm using:



Alternately, if I'm wrong about font being deprecated, feel free to tell me I'm an idiot so I can just go back to my old ways.

Date: 2013-03-11 03:08 am (UTC)
carene_waterman: An image of the Carina Nebula (Default)
From: [personal profile] carene_waterman
This will work if you really want to use a span tag: <span style="font-style: italic;">*text*</span>

And yes, the font tag in HTML is deprecated.

But, what you should be doing is using the HTML tags in your entries that apply the right meaning to the text. If you want it in italics to emphasize the text, use the <em> tag. Your style, and most styles or browser defaults style the <q> tag for quoted text as italics too.

If you just want the text to look different, it really is okay to just use the <i> tag.

Those methods are a whole lot quicker to type than a font tag or a span style. And if someone is viewing your journal in their style and they have those tags styled as red or blue instead of italics, well, that's their choice.

Date: 2013-03-11 07:08 am (UTC)
metawidget: A platypus looking pensive. (Default)
From: [personal profile] metawidget
An interemediate solution is to class your spans (<span class="someClass">text<span/>) and define the style for the class in the CSS in your journal. Other people's journals won't usually implement the class, though, and can't see your implementation, so it's best for decorative-but-not-critical styling.

Date: 2013-03-11 08:24 am (UTC)
zooey_glass: (Typewriter)
From: [personal profile] zooey_glass
Just an addendum - my understanding is that it's actually bad to use span styles where the text styling has semantic meaning. That is, if you want it to display in italics because you're emphasising it, you should use [em] rather than a span, because that way screen readers will also know to emphasise it. When they hit spans, they just go 'ho hum, some visual styling' and ignore that.

For the same reason, it's better to use h1, h2 etc for headers (rather than styling big, bold text or whatever) since those will actually allow a screenreader user to scan through just the headings in the same way as a visual user can.

Date: 2013-03-11 03:54 am (UTC)
foxfirefey: A fox colored like flame over an ornately framed globe (Default)
From: [personal profile] foxfirefey
You can escape angled brackets so that they appear instead of getting interpreted by escaping them with entity notation:

&gt; and &lt; create > and <

Profile

Dreamwidth style system discussion

October 2025

S M T W T F S
   1 234
567891011
12131415161718
19202122232425
262728293031 

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 7th, 2026 03:28 pm
Powered by Dreamwidth Studios