How can we increase the font size in html?
<font face="Garamond" size="7">
up to this size only it is working. Is there any way to increase the size开发者_开发知识库 of the font?
You can use the font-size
css property: Example
<span style="font-size:20px;">This is large Text...</span>
There is also <font>
tag but it is deprecated.
The largest size the font tag supports is 7. If you need it to be larger, you will have to use CSS, which you should probably be using anyway because the font element is deprecated.
The CSS font-size
values, xx-small
, x-small
, small
, medium
, large
, x-large
, and xx-large
are comparable to <font size="1">
through <font size="7">
if you want to specify the size like that, but you would run into the same size limitation. The more typical way is to use px
or pt
for absolute sizes, and %
or em
for relative sizes.
Adding onto the answers that exist. Inline styling is usually frowned upon, because:
- In huge HTML pages, this can cause a maintenance nightmare for anyone that has to maintain it.
- Does not separate content from design.
- They add unnecessary length to the HTML page.
精彩评论