Skip to main content

CSS Font Family

We observe many different font types in word editors, email texts, web pages etc.

We can achieve the different font types using the font-family attribute in CSS.

Font-Family
The font-family names can be classified into two types:
  1. Generic family
  2. Font family
1. Generic family
     The generic family is the default fonts installed in the machine.

Why use generic?
They can be used as backup, if the font used by one is not installed in a particular machine.

2. Font Family
     These font family is all the rest of the fonts which can be used to design the font types in a webpage.


Here is a sample program showcasing the font-family attribute.

1:  <?xml version = "1.0" encoding="utf-8"?>   
2:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">   
3:  <html xmlns = "http://www.w3.org/1999/xhtml">   
4:  <head>  
5:  <title>CSS Styling</title>  
6:  </head>  
7:  <body>  
8:  <p class="red">  
9:  Red  
10:  </p>  
11:  <p class="blue">  
12:  Blue  
13:  </p>  
14:  <p class="green">  
15:  Green  
16:  </p>  
17:  <style>  
18:  p.red  
19:  {  
20:  color:red;  
21:  font-size:20px;  
22:  font-weight:normal;  
23:  font-family:cursive;  
24:  }  
25:  p.blue  
26:  {  
27:  color:blue;  
28:  font-size:40px;  
29:  font-style:italic;  
30:  font-family:Lucida Console;  
31:  }  
32:  p.green  
33:  {  
34:  color:green;  
35:  font-size:60px;  
36:  font-weight:bolder;  
37:  font-family:Arial  
38:  }  
39:  </body>  
40:  </html>  

Comments

Popular posts from this blog

SMITE Open Beta Review

The developers of Global Agenda and Tribes: Ascend have yet another major offering to keep you glued to your screens, now providing an opportunity to play 'Mythological Godlike avatars' in their latest offering called Smite. Placing yourself in the shoes of the 'Almighty' or a bunch of them 'All Mighty' if I might say, itself should give you an idea of what herculean tasks you would be asked to handle. The feeling of 'omnipotence' brings an exceptional nature to this game. Limitless flow of power is just a part of the experience, but having an ultimate command over it and other such myriad abilities can seal the deal for you. Spell slingers, knights in shining armor, snoopy hunters, shady assassins, brute warriors are the new God lineages here. Outgrowing heightened expectations is the least things you should expect as this mythological battlefield resides over the whole wide internet. Teleporting, Flying, Sprinting, and digging, you will have ...

OpenGL Games

OpenGL is technology that enables the user to create graphics by literally joining dot by dot (technically pixel by pixel). The Open GL graphics libraries enable the user to use the language of their own preference such as C,C++,Java,Python and so on to create the graphics and animate their still pictures. So which are the games that are built using the OpenGL libraries. There are many old as well as new games that have been built upon the OpenGL graphics libraries.They are as well as heavy duty FPS games as well as the day to day addictive mobile games. Some of them are as enlisted below. Fans of these games may be many but do you know that these were built using the OpenGL libraries. 1) AngryBirds                                                           Angry Birds   Who does not know the AngryBirds game? Angry Birds ...

Games-Fun for all

Game is an activity generally dealt with at leisure times and for amusement. We have been carrying out this activity from it's inception, since our childhood and the childhood of the information era. Games were more prominently played in the real world between people in real time without any artificial intelligence, but after the information age we started to play with the artificial intelligent systems. Let us have a look how the games have modified themselves or they have not. Games were "fun for all" when they were played without artificial intelligence. The digital information cannot remain still, it requires a steady flow as the water takes away the yatch on a wonderful and pleasant journey though intelligently handed mast by a sailor navigating it's way to it's destination. It requires both flow and navigation, i.e. interface and content. Earlier the television and the hardware encapsulated the null void , now it is slowly getting encapsulated by th...