font-size property
Specifies the font size of the text.
JavaScript page for this property: fontSize. You can find other example(s) there. |
Possible values:
One of the following values:
The size of the font in length units. For the supported length units, see the length page. | |||||||
The size is the specified percentage of the parent element's font size. | |||||||
Equivalent to a value of 1 for the size property of a font tag. | |||||||
Equivalent to a value of 2 for the size property of a font tag. | |||||||
Equivalent to a value of 3 for the size property of a font tag. | |||||||
Equivalent to a value of 4 for the size property of a font tag. | |||||||
Equivalent to a value of 5 for the size property of a font tag. | |||||||
Equivalent to a value of 6 for the size property of a font tag. | |||||||
Equivalent to a value of 7 for the size property of a font tag. | |||||||
Increase the text size by one relative unit. | |||||||
Decrease the text by one relative unit. | |||||||
Equivalent to the 48px font-size. | |||||||
Takes the value of this property from the computed style of the parent element. |
Default: medium.
Example HTML code 1:
This example illustrates the use of the font-size property:
|
||||
<head> <style> .font12 { font-size: 12px; } .font24 { font-size: 24px; } </style> </head> <body> <span class="font12">font-size: 12px;</span><br /> <span class="font24">font-size: 24px;</span> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by tags:
a, abbr, acronym, address, b, baseFont, bdo, big, blink, blockQuote, body, button, caption, center, cite, code, col, colGroup, dd, del, dfn, dir, div, dl, dt, em, fieldSet, font, form, H1, H2, H3, H4, H5, H6, html, i, input:button, input:file, input:password, input:reset, input:search, input:submit, input:text, ins, isIndex, kbd, label, legend, li, listing, marquee, menu, nobr, ol, optGroup, option, p, plainText, pre, q, rt, ruby, s, samp, select, small, span, strike, strong, sub, sup, table, tBody, td, textArea, tFoot, th, tHead, tr, tt, u, ul, var, xmp
Related pages:
color
font
font-family
font-size-adjust
font-style
font-variant
font-weight
text-align
text-align-last
text-autospace
text-decoration
text-indent
text-justify
text-kashida-space
text-overflow
text-shadow
text-transform
text-underline-position
font
font-family
font-size-adjust
font-style
font-variant
font-weight
text-align
text-align-last
text-autospace
text-decoration
text-indent
text-justify
text-kashida-space
text-overflow
text-shadow
text-transform
text-underline-position
External links:
font-size (MSDN)
font-size (Mozilla Developer Center)
font-size (Safari Reference Library)
font-size (W3C)
font-size (Mozilla Developer Center)
font-size (Safari Reference Library)
font-size (W3C)
User Contributed Comments