H I O X INDIA
FREE CSS Tutorial
 HOME  ||  Scripts  ||  Purchase  ||  Tutorials  ||  Images  ||  Tools  ||  Templates 
  :-)  Send Page   :-)   Feedback   :-)   Register   :-)   Links   :-)   Support   :-)
Español Français 中文 Deutsch Portuguese Japanese தமிழ்
 Forums   Hosting   Internet Stats   Easy Calculation   FUN Games 

CSS Topics
Introduction
Types
Background Properties
Text Properties
Font Properties
BOX Properties
Border Properties
Margin Properties
Padding Properties
Special Topics
Ask Your Doubts
More about CSS
Feedback





CSS Font Weight


Topic

To create bold or bolder or lighter weight font in html using style sheet.



Explanation

Property: Font Weight

Usage:
font-weight: bold;
font-weight: bolder;
font-weight: light;
font-weight: lighter;
font-weight: 100;
font-weight: normal;

Definition:
This parameter controls the weight or boldness of the font. We can make the font look lighter or bolder.
It takes the following values.
a)bold : It makes the font to look bold.
b)bolder : It makes the font to look bolder.
c)light : It makes the font to look light.
d)lighter : It makes the font to look lighter.
e)100 to 900 : The fonts boldness can be set using values as 100 or 200 or 300 or 400 or 500 or 600 or 700 or 800 or 900.
f)normal : It sets the fonts as normal fonts.

Example 1:
<div style="font-weight: bold;">testing font weight</div>

Result:
testing font weight


Example 2:
<div style="font-weight: bolder;">testing font weight</div>

Result:
testing font weight


Example 3:
<div style="font-weight: light;">testing font weight</div>

Result:
testing font weight


Example 4:
<div style="font-weight: lighter;">testing font weight</div>

Result:
testing font weight


Example 5:
<div style="font-weight: 800;">testing font weight</div>

Result:
testing font weight


Example 6:
<div style="font-weight: normal;">testing font weight</div>

Result:
testing font weight








A Note
CSS - Cascading Style Sheets can be used along with html tags as explained in this site. This simple CSS will help you to create much elegant and neat html web pages. This does not need any additional softwares or codings. All web browser are capable of handing CSS codes.

Note 2: If required you can using <span> instead of <div> tags. div tag will start and end on new lines. span will not exceed the tag area.


privacy policy     license     sitemap
© 2004-2010 HIOX INDIA