473,378 Members | 1,400 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,378 software developers and data experts.

Meaning of <font> without attributes

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 <fonttag would
make it dummy, no-op. But I just realized that IE 7 doesn't behave that way.
If I have

<big>foo <font>bar</font</big>

then bar appears as smaller than bar. Apparently, the browser implies
size="3". Is this acceptable by the specifications?

If I have

<big>foo <font color="red">bar</font</big>

then foo and bar appear in the same size, i.e. size="3" is _not_ implied by
the browser. This is not consistent at all, of course. Apparently someone
that since <fontalone does not make sense, some attribute needs to be
implied. (Yet <fontcould be used for styling and in scripting, or it might
be a holdover after the intentional removal of attributes.)

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Dec 15 '06 #1
1 2065

Jukka K. Korpela wrote:
If I have

<big>foo <font>bar</font</big>

then bar appears as smaller than bar. Apparently, the browser implies
size="3". Is this acceptable by the specifications?
Why does it matter? If you're concerned with refactoring legacy code,
then the behaviour that matters as your initial state is the actual
behaviour of the browser, not the expected behaviour from the
specification.

Dec 15 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Matt Adams | last post by:
I want define for a couple of words inside a longer text with different font specifications. I declared it like: ....text before.... <FONT class=aaa> these text should get other attributes...
7
by: Louis. | last post by:
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...
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...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.