Page 97 - DCAP408_WEB_PROGRAMMING
P. 97
Unit 4: Cascading Style Sheets
4.4 CSS Properties or Applying Style Notes
The property value delivers the specific style that should be applied to the selected element. The
values accepted depend on the particular property, and some properties accept multiple values,
separated by spaces.
A Property is an identifier. Every property has its own syntax and constraints on the values it
accepts. Property values also often indicate measurement units to aid in rendering to the specified
media.
4.4.1 Font Properties
A font is a set of glyphs, which map to known characters in one or more languages. The glyphs
within a font usually all share common characteristics such as size, style, and design. The Font
properties allow control over many different font criteria such as boldness, italics, size, and
specific or generic font name.
In CSS1, fonts were identified only by their name. If none of the fonts an author specified were
available, the browser had to resort to using default fonts. This is clearly not the best solution
when documents are available in an environment as heterogeneous as the web.
CSS2 font selection greatly expands the capabilities of browsers with respect to matching fonts
when the intended font is not available. Dozens of “font descriptors” have been introduced
which break down a desired font’s characteristics. When a desired font is not present, all of these
descriptors can be used to make an intelligent “best-choice” for an alternate font match. In the
event a best match cannot be generated, fonts may even be generated on the fly or downloaded
as needed over the web.
FONT
font-style
font-variant
font-weight
font
font-size/line-height
font-family
caption | icon | menu| message-box | small- caption | status-bar
family-name
font-family
generic-family
xx-small | x-small | small | medium | large | x-large | xx-large | smaller |
larger
font-size
length
%
font-size- None
adjust Number
normal | wider | narrower | ultra-condensed | extra- condensed | condensed
font-stretch | semi-condensed | semi- expanded | expanded | extra-expanded | ultra-
expanded
font-style normal | italic | oblique
font-variant normal | small-caps
Normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800
font-weight
| 900
LOVELY PROFESSIONAL UNIVERSITY 91