Forum Moderators: open

Message Too Old, No Replies

Is it preferable to use CSS instead of tags like <STRONG>?

         

dnimrodx

5:03 pm on Feb 8, 2004 (gmt 0)

10+ Year Member



Hello,

I would like to know if it is preferable to use CSS rather than HTML tags such as

<STRONG>
,
<FONT>
. If so, why?

Thanks,

d#Nimrod

limbo

5:22 pm on Feb 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Definitely better to use CSS rather than font tags - this has been discussed many times and I think that most would be in agreement with me there - if you can you should try to keep style and content separate.

The <strong> tag was discussed recently as an accessibility issue here [webmasterworld.com]

The main advantage of CSS is the ability to make sitewide tweaks with very little effort. Getting the css properties of content right in the first place can save you a lot of time later on as well.

Ta

Limbo

ergophobe

5:37 pm on Feb 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



[edit: didn't hit reload, didn't see the answer already given]

There's a current ongoing discussion in this thread
[webmasterworld.com...]

dnimrodx

6:03 pm on Feb 8, 2004 (gmt 0)

10+ Year Member



Thanks a lot limbo and ergophobe

Will go take a look to that discussion.

txbakers

7:13 pm on Feb 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



preferable to whom?

DrDoc

7:46 pm on Feb 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



preferable to whom

Does that matter? :)
Preferable to the widest possible group of people, with the most different needs...

Yes, use CSS instead of font tags. But use strong tags whenever used properly. Don't use the strong tags just to make text bold.

dnimrodx

8:01 pm on Feb 8, 2004 (gmt 0)

10+ Year Member



...preferable to myself, being the developer.

I was trying to know which one of those two methods (CSS vs. (D)HTML) is seen as being the best one.

Thank you all for the input

dnimrodx

8:03 pm on Feb 8, 2004 (gmt 0)

10+ Year Member



Yes, use CSS instead of font tags. But use strong tags whenever used properly. Don't use the strong tags just to make text bold.

Doc, I wasn't just referring to

<FONT>
tags; It was just an example.

I was speaking in a more general point of view... :)

DrDoc

11:01 pm on Feb 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, it depends...

Does the tag you want to use mean anything? For example, <p> tells us that the contents are to be considered a paragraph. <table> means that we can expect some form of tabular data (such as a schedule or calendar... or spreadsheet). But then there are other tags that really don't mean anything. <i>, for example... it means nothing. Usually we use italicized text to emphasize something... But if that's what we really mean, the <em> tag is what we want to use. If you're only using the tag for presentational purposes -- then you shouldn't use it. Either use the appropriate tag (if one exists) or use an anonymous container (such as <div> or <span>) and mark up the contents with CSS.

There are lots of good tags: <address> <cite> <q> <blockquote> <code>
But there are also lots of useless tags: <font> <i> <b> <u>

dnimrodx

11:46 pm on Feb 8, 2004 (gmt 0)

10+ Year Member



If you're only using the tag for presentational purposes -- then you shouldn't use it.

That's what I wanted to know. My main concern is to produce pages compliant with the W3C norms and, for what I know, CSS should be used whenever possible. (?)

There are lots of good tags: <address> <cite> <q> <blockquote> <code>

You can't really 'live' without them. :)

But there are also lots of useless tags: <font> <i> <b> <u>

Thanks for clarifying me doc. That's what I wanted to know.

Thanks a lot.