CSS Font

 


CSS Font

  • Font properties are used to add different styles to the fonts.
  • Font properties are used to change the style, size, weight, etc. of the font.
  • Font styling adds a good impact on the readers, that's why we use different font styling properties.

Different font-properties

font-family:

font-family property is used to specify the font of a text.

.heading {
    font-family: 'sans-serif', 'Ubuntu';
}


font-size

font-size property is used to specify the size of the text.

.heading {
    font-size: 20px;
}


font-weight

font-weight property set, how bold or thin characters in the text should be displayed

.heading {
    font-weight: bold;
}

Related Posts:

  • CSS Margin CSS MarginsMargins are used to create space around elements, outside of any defined bordersWith CSS, you have full control over the margins. The… Read More
  • Introduction to CSSWhat is CSS?CSS is a language that we use to style an HTML document.It describes how elements will be displayed.CSS stands for Cascading Style Sheets.… Read More
  • CSS BackgroundsCSS BackgroundsCSS background properties are used to add background effects for elementsWe will learn below following CSS background properties:backgr… Read More
  • CSS ColorCSS ColorsColor property is used to set the color of the text.Syntax: {color: value;}Now there are many ways of giving this value to the colour. Some … Read More
  • CSS BordersBorder property helps in creating borders around the textCSS border properties allow you to specify the style, width, and color of an element's border… Read More

0 Comments:

Post a Comment

Do leave your comments