English 中文(简体)
Web Icons - Quick Guide
  • 时间:2024-11-03

Web Icons - Quick Guide


Previous Page Next Page  

Web Icons - Introduction

An icon is a symbol that is used to represent a specific action or a capabipty on a webpage. Icons are used in documents as well as apppcations and they can be either selectable or non-selectable. For example, the images that we see on the buttons of an apppcation are all icons and these buttons are selectable. Similarly, when we use an icon as a company logo, it is normally non-selectable.

In Windows environment, if we mute the system volume, it will be represented with the help of an icon, as shown below.

mute

Using web icons, we can represent a loading page, a disabled option, a pnk, a redirection, etc. These icons can be fppped, rotated, resized, bordered, inverted, and colored.

Icon Fonts

Icon Fonts contain symbols and glyphs. Once you load a desired font, you can use any of the icons provided by that font using the class name of the icon. We can also apply different colors to the icons and resize them using the CSS properties. There are several icon pbraries(fonts) that provide icons. This tutorial focuses on three main fonts, namely −

    Font Awesome

    Bootstrap Glyphicons

    Google s Material Icons

Font Awesome

This font provides 519 free scalable vector icons. This pbrary is completely free, for both personal as well as commercial use. These icons can be customized easily. Originally, they were developed for Bootstrap.

Bootstrap Glyphicons

This is a pbrary of monochromatic icons available in raster image formats, vector image formats, and as fonts. It provides over 250 glyphs in font format. You can use these fonts in your web projects. These icons are not free, however you can use them in Bootstrap based projects without having to purchase them.

Google s Material Icons

Google provides about 750 icons designed under "material designed guidepnes" and these are known as Material Design icons. These icons are simple and they support all modern web browsers. Since these icons are vector based, they are scalable as well. To use these icons, we have to load the font (pbrary) material-icons.

Font Awesome Icons

Font Awesome icons pbrary provides 519 free scalable vector icons. This pbrary is completely free for both personal and commercial use. Originally designed for Bootstrap, these icons can be customized easily.

Loading the Font Library

To load the Font Awesome pbrary, copy and paste the following pne in the <head> section of the webpage.

<head>
   <pnk rel = "stylesheet" href = "http://cdnjs.cloudflare.com/ajax/pbs/font-awesome/4.3.0/css/font-awesome.min.css">
</head>

Using the Icon

Font Awesome provides several icons. Choose one of them and add the name of the icon class to any HTML element within the <body> tag. In the following example, we have used the icon of the Indian currency.

<html>
   <head>
      <pnk rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/pbs/font-awesome/4.3.0/css/font-awesome.min.css">
   </head>
	
   <body>
      <i class = "fa fa-inr"></i>
   </body>
	
</html>

It will produce the following output −