How to use fonts in our website?


Planning websites alos includes choosing typography. Font is everything is about the type from the weight, size and line height and so on.
The generic font-family is
i) Serif
ii) Sans-serif
iii) Script
iv) Monospace
v) Fantasy
Sans serif fonts are most widely used for content on web. They are readable and common to all operating systems.
Serif fonts are best used in print style sheets because serif fonts can be difficult to read on monitors. It is most apt for printable documents in website though.
Serif fonts have small lines at the ends on some characters. Sans-serif do not have lines at the ends of the characters.
Monospace fonts can be used when spacing of the content is on the focus such as with pre-formatted text.
Script fonts are best used for signatures and cursive handwriting is needed.
Fantasy fonts are used for artistic texts.
Font families in CSS
Font styles in CSS

While defining the font-families in CSS define it properly.
When defining the typeface to display always use a list of fonts is called font stack. Always define the most preferred font first. And mention the backup fonts. The website can be accessed from wide range of devices. The fonts you have used may not be displayed in any of the devices. At those cases, the backup fonts can be used for displaying. It is referred as the “fallback system”. Always define the generic families you’ll be using before deciding the specifics like size, actual typeface.





CSS styles for defining the font family can be:
p{
   font-family: “Times New Roman” , Georgia, Serif;
  }
   
Start the value declarations with the desired font-family and end with the generic family name paving way for fallback system.

Comments

Popular posts from this blog

What are some mistakes people make when they start learning HTML, CSS and JavaScript?

How to initialize Datatable plugin?

Datatables.net - Plugin options