visitor activity monitorvisitor activity monitor

PROJECT CODE

                                            The Developers Choice!!!!
                                                                                                            Home | About Us | Contact Us

CSS TUTORIALS

Fonts:

What is Font Family in CSS
In CSS, a font-family (or face in HTML) consists of a set of related fonts, grouped as font families.
For example, the Times family includes different font sizes, styles (like roman and italic), and weight (like regular and bold).
The web browser will only be able to apply a font if it is available on the system on which it operates, which is not always the case.
HTML code writers may list in preferential order font families to use when rendering text.
The font list is separated by commas (as shown above). To avoid unexpected results, the last font family on the font list should be one of the five generic families which are by default always available in HTML and CSS.
In the absence of a font being found, the web browser will use its default font, which may be a user-defined one.
Depending on the web browser, a user can in fact override the font defined by the code writer. This may be for personal taste reasons, but may also be because of some physical limitation of the user, such as the need for a larger font size or the avoidance of certain colors.
What is Font Style
he font-style property is mostly used to specify italic text.
This property has three values:
  • normal - The text is shown normally
  • italic - The text is shown in italics
  • oblique - The text is "leaning" (oblique is very similar to italic, but less supported)
How to implement Font Style
Example
p.normal {
font-style: normal;
}
p.italic {
font-style: italic;
}
p.oblique {
font-style: oblique;
}
What is Font Size

The font-size property sets the size of the text.
Being able to manage the text size is important in web design. However, you should not use font size adjustments to make paragraphs look like headings, or headings look like paragraphs.
Always use the proper HTML tags, like </h1> - </h6> for headings and </p> for paragraphs.
The font-size value can be an absolute, or relative size.
Absolute size:

  • Sets the text to a specified size
  • Does not allow a user to change the text size in all browsers (bad for accessibility reasons)
  • Absolute size is useful when the physical size of the output is known
Relative size:
  • Sets the size relative to surrounding elements
  • Allows a user to change the text size in browsers
How to Set Font Size With Pixels

Setting the text size with pixels gives you full control over the text size:
Example
h1 {
font-size: 20px;
}
h2 {
font-size: 30px;
}
p {
font-size: 10px;
}

All Rights Reserved with Project code