470,561 Members | 2,183 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,561 developers. It's quick & easy.

How to apply a style without using <font>?

Hi all,

One can connect a CSS style to a HTML tag. I want to create a text in
the style footer. I can do:

<font class="footer">Here is my great footer.</font>

However, the <font> tag is depreciated in HTML 4.0 and I would like to
stick to the rules as much as possible. I tried to create my own tag
(see below), but that did not work. I do not want to use <p> or
<table> in this case.

<footer>Here is my great footer.</footer>

What can I do?

Thank you in advance,
Louis.
Please post to this newsgroup, email may not reach me.

Jul 20 '05 #1
7 2822
Louis. wrote:
Hi all,

One can connect a CSS style to a HTML tag. I want to create a text in
the style footer. I can do:

<font class="footer">Here is my great footer.</font>

However, the <font> tag is depreciated in HTML 4.0 and I would like to
stick to the rules as much as possible. I tried to create my own tag
(see below), but that did not work. I do not want to use <p> or
<table> in this case.

<footer>Here is my great footer.</footer>

Why not <p class="footer">???</p> The styling for class="footer" can be
placed after the <p> styling in the css file and override everything
declared.

--
TK
www.wejuggle2.com
Still Having a Ball


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 20 '05 #2
Louis. <lo***@despammed.com> wrote:
One can connect a CSS style to a HTML tag. I want to create a text in
the style footer. I can do:

<font class="footer">Here is my great footer.</font>

However, the <font> tag is depreciated in HTML 4.0
deprecated not depreciated, though it is that as well.
and I would like to
stick to the rules as much as possible. I tried to create my own tag
(see below), but that did not work. I do not want to use <p> or
<table> in this case.


What is the footer? It's probably not a paragraph or a table so <p> or
<table> would indeed be poor choices. Is it a division of your page?
In that case the <div> element would make the most sense.
However, as straight replacement for <font> the <span> element is
simplest.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #3
"Louis." <lo***@despammed.com> wrote in
comp.infosystems.www.authoring.stylesheets:
One can connect a CSS style to a HTML tag. I want to create a text in
the style footer. I can do:

<font class="footer">Here is my great footer.</font>

However, the <font> tag is depreciated in HTML 4.0 and I would like to
stick to the rules as much as possible.


"span" and "div" are the tags you want. Use "span" for text level
(in the middle of a paragraph, say) and "div" for block level.

If you have a footer then probably it's outside the normal text flow
and you want
<div class="footer">I use Dr.Scholl's.</div>
I have a class "key" for key words and phrases, so I might wrote
something like
<p>When your statistical test fails to reject H<sub>o</sub>,
you must write your conclusion in <span class="key">neutral
language</span>.</p>

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #4
"Stan Brown" <th************@fastmail.fm> wrote in
comp.infosystems.www.authoring.stylesheets:
"span" and "div" are the tags you want. Use "span" for text level
(in the middle of a paragraph, say) and "div" for block level.
I should add that you use "span" and "div" when no other tag is more
appropriate. For instance, <font> is wildly inappropriate to mark a
footer. <p> might make sense, but if the footer is multiple
paragraphs then you'd need to wrap all of them in a <div>.

But in my example <p>When your statistical test fails to reject H<sub>o</sub>,
you must write your conclusion in <span class="key">neutral
language</span>.</p>


it could be as good -- maybe better -- to use the "strong" tag since
any browser will then show some emphasis:

<p>When your statistical test fails to reject H<sub>o</sub>,
you must write your conclusion in <strong class="key">neutral
language</strong>.</p>

And in fact that's what I actually do. I was trying to keep things
simple in my earlier note.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #5
In our last episode,
<00********************************@4ax.com>,
the lovely and talented Louis
broadcast on comp.infosystems.www.authoring.stylesheets:
Hi all, One can connect a CSS style to a HTML tag. I want to create a text in
the style footer. I can do: <font class="footer">Here is my great footer.</font> However, the <font> tag is depreciated in HTML 4.0 and I would like to
stick to the rules as much as possible. I tried to create my own tag
(see below), but that did not work. I do not want to use <p> or
<table> in this case. <footer>Here is my great footer.</footer> What can I do?


Use <span> or if you mean it to be a block element, use <div>
--
Lars Eighner -finger for geek code- ei*****@io.com http://www.io.com/~eighner/
If it wasn't for muscle spasms, I wouldn't get any exercise at all.
Jul 20 '05 #6
Thank you kindly. I did not know about span and div. I looked into it
and started using it. Works great.

Louis.

On Sun, 25 Jul 2004 08:58:12 -0400, Stan Brown
<th************@fastmail.fm> wrote:
"Stan Brown" <th************@fastmail.fm> wrote in
comp.infosystems.www.authoring.stylesheets:
"span" and "div" are the tags you want. Use "span" for text level
(in the middle of a paragraph, say) and "div" for block level.


I should add that you use "span" and "div" when no other tag is more
appropriate. For instance, <font> is wildly inappropriate to mark a
footer. <p> might make sense, but if the footer is multiple
paragraphs then you'd need to wrap all of them in a <div>.

But in my example
<p>When your statistical test fails to reject H<sub>o</sub>,
you must write your conclusion in <span class="key">neutral
language</span>.</p>


it could be as good -- maybe better -- to use the "strong" tag since
any browser will then show some emphasis:

<p>When your statistical test fails to reject H<sub>o</sub>,
you must write your conclusion in <strong class="key">neutral
language</strong>.</p>

And in fact that's what I actually do. I was trying to keep things
simple in my earlier note.


Jul 20 '05 #7
*Louis.* <lo***@despammed.com>:

One can connect a CSS style to a HTML tag.
No.
I tried to create my own tag
Funny what people try to do instead of reading up on the matter.
I do not want to use <p> or <table> in this case.
Depending on what your footer contains, 'address' may be the most
appropriate element. Anyway, why do you post such a mark-up question to
ciwas instead of ciwah?
Please post to this newsgroup,


Sure, who would do differently?

--
Save the whales, eat more dolphins!
Jul 20 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Darren Li | last post: by
3 posts views Thread by Dan Jacobson | last post: by
1 post views Thread by Jukka K. Korpela | last post: by
17 posts views Thread by teser3 | last post: by
1 post views Thread by livre | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.