HTML Font Size: Meaning & Equivalence to Word Processor

  • Thread starter Math Is Hard
  • Start date
  • Tags
    Font Html
In summary, the font size in HTML is defined by a scale from 1-7, with 1 being equivalent to 10 pixels and 6 being 30 pixels. However, using the <font> tag is deprecated and it is recommended to use CSS instead to control the font size.
  • #1
Math Is Hard
Staff Emeritus
Science Advisor
Gold Member
4,652
37
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
  • #2
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...
 
  • #3
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
 
  • #4
ok, thanks.
 

1. What is the default font size in HTML?

The default font size in HTML is 16px. This means that the text you see on a webpage is 16 pixels tall.

2. How is font size measured in HTML?

Font size in HTML is measured using pixels (px), ems (em), or percentages (%). Pixels are an absolute measurement, while ems and percentages are relative measurements that can change based on the font size set for the parent element.

3. How does HTML font size compare to a word processor?

In HTML, font size is measured in pixels, while in a word processor, it is measured in points. 1 pixel is equivalent to 0.75 points, so a font size of 16px in HTML would be equivalent to 12pt in a word processor.

4. Can I use any font size in HTML?

Yes, you can use any font size in HTML, as long as it is a whole number. Decimal values are not accepted for font sizes in HTML.

5. How can I change the font size for specific elements in HTML?

You can change the font size for specific elements in HTML by using the CSS "font-size" property. This property allows you to specify a different font size for individual elements or groups of elements on your webpage.

Similar threads

  • Sci-Fi Writing and World Building
2
Replies
37
Views
2K
  • Sticky
  • Science and Math Textbooks
Replies
27
Views
3K
  • Introductory Physics Homework Help
Replies
4
Views
149
Replies
4
Views
565
  • Sticky
  • Science and Math Textbooks
Replies
9
Views
4K
  • Atomic and Condensed Matter
Replies
5
Views
1K
  • Special and General Relativity
Replies
28
Views
2K
  • Special and General Relativity
Replies
6
Views
1K
  • STEM Academic Advising
Replies
7
Views
1K
Replies
7
Views
1K
Back
Top