Which of the following font characteristics is not listed in the property sheet

The font CSS shorthand property sets all the different properties of an element's font. Alternatively, it sets an element's font to a system font.

Try it

As with any shorthand property, any individual value that is not specified is set to its corresponding initial value [possibly overriding values previously set using non-shorthand properties]. Though not directly settable by font, the longhands font-size-adjust and font-kerning are also reset to their initial values.

Constituent properties

This property is a shorthand for the following CSS properties:

  • font-family
  • /* Set the font size to 12px and the line height to 14px.
       Set the font family to sans-serif */
    p {
      font: 12px/14px sans-serif;
    }
    
    /* Set the font size to 80% of the parent element
       or default value [if no parent element present].
       Set the font family to sans-serif */
    p {
      font: 80% sans-serif;
    }
    
    /* Set the font weight to bold,
       the font-style to italic,
       the font size to large,
       and the font family to serif. */
    p {
      font: bold italic large serif;
    }
    
    /* Use the same font as the status bar of the window */
    p {
      font: status-bar;
    }
    
    0
  • /* Set the font size to 12px and the line height to 14px.
       Set the font family to sans-serif */
    p {
      font: 12px/14px sans-serif;
    }
    
    /* Set the font size to 80% of the parent element
       or default value [if no parent element present].
       Set the font family to sans-serif */
    p {
      font: 80% sans-serif;
    }
    
    /* Set the font weight to bold,
       the font-style to italic,
       the font size to large,
       and the font family to serif. */
    p {
      font: bold italic large serif;
    }
    
    /* Use the same font as the status bar of the window */
    p {
      font: status-bar;
    }
    
    1
  • /* Set the font size to 12px and the line height to 14px.
       Set the font family to sans-serif */
    p {
      font: 12px/14px sans-serif;
    }
    
    /* Set the font size to 80% of the parent element
       or default value [if no parent element present].
       Set the font family to sans-serif */
    p {
      font: 80% sans-serif;
    }
    
    /* Set the font weight to bold,
       the font-style to italic,
       the font size to large,
       and the font family to serif. */
    p {
      font: bold italic large serif;
    }
    
    /* Use the same font as the status bar of the window */
    p {
      font: status-bar;
    }
    
    2
  • /* Set the font size to 12px and the line height to 14px.
       Set the font family to sans-serif */
    p {
      font: 12px/14px sans-serif;
    }
    
    /* Set the font size to 80% of the parent element
       or default value [if no parent element present].
       Set the font family to sans-serif */
    p {
      font: 80% sans-serif;
    }
    
    /* Set the font weight to bold,
       the font-style to italic,
       the font size to large,
       and the font family to serif. */
    p {
      font: bold italic large serif;
    }
    
    /* Use the same font as the status bar of the window */
    p {
      font: status-bar;
    }
    
    3
  • /* Set the font size to 12px and the line height to 14px.
       Set the font family to sans-serif */
    p {
      font: 12px/14px sans-serif;
    }
    
    /* Set the font size to 80% of the parent element
       or default value [if no parent element present].
       Set the font family to sans-serif */
    p {
      font: 80% sans-serif;
    }
    
    /* Set the font weight to bold,
       the font-style to italic,
       the font size to large,
       and the font family to serif. */
    p {
      font: bold italic large serif;
    }
    
    /* Use the same font as the status bar of the window */
    p {
      font: status-bar;
    }
    
    4
  • /* Set the font size to 12px and the line height to 14px.
       Set the font family to sans-serif */
    p {
      font: 12px/14px sans-serif;
    }
    
    /* Set the font size to 80% of the parent element
       or default value [if no parent element present].
       Set the font family to sans-serif */
    p {
      font: 80% sans-serif;
    }
    
    /* Set the font weight to bold,
       the font-style to italic,
       the font size to large,
       and the font family to serif. */
    p {
      font: bold italic large serif;
    }
    
    /* Use the same font as the status bar of the window */
    p {
      font: status-bar;
    }
    
    5

Syntax

The font property may be specified as either a single keyword, which will select a system font, or as a shorthand for various font-related properties.

If font is specified as a system keyword, it must be one of:

/* Set the font size to 12px and the line height to 14px.
   Set the font family to sans-serif */
p {
  font: 12px/14px sans-serif;
}

/* Set the font size to 80% of the parent element
   or default value [if no parent element present].
   Set the font family to sans-serif */
p {
  font: 80% sans-serif;
}

/* Set the font weight to bold,
   the font-style to italic,
   the font size to large,
   and the font family to serif. */
p {
  font: bold italic large serif;
}

/* Use the same font as the status bar of the window */
p {
  font: status-bar;
}
8,
/* Set the font size to 12px and the line height to 14px.
   Set the font family to sans-serif */
p {
  font: 12px/14px sans-serif;
}

/* Set the font size to 80% of the parent element
   or default value [if no parent element present].
   Set the font family to sans-serif */
p {
  font: 80% sans-serif;
}

/* Set the font weight to bold,
   the font-style to italic,
   the font size to large,
   and the font family to serif. */
p {
  font: bold italic large serif;
}

/* Use the same font as the status bar of the window */
p {
  font: status-bar;
}
9,

  Change the radio buttons below to see the generated shorthand and its effect.


  
    
      font-style
      
      none
      
      normal
      
      italic
      
      oblique
    

    
      font-variant
      
      none
      
      normal
      
      small-caps
    

    
      font-weight
      
      none
      
      normal
      
      bold
    

    
      font-size
      
      12px
      
      16px
      
      24px
    

    
      line-height
      
      none
      
      1.2
      
      3
    
    

    
      font-family
      
      courier
      
      serif
      
      sans-serif
      
      Arial
      
      monospace
      
      cursive
      
      fantasy
      
      system-ui
    
  

  
    font :
    
      
      font-style 
      optional
    
    
       
      font-variant 
      optional
    
    
       
      font-weight 
      optional
    
    
       
      font-size 
      mandatory
    
    
       
      line-height 
      optional
    
    
      
      
      font-family 
      mandatory
    
  


This is some sample text.

0,

  Change the radio buttons below to see the generated shorthand and its effect.


  
    
      font-style
      
      none
      
      normal
      
      italic
      
      oblique
    

    
      font-variant
      
      none
      
      normal
      
      small-caps
    

    
      font-weight
      
      none
      
      normal
      
      bold
    

    
      font-size
      
      12px
      
      16px
      
      24px
    

    
      line-height
      
      none
      
      1.2
      
      3
    
    

    
      font-family
      
      courier
      
      serif
      
      sans-serif
      
      Arial
      
      monospace
      
      cursive
      
      fantasy
      
      system-ui
    
  

  
    font :
    
      
      font-style 
      optional
    
    
       
      font-variant 
      optional
    
    
       
      font-weight 
      optional
    
    
       
      font-size 
      mandatory
    
    
       
      line-height 
      optional
    
    
      
      
      font-family 
      mandatory
    
  


This is some sample text.

1,

  Change the radio buttons below to see the generated shorthand and its effect.


  
    
      font-style
      
      none
      
      normal
      
      italic
      
      oblique
    

    
      font-variant
      
      none
      
      normal
      
      small-caps
    

    
      font-weight
      
      none
      
      normal
      
      bold
    

    
      font-size
      
      12px
      
      16px
      
      24px
    

    
      line-height
      
      none
      
      1.2
      
      3
    
    

    
      font-family
      
      courier
      
      serif
      
      sans-serif
      
      Arial
      
      monospace
      
      cursive
      
      fantasy
      
      system-ui
    
  

  
    font :
    
      
      font-style 
      optional
    
    
       
      font-variant 
      optional
    
    
       
      font-weight 
      optional
    
    
       
      font-size 
      mandatory
    
    
       
      line-height 
      optional
    
    
      
      
      font-family 
      mandatory
    
  


This is some sample text.

2,

  Change the radio buttons below to see the generated shorthand and its effect.


  
    
      font-style
      
      none
      
      normal
      
      italic
      
      oblique
    

    
      font-variant
      
      none
      
      normal
      
      small-caps
    

    
      font-weight
      
      none
      
      normal
      
      bold
    

    
      font-size
      
      12px
      
      16px
      
      24px
    

    
      line-height
      
      none
      
      1.2
      
      3
    
    

    
      font-family
      
      courier
      
      serif
      
      sans-serif
      
      Arial
      
      monospace
      
      cursive
      
      fantasy
      
      system-ui
    
  

  
    font :
    
      
      font-style 
      optional
    
    
       
      font-variant 
      optional
    
    
       
      font-weight 
      optional
    
    
       
      font-size 
      mandatory
    
    
       
      line-height 
      optional
    
    
      
      
      font-family 
      mandatory
    
  


This is some sample text.

3.

If font is specified as a shorthand for several font-related properties, then:

  • it must include values for:
    • 
        Change the radio buttons below to see the generated shorthand and its effect.
      
      
        
          
            font-style
            
            none
            
            normal
            
            italic
            
            oblique
          
      
          
            font-variant
            
            none
            
            normal
            
            small-caps
          
      
          
            font-weight
            
            none
            
            normal
            
            bold
          
      
          
            font-size
            
            12px
            
            16px
            
            24px
          
      
          
            line-height
            
            none
            
            1.2
            
            3
          
          
      
          
            font-family
            
            courier
            
            serif
            
            sans-serif
            
            Arial
            
            monospace
            
            cursive
            
            fantasy
            
            system-ui
          
        
      
        
          font :
          
            
            font-style 
            optional
          
          
             
            font-variant 
            optional
          
          
             
            font-weight 
            optional
          
          
             
            font-size 
            mandatory
          
          
             
            line-height 
            optional
          
          
            
            
            font-family 
            mandatory
          
        
      
      
      This is some sample text.
      
      
      5
    • 
        Change the radio buttons below to see the generated shorthand and its effect.
      
      
        
          
            font-style
            
            none
            
            normal
            
            italic
            
            oblique
          
      
          
            font-variant
            
            none
            
            normal
            
            small-caps
          
      
          
            font-weight
            
            none
            
            normal
            
            bold
          
      
          
            font-size
            
            12px
            
            16px
            
            24px
          
      
          
            line-height
            
            none
            
            1.2
            
            3
          
          
      
          
            font-family
            
            courier
            
            serif
            
            sans-serif
            
            Arial
            
            monospace
            
            cursive
            
            fantasy
            
            system-ui
          
        
      
        
          font :
          
            
            font-style 
            optional
          
          
             
            font-variant 
            optional
          
          
             
            font-weight 
            optional
          
          
             
            font-size 
            mandatory
          
          
             
            line-height 
            optional
          
          
            
            
            font-family 
            mandatory
          
        
      
      
      This is some sample text.
      
      
      6
  • it may optionally include values for:
    • 
        Change the radio buttons below to see the generated shorthand and its effect.
      
      
        
          
            font-style
            
            none
            
            normal
            
            italic
            
            oblique
          
      
          
            font-variant
            
            none
            
            normal
            
            small-caps
          
      
          
            font-weight
            
            none
            
            normal
            
            bold
          
      
          
            font-size
            
            12px
            
            16px
            
            24px
          
      
          
            line-height
            
            none
            
            1.2
            
            3
          
          
      
          
            font-family
            
            courier
            
            serif
            
            sans-serif
            
            Arial
            
            monospace
            
            cursive
            
            fantasy
            
            system-ui
          
        
      
        
          font :
          
            
            font-style 
            optional
          
          
             
            font-variant 
            optional
          
          
             
            font-weight 
            optional
          
          
             
            font-size 
            mandatory
          
          
             
            line-height 
            optional
          
          
            
            
            font-family 
            mandatory
          
        
      
      
      This is some sample text.
      
      
      7
    • 
        Change the radio buttons below to see the generated shorthand and its effect.
      
      
        
          
            font-style
            
            none
            
            normal
            
            italic
            
            oblique
          
      
          
            font-variant
            
            none
            
            normal
            
            small-caps
          
      
          
            font-weight
            
            none
            
            normal
            
            bold
          
      
          
            font-size
            
            12px
            
            16px
            
            24px
          
      
          
            line-height
            
            none
            
            1.2
            
            3
          
          
      
          
            font-family
            
            courier
            
            serif
            
            sans-serif
            
            Arial
            
            monospace
            
            cursive
            
            fantasy
            
            system-ui
          
        
      
        
          font :
          
            
            font-style 
            optional
          
          
             
            font-variant 
            optional
          
          
             
            font-weight 
            optional
          
          
             
            font-size 
            mandatory
          
          
             
            line-height 
            optional
          
          
            
            
            font-family 
            mandatory
          
        
      
      
      This is some sample text.
      
      
      8
    • 
        Change the radio buttons below to see the generated shorthand and its effect.
      
      
        
          
            font-style
            
            none
            
            normal
            
            italic
            
            oblique
          
      
          
            font-variant
            
            none
            
            normal
            
            small-caps
          
      
          
            font-weight
            
            none
            
            normal
            
            bold
          
      
          
            font-size
            
            12px
            
            16px
            
            24px
          
      
          
            line-height
            
            none
            
            1.2
            
            3
          
          
      
          
            font-family
            
            courier
            
            serif
            
            sans-serif
            
            Arial
            
            monospace
            
            cursive
            
            fantasy
            
            system-ui
          
        
      
        
          font :
          
            
            font-style 
            optional
          
          
             
            font-variant 
            optional
          
          
             
            font-weight 
            optional
          
          
             
            font-size 
            mandatory
          
          
             
            line-height 
            optional
          
          
            
            
            font-family 
            mandatory
          
        
      
      
      This is some sample text.
      
      
      9
    • body,
      input {
        font: 14px arial;
        overflow: hidden;
      }
      
      .propInputCont {
        float: left;
        text-align: center;
        margin-right: 5px;
        width: 80px;
      }
      
      .setPropCont {
        float: left;
        margin-right: 5px;
        width: 120px;
      }
      
      .propInputs,
      .setPropCont {
        margin-bottom: 1em;
      }
      
      .curCss {
        border: none;
        border-bottom: 1px solid black;
        text-align: center;
        width: 80px;
      }
      
      .mandatory {
        border-bottom-color: red;
      }
      
      .cf::before,
      .cf::after {
        content: " ";
        display: table;
      }
      
      .cf::after {
        clear: both;
      }
      
      .tar {
        width: 40px;
        text-align: right;
      }
      .fontfamily {
        display: inline-block;
      }
      
      0
    • body,
      input {
        font: 14px arial;
        overflow: hidden;
      }
      
      .propInputCont {
        float: left;
        text-align: center;
        margin-right: 5px;
        width: 80px;
      }
      
      .setPropCont {
        float: left;
        margin-right: 5px;
        width: 120px;
      }
      
      .propInputs,
      .setPropCont {
        margin-bottom: 1em;
      }
      
      .curCss {
        border: none;
        border-bottom: 1px solid black;
        text-align: center;
        width: 80px;
      }
      
      .mandatory {
        border-bottom-color: red;
      }
      
      .cf::before,
      .cf::after {
        content: " ";
        display: table;
      }
      
      .cf::after {
        clear: both;
      }
      
      .tar {
        width: 40px;
        text-align: right;
      }
      .fontfamily {
        display: inline-block;
      }
      
      1
  • /* Set the font size to 12px and the line height to 14px.
       Set the font family to sans-serif */
    p {
      font: 12px/14px sans-serif;
    }
    
    /* Set the font size to 80% of the parent element
       or default value [if no parent element present].
       Set the font family to sans-serif */
    p {
      font: 80% sans-serif;
    }
    
    /* Set the font weight to bold,
       the font-style to italic,
       the font size to large,
       and the font family to serif. */
    p {
      font: bold italic large serif;
    }
    
    /* Use the same font as the status bar of the window */
    p {
      font: status-bar;
    }
    
    2,
    /* Set the font size to 12px and the line height to 14px.
       Set the font family to sans-serif */
    p {
      font: 12px/14px sans-serif;
    }
    
    /* Set the font size to 80% of the parent element
       or default value [if no parent element present].
       Set the font family to sans-serif */
    p {
      font: 80% sans-serif;
    }
    
    /* Set the font weight to bold,
       the font-style to italic,
       the font size to large,
       and the font family to serif. */
    p {
      font: bold italic large serif;
    }
    
    /* Use the same font as the status bar of the window */
    p {
      font: status-bar;
    }
    
    3 and
    /* Set the font size to 12px and the line height to 14px.
       Set the font family to sans-serif */
    p {
      font: 12px/14px sans-serif;
    }
    
    /* Set the font size to 80% of the parent element
       or default value [if no parent element present].
       Set the font family to sans-serif */
    p {
      font: 80% sans-serif;
    }
    
    /* Set the font weight to bold,
       the font-style to italic,
       the font size to large,
       and the font family to serif. */
    p {
      font: bold italic large serif;
    }
    
    /* Use the same font as the status bar of the window */
    p {
      font: status-bar;
    }
    
    4 must precede
    /* Set the font size to 12px and the line height to 14px.
       Set the font family to sans-serif */
    p {
      font: 12px/14px sans-serif;
    }
    
    /* Set the font size to 80% of the parent element
       or default value [if no parent element present].
       Set the font family to sans-serif */
    p {
      font: 80% sans-serif;
    }
    
    /* Set the font weight to bold,
       the font-style to italic,
       the font size to large,
       and the font family to serif. */
    p {
      font: bold italic large serif;
    }
    
    /* Use the same font as the status bar of the window */
    p {
      font: status-bar;
    }
    
    0
  • /* Set the font size to 12px and the line height to 14px.
       Set the font family to sans-serif */
    p {
      font: 12px/14px sans-serif;
    }
    
    /* Set the font size to 80% of the parent element
       or default value [if no parent element present].
       Set the font family to sans-serif */
    p {
      font: 80% sans-serif;
    }
    
    /* Set the font weight to bold,
       the font-style to italic,
       the font size to large,
       and the font family to serif. */
    p {
      font: bold italic large serif;
    }
    
    /* Use the same font as the status bar of the window */
    p {
      font: status-bar;
    }
    
    3 may only specify the values defined in CSS 2.1, that is
    body,
    input {
      font: 14px arial;
      overflow: hidden;
    }
    
    .propInputCont {
      float: left;
      text-align: center;
      margin-right: 5px;
      width: 80px;
    }
    
    .setPropCont {
      float: left;
      margin-right: 5px;
      width: 120px;
    }
    
    .propInputs,
    .setPropCont {
      margin-bottom: 1em;
    }
    
    .curCss {
      border: none;
      border-bottom: 1px solid black;
      text-align: center;
      width: 80px;
    }
    
    .mandatory {
      border-bottom-color: red;
    }
    
    .cf::before,
    .cf::after {
      content: " ";
      display: table;
    }
    
    .cf::after {
      clear: both;
    }
    
    .tar {
      width: 40px;
      text-align: right;
    }
    .fontfamily {
      display: inline-block;
    }
    
    7 and
    body,
    input {
      font: 14px arial;
      overflow: hidden;
    }
    
    .propInputCont {
      float: left;
      text-align: center;
      margin-right: 5px;
      width: 80px;
    }
    
    .setPropCont {
      float: left;
      margin-right: 5px;
      width: 120px;
    }
    
    .propInputs,
    .setPropCont {
      margin-bottom: 1em;
    }
    
    .curCss {
      border: none;
      border-bottom: 1px solid black;
      text-align: center;
      width: 80px;
    }
    
    .mandatory {
      border-bottom-color: red;
    }
    
    .cf::before,
    .cf::after {
      content: " ";
      display: table;
    }
    
    .cf::after {
      clear: both;
    }
    
    .tar {
      width: 40px;
      text-align: right;
    }
    .fontfamily {
      display: inline-block;
    }
    
    8
  • /* Set the font size to 12px and the line height to 14px.
       Set the font family to sans-serif */
    p {
      font: 12px/14px sans-serif;
    }
    
    /* Set the font size to 80% of the parent element
       or default value [if no parent element present].
       Set the font family to sans-serif */
    p {
      font: 80% sans-serif;
    }
    
    /* Set the font weight to bold,
       the font-style to italic,
       the font size to large,
       and the font family to serif. */
    p {
      font: bold italic large serif;
    }
    
    /* Use the same font as the status bar of the window */
    p {
      font: status-bar;
    }
    
    1 may only be a single keyword value.
  • /* Set the font size to 12px and the line height to 14px.
       Set the font family to sans-serif */
    p {
      font: 12px/14px sans-serif;
    }
    
    /* Set the font size to 80% of the parent element
       or default value [if no parent element present].
       Set the font family to sans-serif */
    p {
      font: 80% sans-serif;
    }
    
    /* Set the font weight to bold,
       the font-style to italic,
       the font size to large,
       and the font family to serif. */
    p {
      font: bold italic large serif;
    }
    
    /* Use the same font as the status bar of the window */
    p {
      font: status-bar;
    }
    
    5 must immediately follow
    /* Set the font size to 12px and the line height to 14px.
       Set the font family to sans-serif */
    p {
      font: 12px/14px sans-serif;
    }
    
    /* Set the font size to 80% of the parent element
       or default value [if no parent element present].
       Set the font family to sans-serif */
    p {
      font: 80% sans-serif;
    }
    
    /* Set the font weight to bold,
       the font-style to italic,
       the font size to large,
       and the font family to serif. */
    p {
      font: bold italic large serif;
    }
    
    /* Use the same font as the status bar of the window */
    p {
      font: status-bar;
    }
    
    0, preceded by "/", like this: "
    const textAreas = document.getElementsByClassName["curCss"];
    
    function getProperties[] {
      return `${getCheckedValue["font_style"]} `
        + `${getCheckedValue["font_variant"]} `
        + `${getCheckedValue["font_weight"]} `
        + `${getCheckedValue["font_size"]}`
        + `${getCheckedValue["line_height"]} `
        + `${getCheckedValue["font_family"]}`;
    }
    
    function getCheckedValue[radioName] {
      const radios = document.forms[0].elements[radioName];
      for [let i = 0; i  1] {
        old[1].parentElement.removeChild[old[1]];
      }
      css = document.createElement["style"];
      css.textContent = `.fontShortHand{font: ${cssFragment}}`;
      document.body.appendChild[css];
    }
    
    setCss[];
    
    2"
  • font-family must be the last value specified.

Values

const textAreas = document.getElementsByClassName["curCss"];

function getProperties[] {
  return `${getCheckedValue["font_style"]} `
    + `${getCheckedValue["font_variant"]} `
    + `${getCheckedValue["font_weight"]} `
    + `${getCheckedValue["font_size"]}`
    + `${getCheckedValue["line_height"]} `
    + `${getCheckedValue["font_family"]}`;
}

function getCheckedValue[radioName] {
  const radios = document.forms[0].elements[radioName];
  for [let i = 0; i  1] {
    old[1].parentElement.removeChild[old[1]];
  }
  css = document.createElement["style"];
  css.textContent = `.fontShortHand{font: ${cssFragment}}`;
  document.body.appendChild[css];
}

setCss[];
4

See the

/* Set the font size to 12px and the line height to 14px.
   Set the font family to sans-serif */
p {
  font: 12px/14px sans-serif;
}

/* Set the font size to 80% of the parent element
   or default value [if no parent element present].
   Set the font family to sans-serif */
p {
  font: 80% sans-serif;
}

/* Set the font weight to bold,
   the font-style to italic,
   the font size to large,
   and the font family to serif. */
p {
  font: bold italic large serif;
}

/* Use the same font as the status bar of the window */
p {
  font: status-bar;
}
2 CSS property.

const textAreas = document.getElementsByClassName["curCss"];

function getProperties[] {
  return `${getCheckedValue["font_style"]} `
    + `${getCheckedValue["font_variant"]} `
    + `${getCheckedValue["font_weight"]} `
    + `${getCheckedValue["font_size"]}`
    + `${getCheckedValue["line_height"]} `
    + `${getCheckedValue["font_family"]}`;
}

function getCheckedValue[radioName] {
  const radios = document.forms[0].elements[radioName];
  for [let i = 0; i  1] {
    old[1].parentElement.removeChild[old[1]];
  }
  css = document.createElement["style"];
  css.textContent = `.fontShortHand{font: ${cssFragment}}`;
  document.body.appendChild[css];
}

setCss[];
6

See the

/* Set the font size to 12px and the line height to 14px.
   Set the font family to sans-serif */
p {
  font: 12px/14px sans-serif;
}

/* Set the font size to 80% of the parent element
   or default value [if no parent element present].
   Set the font family to sans-serif */
p {
  font: 80% sans-serif;
}

/* Set the font weight to bold,
   the font-style to italic,
   the font size to large,
   and the font family to serif. */
p {
  font: bold italic large serif;
}

/* Use the same font as the status bar of the window */
p {
  font: status-bar;
}
3 CSS property.

const textAreas = document.getElementsByClassName["curCss"];

function getProperties[] {
  return `${getCheckedValue["font_style"]} `
    + `${getCheckedValue["font_variant"]} `
    + `${getCheckedValue["font_weight"]} `
    + `${getCheckedValue["font_size"]}`
    + `${getCheckedValue["line_height"]} `
    + `${getCheckedValue["font_family"]}`;
}

function getCheckedValue[radioName] {
  const radios = document.forms[0].elements[radioName];
  for [let i = 0; i  1] {
    old[1].parentElement.removeChild[old[1]];
  }
  css = document.createElement["style"];
  css.textContent = `.fontShortHand{font: ${cssFragment}}`;
  document.body.appendChild[css];
}

setCss[];
8

See the

/* Set the font size to 12px and the line height to 14px.
   Set the font family to sans-serif */
p {
  font: 12px/14px sans-serif;
}

/* Set the font size to 80% of the parent element
   or default value [if no parent element present].
   Set the font family to sans-serif */
p {
  font: 80% sans-serif;
}

/* Set the font weight to bold,
   the font-style to italic,
   the font size to large,
   and the font family to serif. */
p {
  font: bold italic large serif;
}

/* Use the same font as the status bar of the window */
p {
  font: status-bar;
}
4 CSS property.

font0

See the

/* Set the font size to 12px and the line height to 14px.
   Set the font family to sans-serif */
p {
  font: 12px/14px sans-serif;
}

/* Set the font size to 80% of the parent element
   or default value [if no parent element present].
   Set the font family to sans-serif */
p {
  font: 80% sans-serif;
}

/* Set the font weight to bold,
   the font-style to italic,
   the font size to large,
   and the font family to serif. */
p {
  font: bold italic large serif;
}

/* Use the same font as the status bar of the window */
p {
  font: status-bar;
}
1 CSS property.

font2

See the

/* Set the font size to 12px and the line height to 14px.
   Set the font family to sans-serif */
p {
  font: 12px/14px sans-serif;
}

/* Set the font size to 80% of the parent element
   or default value [if no parent element present].
   Set the font family to sans-serif */
p {
  font: 80% sans-serif;
}

/* Set the font weight to bold,
   the font-style to italic,
   the font size to large,
   and the font family to serif. */
p {
  font: bold italic large serif;
}

/* Use the same font as the status bar of the window */
p {
  font: status-bar;
}
0 CSS property.

font4

See the

/* Set the font size to 12px and the line height to 14px.
   Set the font family to sans-serif */
p {
  font: 12px/14px sans-serif;
}

/* Set the font size to 80% of the parent element
   or default value [if no parent element present].
   Set the font family to sans-serif */
p {
  font: 80% sans-serif;
}

/* Set the font weight to bold,
   the font-style to italic,
   the font size to large,
   and the font family to serif. */
p {
  font: bold italic large serif;
}

/* Use the same font as the status bar of the window */
p {
  font: status-bar;
}
5 CSS property.

font6

See the font-family CSS property.

System font values

/* Set the font size to 12px and the line height to 14px.
   Set the font family to sans-serif */
p {
  font: 12px/14px sans-serif;
}

/* Set the font size to 80% of the parent element
   or default value [if no parent element present].
   Set the font family to sans-serif */
p {
  font: 80% sans-serif;
}

/* Set the font weight to bold,
   the font-style to italic,
   the font size to large,
   and the font family to serif. */
p {
  font: bold italic large serif;
}

/* Use the same font as the status bar of the window */
p {
  font: status-bar;
}
8

The system font used for captioned controls [e.g., buttons, drop-downs, etc.].

/* Set the font size to 12px and the line height to 14px.
   Set the font family to sans-serif */
p {
  font: 12px/14px sans-serif;
}

/* Set the font size to 80% of the parent element
   or default value [if no parent element present].
   Set the font family to sans-serif */
p {
  font: 80% sans-serif;
}

/* Set the font weight to bold,
   the font-style to italic,
   the font size to large,
   and the font family to serif. */
p {
  font: bold italic large serif;
}

/* Use the same font as the status bar of the window */
p {
  font: status-bar;
}
9

The system font used to label icons.


  Change the radio buttons below to see the generated shorthand and its effect.


  
    
      font-style
      
      none
      
      normal
      
      italic
      
      oblique
    

    
      font-variant
      
      none
      
      normal
      
      small-caps
    

    
      font-weight
      
      none
      
      normal
      
      bold
    

    
      font-size
      
      12px
      
      16px
      
      24px
    

    
      line-height
      
      none
      
      1.2
      
      3
    
    

    
      font-family
      
      courier
      
      serif
      
      sans-serif
      
      Arial
      
      monospace
      
      cursive
      
      fantasy
      
      system-ui
    
  

  
    font :
    
      
      font-style 
      optional
    
    
       
      font-variant 
      optional
    
    
       
      font-weight 
      optional
    
    
       
      font-size 
      mandatory
    
    
       
      line-height 
      optional
    
    
      
      
      font-family 
      mandatory
    
  


This is some sample text.

0

The system font used in menus [e.g., dropdown menus and menu lists].


  Change the radio buttons below to see the generated shorthand and its effect.


  
    
      font-style
      
      none
      
      normal
      
      italic
      
      oblique
    

    
      font-variant
      
      none
      
      normal
      
      small-caps
    

    
      font-weight
      
      none
      
      normal
      
      bold
    

    
      font-size
      
      12px
      
      16px
      
      24px
    

    
      line-height
      
      none
      
      1.2
      
      3
    
    

    
      font-family
      
      courier
      
      serif
      
      sans-serif
      
      Arial
      
      monospace
      
      cursive
      
      fantasy
      
      system-ui
    
  

  
    font :
    
      
      font-style 
      optional
    
    
       
      font-variant 
      optional
    
    
       
      font-weight 
      optional
    
    
       
      font-size 
      mandatory
    
    
       
      line-height 
      optional
    
    
      
      
      font-family 
      mandatory
    
  


This is some sample text.

1

The system font used in dialog boxes.


  Change the radio buttons below to see the generated shorthand and its effect.


  
    
      font-style
      
      none
      
      normal
      
      italic
      
      oblique
    

    
      font-variant
      
      none
      
      normal
      
      small-caps
    

    
      font-weight
      
      none
      
      normal
      
      bold
    

    
      font-size
      
      12px
      
      16px
      
      24px
    

    
      line-height
      
      none
      
      1.2
      
      3
    
    

    
      font-family
      
      courier
      
      serif
      
      sans-serif
      
      Arial
      
      monospace
      
      cursive
      
      fantasy
      
      system-ui
    
  

  
    font :
    
      
      font-style 
      optional
    
    
       
      font-variant 
      optional
    
    
       
      font-weight 
      optional
    
    
       
      font-size 
      mandatory
    
    
       
      line-height 
      optional
    
    
      
      
      font-family 
      mandatory
    
  


This is some sample text.

2

The system font used for labeling small controls.


  Change the radio buttons below to see the generated shorthand and its effect.


  
    
      font-style
      
      none
      
      normal
      
      italic
      
      oblique
    

    
      font-variant
      
      none
      
      normal
      
      small-caps
    

    
      font-weight
      
      none
      
      normal
      
      bold
    

    
      font-size
      
      12px
      
      16px
      
      24px
    

    
      line-height
      
      none
      
      1.2
      
      3
    
    

    
      font-family
      
      courier
      
      serif
      
      sans-serif
      
      Arial
      
      monospace
      
      cursive
      
      fantasy
      
      system-ui
    
  

  
    font :
    
      
      font-style 
      optional
    
    
       
      font-variant 
      optional
    
    
       
      font-weight 
      optional
    
    
       
      font-size 
      mandatory
    
    
       
      line-height 
      optional
    
    
      
      
      font-family 
      mandatory
    
  


This is some sample text.

3

The system font used in window status bars.

Prefixed system font keywords

Browsers often implement several more, prefixed, keywords: Gecko implements font4, font5, font6, font7, font8, font9, font-size-adjust0, font-size-adjust1, and font-size-adjust2.

Chủ Đề