473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 2901
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Pete Mahoney | last post by:
I am trying to 'POST' values from a form in a ASP file that has anonymous access permissions. I can retrieve the form values when I redirect to this page from another page which has also has...
2
by: Harry | last post by:
how to convert <font/> tab in .NET framework? e.g. if i want to write the follow html in code behind, what i can do? <font class="css">cell 1</font>
2
by: Nicky | last post by:
hi, all I know we can do this by some jscript. But is there a way to do it in asp.net c# code? In our project, users could sumit a piece of html code and I need to remove all html tag out. What's...
1
by: Weixiao Fan | last post by:
as we know , FONT is not availble for XHTML standard . but VS.NET 2003 add it automatically. what can I do to make all the BODY , TD , FONT and so on to body ,td ? and don`t let it add <FONT>...
0
by: Darren Li | last post by:
Hi: Can I stop VS.NET 2003 IDE automatically insert <font> tag into the asp.net web form design view? It just keep inserting that tag with the font I don't want to use. I search document...
3
by: Darren Li | last post by:
Hi: Can I stop VS.NET 2003 IDE automatically insert <font> tag into the asp.net web form design view? It just keep inserting that tag with the font I don't want to use. I search document...
3
by: Dan Jacobson | last post by:
Let's say all one can do to override a document's link colors, <a href="FAQ.aspx"><font color="#0000ff">FAQ</font></a> is inject things like: <a href="FAQ.aspx"><span style="color:green"><font...
1
by: Jukka K. Korpela | last post by:
This is pretty theoretical, but it might matter if you convert existing HTML documents to more modern style, getting rid of <fontmarkup. One might expect that just removing all attributes from a...
17
by: teser3 | last post by:
I can put out a Word Doc from PHP but if I try and manipulate the font size in the PHP part it outputs a blank Word Document. Here is what I have: <?php $fname="report.doc"; $handle = fopen(...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.