HTML/CSS HTML Font Size: Meaning & Equivalence to Word Processor

  • Thread starter Thread starter Math Is Hard
  • Start date Start date
  • Tags Tags
    Font Html
Click For Summary
The discussion clarifies that the font size specified in the deprecated <font> tag, such as <font size="3">, does not have a direct equivalent in point size like "14 point" in word processors. Instead, it corresponds to an arbitrary pixel approximation, where size "3" is roughly 16 pixels. However, the use of the <font> tag is discouraged as it is outdated. Modern web design should utilize CSS for defining font sizes, allowing for more flexibility with units like points (pt), em, and pixels (px). Ultimately, CSS is recommended for controlling typography effectively.
Math Is Hard
Staff Emeritus
Science Advisor
Gold Member
Messages
4,650
Reaction score
39
When you set a font size with font tags like:

<font size="3">Word</font>

Does this have an equivalent "point size" like "14 point" in a word processor? I'm confused about what the size in the tag means.

Thanks.
 
Technology news on Phys.org
Math Is Hard said:
When you set a font size with font tags like:

<font size="3">Word</font>

Does this have an equivalent "point size" like "14 point" in a word processor? I'm confused about what the size in the tag means.

Thanks.

the approximation of the deprecated font sizes in pixels:

1 = 10px
2 = 12px
3 = 16px
4 = 18px
5 = 24px
6 = 30px

However you should not be using the FONT tag anymore. Look into CSS. You can define many ways like pt, em, px...
 
No it's an arbitrary scale from 1-7, it's upto the browser to decide how big to draw it.
If you care about how it looks you have to use CSS - which you should use anyway <font> is deprecated
 
ok, thanks.
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 5 ·
Replies
5
Views
1K