Fonts

Font Family, Weight, and Style

These examples will simply show the CSS code with an assumption that external CSS is being used and that styling would apply to all of the tags referenced in the CSS.


Example: Specifying font style and family

The CSS below would make all h1 tag text italics and all paragraph text verdana font and bold.


	h1 {
		font-style: italic;
	   }
	p { 
		font-family: verdana;
		font-weight: bold;
	   }
	

Run it now

All five font styles include:

  • normal
  • italic
  • oblique
  • initial
  • inherit

All font weights include:

  • normal
  • bold
  • bolder
  • lighter
  • One of the following numeric values: 100, 200, 300, 400, 500, 600, 700, 800, 900
  • initial
  • inherit