By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,594 Members | 3,291 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,594 IT Pros & Developers. It's quick & easy.

ordered list fonts

P: n/a
Apparently, surrounding an ordered list by a font command is illegal.
So how do I specify the font style and size for the list elements?
Putting font tags on each list item works, except that the list
numbers don't display in that font.

Invalid, but it works on all (most?) browsers:

<font face="Arial" size=2>
<ol>
<li>List Item A<br>
<li>List Item B<br>
</ol>
</font>

Valid, but the list numbers aren't displayed in the font:

<ol>
<li><font face="Arial" size=2>List Item A</font><br>
<li><font face="Arial" size=2>List Item B</font><br>
</ol>
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
In article <70**************************@posting.google.com >,
pr*******@hotmail.com (Ken Innes) wrote:
I do use CSS, but I want the page to look good without it too.


The nature of CSS is that the user has control. If he does not like what
you like as the author, he disables it and it will look different. One
step further and he applies his own stylesheet to override yours.

Basically, you should stick to CSS for presentation. All other is
off-limits (and most of the time invalid as well) when it comes to
presentational fluff.

--
Kris
kr*******@xs4all.netherlands (nl)
"We called him Tortoise because he taught us" said the Mock Turtle.
Jul 20 '05 #2

P: n/a
pr*******@hotmail.com (Ken Innes) wrote:
I can put the font tags between <li></li>, but it says putting them
between <ol></ol> is invalid.
What "it"? And what does your message relate to? Please learn to quote
properly. Upside-down fullquoting sends the message that you have not
actually cared to read what you quote and to indicate what you are
commenting on.
Does this basically mean that,
according to W3C, it is absolutely impossible to change the font of
ordered list numbers without using Cascading Style Sheets?
Yes. Besides, CSS is not guaranteed to affect the numbers either.
It is just one possible interpretation that font-size affects the
numbers (though a natural one).
I do like CSS, but I want my page to look good without them too.
You presumably have not understood what CSS, and you keep repeating
that.
This seems unnecessarily limiting.
Actually, HTML should have _no_ markup for presentational issues. It
just crept in.
And both of the "invalid" ways of
doing it will work on all browsers I've tried (IE, Netscape,
Mozilla, Opera).
Consider it an error that will hopefully be fixed soon.
<font face="Arial" size=2>


Your real problem is probably your fixed idea of making the list appear
in smaller font - namely smaller than the user has chosedn.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #3

P: n/a
Please don't post upside down, and please do trim your quotes.
http://oakroadsystems.com/genl/unice.htm

In article <70**************************@posting.google.com > in
comp.infosystems.www.authoring.html, Ken Innes
<pr*******@hotmail.com> wrote:
I can put the font tags between <li></li>, but it says putting them
between <ol></ol> is invalid.
Pretty much anything _except_ <li> is invalid as a direct child of
<ol>.
Does this basically mean that, according
to W3C, it is absolutely impossible to change the font of ordered list
numbers without using Cascading Style Sheets?


Yes. (Was my earlier answer, which you quoted, _really_ that
obscure?)

--
Stan Brown, Oak Road Systems, Cortland 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/
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #4

P: n/a
Ken Innes pounced upon this pigeonhole and pronounced:

I said this:
Discover CSS.

In the <head> or your style sheet:

<style type="text/css">
li { font-family: arial, sans-serif }
<style

The HTML:

<ol>
<li>List Item A</li>
<li>List Item B</li>
</ol>

Close the item with </li>, not <br>.
I do use CSS, but I want the page to look good without it too.


Chances are any visitors that don't see your CSS will not make use of your
<font> tags either, as they would likely be using text browsers.

Have you tried the above?

--
-bts
-This space intentionally left blank.
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.