views:

64

answers:

3

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?

+3  A: 

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.

Sarfraz
+1 for keeping up to date.
Ben
+1  A: 

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.

Matthew Crumley
+1  A: 

Adding onto the answers that exist. Inline styling is usually frowned upon, because:

  1. In huge HTML pages, this can cause a maintenance nightmare for anyone that has to maintain it.
  2. Does not separate content from design.
  3. They add unnecessary length to the HTML page.
Russell Dias