Learn CSS #24

CSS Icons


Icons can easily be added to your HTML page, by using an icon library.


How To Add Icons

The simplest way to add an icon to your HTML page, is with an icon library, such as Font Awesome.

Add the name of the specified icon class to any inline HTML element (like <i> or <span>).

All the icons in the icon libraries below, are scalable vectors that can be customized with CSS (size, color, shadow, etc.)


Font Awesome Icons

To use the Font Awesome icons, go to fontawesome.com, sign in, and get a code to add in the <head> section of your HTML page:

<script src="https://kit.fontawesome.com/yourcode.js" crossorigin="anonymous"></script>

Note: No downloading or installation is required!

Example

<!DOCTYPE html>
<html>
<head>
<script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
</head>
<body>

<i class="fas fa-cloud"></i>
<i class="fas fa-heart"></i>
<i class="fas fa-car"></i>
<i class="fas fa-file"></i>
<i class="fas fa-bars"></i>

</body>
</html>

Bootstrap Icons

To use the Bootstrap glyphicons, add the following line inside the <head> section of your HTML page:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

Note: No downloading or installation is required!

Example

<!DOCTYPE html>
<html>
<head>
<link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css”>
</head>
<body>

<i class=”glyphicon glyphicon-cloud”></i>
<i class=”glyphicon glyphicon-remove”></i>
<i class=”glyphicon glyphicon-user”></i>
<i class=”glyphicon glyphicon-envelope”></i>
<i class=”glyphicon glyphicon-thumbs-up”></i>

</body>
</html>

Result:


Google Icons

To use the Google icons, add the following line inside the <head> section of your HTML page:

<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">

Note: No downloading or installation is required!

Example

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
</head>
<body>

<i class="material-icons">cloud</i>
<i class="material-icons">favorite</i>
<i class="material-icons">attachment</i>
<i class="material-icons">computer</i>
<i class="material-icons">traffic</i>

</body>
</html>

Categories

269 Responses

  1. Read information now. Everything what you want to know about pills.
    ivermectin ebay
    drug information and news for professionals and consumers. Some are medicines that help people when doctors prescribe.

  2. Comprehensive side effect and adverse reaction information. Drug information.
    how to buy levaquin online
    drug information and news for professionals and consumers. Prescription Drug Information, Interactions & Side.

  3. drug information and news for professionals and consumers. п»їMedicament prescribing information. https://avodart.science/# can i get generic avodart without prescription
    Get warning information here. Read now.

  4. Get warning information here. Comprehensive side effect and adverse reaction information.
    https://clomiphenes.com can i order generic clomid for sale
    earch our drug database. Actual trends of drug.

  5. Commonly Used Drugs Charts. earch our drug database.
    top ed drugs
    Some are medicines that help people when doctors prescribe. Commonly Used Drugs Charts.

  6. Comprehensive side effect and adverse reaction information. Comprehensive side effect and adverse reaction information.
    ed medications
    Drug information. Some trends of drugs.

  7. Actual trends of drug. Everything what you want to know about pills.
    ed treatments
    Best and news about drug. п»їMedicament prescribing information.

  8. Get information now. safe and effective drugs are available.
    viagrapills
    п»їMedicament prescribing information. п»їMedicament prescribing information.

  9. Comprehensive side effect and adverse reaction information. safe and effective drugs are available.
    buy tadalafil 20
    Read here. Learn about the side effects, dosages, and interactions.

Leave a Reply

Your email address will not be published. Required fields are marked *