Icons Accessibility

Please Share On:

There are 17 free Font Awesome Accessibility icons. The table below shows the free font Awesome Accessibility icons:

accessible-icon


assistive-listening-systems

blind

closed-captioning

deaf

phone-volume

question-circle

tty

wheelchair

american-sign-language-interpreting



audio-description

braille

closed-captioning

low-vision

question-circle

sign-language

universal-access





You may be interested in the following topics:

CSS Icons

Please Share On:

Definition:

CSS Icons play an important role in your webpage which makes your web page look more professional and elegant. It is very easy to use CSS Icons on your web page from icon libraries like Font Awesome Icons, Bootstrap Icons, or Google Icons.

Let’s see each CSS icon uses with examples.

1) Font Awesome Icons

You can use the font-awesome icons with a single code. The step is pretty simple and easy. First of all, you need to visit the Font Awesome Icons Site which is www.fontawesome.com, create an account, and get a code of the icons you need to use. Apply the font awesome code in the header section

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.7/css/all.css">

and your icons where ever you needed.

<i class="fa fa-user" aria-hidden="true"></i>
<i class="fa fa-thumbs-up" aria-hidden="true"></i>

Source Code:

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.7/css/all.css">
</head>
<body>

<i class="fa fa-calculator" aria-hidden="true"></i>
<i class="fa fa-bus" aria-hidden="true"></i>
<i class="fa fa-comment" aria-hidden="true"></i>
<i class="fa fa-user" aria-hidden="true"></i>
<i class="fa fa-tags" aria-hidden="true"></i>
<i class="fa fa-thumbs-up" aria-hidden="true"></i>

</body>
</html>

Output:

Here, you will see the list of available Font Awesome Icons.



2) Bootstrap Icons

Like Font Awesome Icons, you need to add a bootstrap Icons script into the head section of your page.

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css">

and the icon’s code wherever you needed.

<i class="bi bi-search"></i>
    <i class="bi bi-check-circle"></i>
    <i class="bi bi-x-diamond"></i>
    <i class="bi bi-book"></i>
    <i class="bi bi-calendar-day"></i>

Source Code:

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css">
</head>
<body>

    <i class="bi bi-search"></i>
    <i class="bi bi-check-circle"></i>
    <i class="bi bi-x-diamond"></i>
    <i class="bi bi-book"></i>
    <i class="bi bi-calendar-day"></i>

</body>
</html>

Output:

Here, you will see the list of available Bootstrap Icons.



3) Google Icons

To use Google icons on your webpage, use the Google icons script inside your Html <head>.

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

and use your Google icons wherever you needed.

<i class="material-icons">backup</i>
<i class="material-icons">home</i>

Source Code:

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

<body>
<i class="material-icons">assignment_ind</i>
<i class="material-icons">backup</i>
<i class="material-icons">highlight_off</i>
<i class="material-icons">home</i>
<i class="material-icons">info</i>
</body>
</html>

Output:

Here, you will see the list of available Google Icons.



CSS Font Kerning

Please Share On:

Definition:

CSS font-kerning is used to define the space between letters.

Syntax:

font-kerning: auto | normal |none;

Property Value:

Property ValueDescription
1. autoThis is a default font-kerning. Your browser decides a font-kerning should be applied or not.
2. normalapplies font-kerning in normal spacing.
3. nonedoes not applies font-kerning.

1. auto

Definition:

This is a default font-kerning. Your browser decides a font-kerning should be applied or not.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .kerning{
      border: 3px solid black;
      background-color: pink;
      font-kerning: auto;
    }
    </style>
  </head>

  <body>
  	<div class="kerning">This is a paragraph with an auto font-kerning.</div>
  </body>
</html>

Output:

font-kerning: auto;

2. normal

Definition:

This property value applies font-kerning in normal space.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .kerning{
      border: 3px solid black;
      background-color: pink;
      font-kerning: normal;
    }
    </style>
  </head>

  <body>
  	<div class="kerning">This is a paragraph with a normal font-kerning.</div>
  </body>
</html>

Output:

font-kerning: normal;



3. none

Definition:

This property value does not apply font-kerning and also removes the previously defined font-kerning.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .kerning{
      border: 3px solid black;
      background-color: pink;
      font-kerning: none;
    }
    </style>
  </head>

  <body>
  	<div class="kerning">This is a paragraph with a none font-kerning.</div>
  </body>
</html>

Output:

font-kerning: none;


Donate to support writers


You may be interested in the following topics:

CSS Font Weight

Please Share On:

Definition:

CSS font-weight is used to set the boldness of the font. Its property values are normal, bold, bolder, lighter, or defined in hundreds like 100, 200, 300,…. up to 900. 100 is the lightest, 400 is the normal font-weight and 700 is the same as bold value.

Syntax:

font-weight: normal | bold | bolder | lighter | 100 |200 | 300 | 400 | 500 | 600 | 700 | 800 | 900

Property Value:

Property ValueDescription
1) normalThis is a default font weight, where browsers display normal fonts.
2) boldThis property value defines the thickness of the font.
3) bolderThis property value defines thicker fonts
4) lighterThis property value defines the lighter fonts.
5) NumbersDefines in number like 100, 200,300,400,500,600,700,800 and 900.
5.1) 100100 is the lighter font-weight
5.2) 200200 is a little bolder than 100 & little lighter than 300.
5.3) 300300 is a little bolder than 200 & little lighter than 400.
5.4) 400400 is the same as a normal font-weight
5.5) 500500 is a little bolder than 400 & little lighter than 600.
5.6) 600600 is a little bolder than 500 & little lighter than 700.
5.7) 700700 is the same as bold font-weight
5.8) 800800 is a little bolder than 700 & little lighter than 900.
5.9) 900900 is the bolder font-weight

1. normal

Definition:

This is a default font-variant, where browsers display normal fonts.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .normal{
      border: 3px solid black;
      background-color: pink;
      font-weight: normal;
    }
    </style>
  </head>

  <body>
  	<div class="normal">This is a paragraph with a normal font-weight.</div>
  </body>
</html>

Output:

font-weight: normal;


2. bold

Definition:

This property value defines the fonts thickness. 700 in number has the same font-weight like bold.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .bold{
      border: 3px solid black;
      background-color: pink;
      font-weight: bold;
    }
    </style>
  </head>

  <body>
  	<div class="bold">This is a paragraph with a bold font-weight.</div>
  </body>
</html>

Output:

font-weight: bold;



3. bolder

Definition:

This property value defines thicker fonts. 900 in number is the bolder font-weight.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
      .bolder{
        border: 3px solid black;
        background-color: pink;
        font-weight: bolder;
      }
    </style>
  </head>

  <body>
  	<div class="bolder">This is a paragraph with a bolder font-weight.</div>
  </body>
</html>

Output:

font-weight: bolder;

4. lighter

Definition:

This property value defines the lighter fonts. 100 in number is the same font-weight as lighter.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .lighter{
      border: 3px solid black;
      background-color: pink;
      font-weight: lighter;
    }
    </style>
  </head>

  <body>
  	<div class="lighter">This is a paragraph with a lighter font-weight.</div>
  </body>
</html>

Output:

font-weight: lighter;



5. number

Font-weight can be defined in number from 100 to 900, which is from lighter to bolder. 100 is the lighter font-weight. 400 is the normal font-weight and 700 is the bolder font-weight. Let see each font-weight output using in number.

5.1) font-weight: 100;

Source Code:

<!DOCTYPE html>
<html>
<head>
<style>
.number{
  border: 3px solid black;
  background-color: pink;
  font-weight: 100;
}
</style>
</head>
   
<body>
<div class="number">This is a paragraph with font-weight is equal to 100. This font-weight is as same as lighter.</div>
</body>
</html>

Output:

font-weight: 100;

5.2) font-weight: 200;

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
      .number{
        border: 3px solid black;
        background-color: pink;
        font-weight: 200;
      }
    </style>
  </head>

  <body>
    <div class="number">This is a paragraph with font-weight is equal to 200. </div>
  </body>
</html>

Output:

font-weight: 200;

5.3) font-weight: 300;

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
      .number{
        border: 3px solid black;
        background-color: pink;
        font-weight: 300;
      }
    </style>
  </head>

  <body>
    <div class="number">This is a paragraph with font-weight is equal to 300. </div>
  </body>
</html>

Output:

font-weight: 300;



5.4) font-weight: 400;

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .number{
      border: 3px solid black;
      background-color: pink;
      font-weight: 400;
    }
    </style>
  </head>

  <body>
  	<div class="number">This is a paragraph with font-weight is equal to 400. 400 is the same as normal.</div>
  </body>
</html>

Output:

font-weight: 400;


5.5) font-weight: 500;

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .number{
      border: 3px solid black;
      background-color: pink;
      font-weight: 500;
    }
    </style>
  </head>

  <body>
  	<div class="number">This is a paragraph with font-weight is equal to 500. </div>
  </body>
</html>

Output:

font-weight: 500;


5.6) font-weight: 600;

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .number{
      border: 3px solid black;
      background-color: pink;
      font-weight: 600;
    }
    </style>
  </head>

  <body>
  	<div class="number">This is a paragraph with font-weight is equal to 600. </div>
  </body>
</html>

Output:

font-weight: 600;



5.7) font-weight: 700;

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .number{
      border: 3px solid black;
      background-color: pink;
      font-weight: 700;
    }
    </style>
  </head>

  <body>
  	<div class="number">This is a paragraph with font-weight is equal to 700. </div>
  </body>
</html>

Output:

font-weight: 700;


5.8) font-weight: 800;

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .number{
      border: 3px solid black;
      background-color: pink;
      font-weight: 800;
    }
    </style>
  </head>

  <body>
  	<div class="number">This is a paragraph with font-weight is equal to 800. </div>
  </body>
</html>

Output:

font-wieght: 800;


5.9) font-weight: 900;

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .number{
      border: 3px solid black;
      background-color: pink;
      font-weight: 900;
    }
    </style>
  </head>

  <body>
  	<div class="number">This is a paragraph with font-weight is equal to 900. </div>
  </body>
</html>

Output:

font-weight: 900;


Donate to support writers


You may be interested in the following topics:

CSS Font Variant

Please Share On:

Definition:

CSS font-variant is used to convert the text into lowercase or uppercase using CSS font-variant property value.

Syntax:

font-variant: normal | small-caps | initial | inherit

Property Value:

Property ValueDescription
1. normalThis is a default font-variant, where browsers display normal fonts.
2. small-capsAll fonts converted into upper case
3. initialMatch this property to its default value
4. inheritInherit this property from its parent value

1. normal

Definition:

This is a default font-variant, where browsers display normal fonts.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .normal{
      border: 3px solid black;
      background-color: pink;
      font-variant: normal;
    }
    </style>
  </head>

  <body>
  	<div class="normal">This is a paragraph with a normal font-variant.</div>
  </body>
</html>

Output:

font-variant: normal;


2. small-caps

Definition:

By using the small-cap value in the font variants, it converts all fonts into upper case.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .small-caps{
      border: 3px solid black;
      background-color: pink;
      font-variant: small-caps;
    }
    </style>
  </head>

  <body>
  	<div class="small-caps">This is a paragraph with a small-caps font-variant.</div>
  </body>
</html>

Output:

font-variant: small-caps;



3. initial

Definition:

Match this property to its default value.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .initial{
      border: 3px solid black;
      background-color: pink;
      font-variant: initial;
    }
    </style>
  </head>

  <body>
  	<div class="initial">This is a paragraph, where the fonts are matched to its default value.</div>
  </body>
</html>

Output:

font-variant: initial;

4. inherit

Definition:

Inherit this property from its parent value.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .inherit{
      border: 3px solid black;
      background-color: pink;
      font-variant: inherit;
    }
    </style>
  </head>

  <body>
 	 <div class="inherit">This is a paragraph, where its property is inherited from its parent value.</div>
  </body>
</html>

Output:

font-variant: inherit;


Donate to support writers


You may be interested in the following topics:

CSS Font Stretch

Please Share On:

Definition:

CSS font-stretch property is used to stretch the text wider or narrower.

Note: If the selected font doesn’t offer condensed or expanded, the font has no changes.

Syntax:

font-stretch: ultra-condensed | extra-condensed | condensed | semi-condensed | normal |  | semi-expanded | expanded | extra-expanded | ultra-expanded

Property Value:

Property ValueDescription
1. ultra-condensedmake the text as narrow as it goes
2. extra-condensednarrow the text than condensed, but not as narrow as ultra-condensed.
3. condensednarrow the text than semi-condensed, but not as narrow as condensed.
4. semi-condensednarrow the text than normal, but not as narrow as condensed.
5. normalThis is default value. It doesn’t stretch the text.
6. semi-expandedexpand the text than normal, but not as wide as expanded.
7. expandedexpand the text than semi-expanded, but not as wide as extra-expanded.
8. extra-expandedexpand the text than expanded, but not as wide as ultra-expanded.
9. ultra-expandedmake the text as wider as it goes

Donate to support writers


You may be interested in the following topics:

CSS Font Style

Please Share On:

Definition:

CSS font-style is used to style the text. It can be normal, italic and oblique.

Syntax:

font-style: normal | italic | oblique

Property Value:

- Normal
- Italic
- Oblique

1. font-style: normal

Definition:

font-style: normal specify the normal text. This is the default font. This font is used if you have previously defined font-style in italic or oblique and want to change back to normal font-style.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .italic{
      border: 3px solid black;
      background-color: pink;  
      font-style: italic;
    }

    .normal{
      border: 3px solid black;
      background-color: pink;  
      font-style: normal;
    }
    </style>
  </head>

  <body>
    <p class="italic">Previously, the font is defined in italic.</p>
    <p class="normal">Here, the font is in normal style.</p>
  </body>
</html>

Output:

font-style:normal;

2. font-style: italic

Definition:

font-style: italic specify the italic text.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .italic{
      border: 3px solid black;
      background-color: pink;  
      font-style: italic;
    }
    </style>
  </head>

  <body>
  	<p class="italic">Here, the font is defined in italic.</p>
  </body>
</html>

Output:

font-sytle:italic;



3. font-style: oblique

Definition:

font-style: oblique specified the leaning text, which is pretty much similar to italic text. See the below source code and output.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .oblique{
      border: 3px solid black;
      background-color: pink;  
      font-style: oblique;
    }
    </style>
  </head>

  <body>
  	<p class="oblique">Here, the font is defined in oblique.</p>
  </body>
</html>

Output:

font-style: oblique;


Donate to support writers


You may be interested in the following topics:

CSS Font Size

Please Share On:

Definition:

CSS Font size is used to set the font size of your browser. The default text size in the browser is 16 px. 1 em is equal to your current text size. Here, 1 em = 16 px. If your default text size is 25 px then 1 em = 25 px.

Syntax:

font-size: smaller | xx-small | x-small | small | medium | large | x-large | xx-large | larger | length | % | initial | inherit;

Property Value:

Property ValueDescription
1. smallerset the font-size smaller than its parent size
2. xx-smallset the font-size to an xx-small size
3. x-smallset the font-size to an x-small size
4. smallset the font-size to an small size
5. mediumset the font-size to medium size. This is a default font-size.
6. largeset the font-size to a large size
7. x-largeset the font-size to an extra-large size
8. xx-largeset the font-size to a double extra large size
9. largerset the font-size to a larger size than its parent size
10. lengthset the font-size in a fixed size defined by px, em, in, etc.
11. %set the font-size to a percentage value.
12. initialset the font-size to its default value.
13. inheritInherit the font-size to its parent value.

Scroll down to see each font-size output with example.

1. smaller

Definition:

It sets the font size smaller than its parent size

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .default {
      border: 3px solid black;
      background-color: pink;
    }

    .smaller {
      border: 3px solid black;
      background-color: pink;
      font-size: smaller;
    }
    </style>
  </head>

  <body>
    <div class="default">This is a paragraph with a default font size.</div>
    <div class="smaller">This is a paragraph with a smaller font size.</div>
  </body>
</html>

Output:

font-size: smaller;

2. xx-small

Definition:

It sets the font size to xx-small size.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .default {
      border: 3px solid black;
      background-color: pink;
    }

    .xx-small {
      border: 3px solid black;
      background-color: pink;
      font-size: xx-small;
    }
    </style>
  </head>

  <body>
    <div class="default">This is a paragraph with a default font size.</div>
    <div class="xx-small">This is a paragraph with a xx-small font size.</div>
  </body>
</html>

Output:

font-size: xx-small;



3. x-small

Definition:

It sets the font size to x-small size.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .default {
      border: 3px solid black;
      background-color: pink;
    }

    .x-small {
      border: 3px solid black;
      background-color: pink;
      font-size: x-small;
    }
    </style>
  </head>

  <body>
    <div class="default">This is a paragraph with a default font size.</div>
    <div class="x-small">This is a paragraph with a x-small font size.</div>
  </body>
</html>

Output:

font-size: x-small;

4. small

Definition:

It sets the font size to a small size.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .default {
      border: 3px solid black;
      background-color: pink;
    }

    .small {
      border: 3px solid black;
      background-color: pink;
      font-size: small;
    }
    </style>
  </head>

  <body>
    <div class="default">This is a paragraph with a default font size.</div>
    <div class="small">This is a paragraph with a small font size.</div>
  </body>
</html>

Output:

font-size: small;

5. medium

Definition:

It sets the font size to medium size. This is a default font size.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .default {
      border: 3px solid black;
      background-color: pink;
    }

    .medium {
      border: 3px solid black;
      background-color: pink;
      font-size: medium;
    }
    </style>
  </head>

  <body>
    <div class="default">This is a paragraph with a default font size.</div>
    <div class="medium">This is a paragraph with a medium font size.</div>
  </body>
</html>

Output:

font-size: medium;



6. large

Definition:

It sets the font size to a large size.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .default {
      border: 3px solid black;
      background-color: pink;
    }

    .large {
      border: 3px solid black;
      background-color: pink;
      font-size: large;
    }
    </style>
  </head>

  <body>
    <div class="default">This is a paragraph with a default font size.</div>
    <div class="large">This is a paragraph with a large font size.</div>
  </body>
</html>

Output:

font-size: large;


7. x-large

Definition:

It sets the font size to extra-large size.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .default {
      border: 3px solid black;
      background-color: pink;
    }

    .x-large {
      border: 3px solid black;
      background-color: pink;
      font-size: x-large;
    }
    </style>
  </head>

  <body>
    <div class="default">This is a paragraph with a default font size.</div>
    <div class="x-large">This is a paragraph with an extra large font size.</div>
  </body>
</html>

Output:

font-size: x-large;


8. xx-large

Definition:

It sets the font size to double the extra-large size.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .default {
      border: 3px solid black;
      background-color: pink;
    }

    .xx-large {
      border: 3px solid black;
      background-color: pink;
      font-size: xx-large;
    }
    </style>
  </head>

  <body>
    <div class="default">This is a paragraph with a default font size.</div>
    <div class="xx-large">This is a paragraph with a double extra large font size.</div>
  </body>
</html>

Output:

font-size: xx-large;


9. larger

Definition:

It sets the font size to a larger size than its parent size

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .default {
      border: 3px solid black;
      background-color: pink;
    }

    .larger {
      border: 3px solid black;
      background-color: pink;
      font-size: larger;
    }
    </style>
  </head>

  <body>
    <div class="default">This is a paragraph with a default font size.</div>
    <div class="larger">This is a paragraph with a larger font size.</div>
  </body>
</html>

Output:

font-size: larger;


10. length

Definition:

It sets the font size in a fixed size defined by px, em, in, etc.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .default {
      border: 3px solid black;
      background-color: pink;
    }

    .px {
      border: 3px solid black;
      background-color: pink;
      font-size: 15px;
    }

    .em {
      border: 3px solid black;
      background-color: pink;
      font-size: 2em;
    }

    .in {
      border: 3px solid black;
      background-color: pink;
      font-size: 0.2in;
    }
    </style>
  </head>

  <body>
    <div class="default">This is a paragraph with a default font size.</div>
    <div class="px">This is a paragraph with a 15px font size.</div>
    <div class="em">This is a paragraph with a 2em font size.</div>
    <div class="in">This is a paragraph with a 0.2in font size.</div>
  </body>
</html>

Output:

font-size: 2em;


11. %

Definition:

It sets the font size to a percentage value.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .default {
      border: 3px solid black;
      background-color: pink;
    }

    .percentage{
      border: 3px solid black;
      background-color: pink;
      font-size: 50%;
    }
    </style>
  </head>

  <body>
    <div class="default">This is a paragraph with a default font size.</div>
    <div class="percentage">This is a paragraph defined in a 50% percentage font size.</div>
  </body>
</html>

Output:

font-size :50%;



12. initial

Definition:

It sets the font size to its default value.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .default {
      border: 3px solid black;
      background-color: pink;
    }

    .initial{
      border: 3px solid black;
      background-color: pink;
      font-size: initial;
    }
    </style>
  </head>

  <body>
    <div class="default">This is a paragraph with a default font size.</div>
    <div class="initial">This is a paragraph set the font-size to its initial default value.</div>
  </body>
</html>

Output:

font-size: initial;


13. inherit

Definition:

It inherits the font size of its parent value.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .default {
      border: 3px solid black;
      background-color: pink;
    }

    .inherit{
      border: 3px solid black;
      background-color: pink;
      font-size: inherit;
    }
    </style>
  </head>

  <body>
    <div class="default">This is a paragraph with a default font size.</div>
    <div class="inherit">This is a paragraph set the font-size inherit to its parent value.</div>
  </body>
</html>

Output:

font-size: inherit;


Donate to support writers


You may be interested in the following topics:

CSS Font Family

Please Share On:

Definition:

There are two types of CSS Font Family i.e, generic family and font family. The Generic family like “Serif” and “Monospace” have a similar font family and the font-family like “Times New Roman” and “Arial” have a specific font family.

The font-family property is used to set the text of the font family. It is specified by more than one font family by separating with commas. If your browser does not support the first font, it tries the second font, and so on.

Syntax:

font-family: "Times New Roman", Times, serif;

Property Value:

- Arial
- Times New Roman
- Helvetica
- Courier etc.

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .serif {
      border: 3px solid black;
      background-color: pink;  
      font-family: "Times New Roman", Times, serif;
    }

    .sans-serif {
      border: 3px solid black;
      background-color: pink;
      font-family: Arial, Helvetica, sans-serif;
    }

    .monospace {
      border: 3px solid black;
      background-color: pink;
      font-family: "Lucida Console", Courier, monospace;
    }
    </style>
  </head>

  <body>
    <p class="serif">This is a paragraph in the Times New Roman font.</p>
    <p class="sans-serif">This is a paragraph in the Arial font.</p>
    <p class="monospace">This is a paragraph in the Lucida Console font.</p>
  </body>
</html>

Output:


Donate to support writers


You may be interested in the following topics:

CSS Font (All Properties)

Please Share On:

Definition:

CSS font properties define the font family, style, size, and weight of a text. It is a shorthand for font-family, font-style, font-size, font-weight, font-stretch and font-variant.

Property Values:

CSS FontsDescriptions
Font Familyset the font family of a text
Font Sizeset the font size
Font Stylestyle your font
Font Stretchstretch your font
Font Variantchanges the font into small caps
Font Weightset the boldness of the font
Font Kerningset the space between letters
Font Googleuse the google fonts on your page

Click on each link to read more about each CSS Font.



You may be interested in the following topics:

Copyright @2023. All Right Reserved.


Social media & sharing icons powered by UltimatelySocial