Wednesday, March 10, 2021

Letter Spacing Css Property

   
Letter Spacing Css Property

What is the Use of the letter spacing in the css. Letter Spacing is use full property for give the space between the each letter. If you want to give the space between the each character you can use the letter spacing property to add the space between character.

This property is used to increase the space between the character and decrease the space between the character.Below you will see the example.

h2{
 letter-spacing:3px;
}

Java Script Syntax:

object.style.letterSpacing:3px;

Defalut Value for the Letter Spacing Property.

Letter Spacing have the Four different values.

Normal:

Normal is used to set the default value for letter spacing not have the extra space in between the character. It avoids the space between the each character.

Number Value:

Its mean assigning the numerical value for the letter space property like this 2px.

Initial:

Default what value assigned to the letter spacing that can be applied to the letter space property. If you assigned the 5px for letter-spacing in your style its will take the 5px.

Inherit:

its will take value from the parent class. If you already give the value for letter spacing in the class

h1{
 letter-spacing:2px;
} 
You can use the same proper value for the other child class like this.
title h1{
 letter-spacing:inherit;
}

Example:

Normal Paragraph:
Cascading Style Sheets (CSS) is a style sheet language used for describing the look and formatting of a document written in a markup language. While most often used to style web pages and user interfaces written in HTML and XHTML, the language can be applied to any kind of XML document, including plain XML, SVG and XUL. CSS is a cornerstone specification of the web and almost all web pages use CSS style sheets to describe their presentation.
Letter Spacing Applied Paragraph
p{
letter-spacing:5px;
}

I applied the letter spacing value for this paragraph is 5px you will see the differences below.

Cascading Style Sheets (CSS) is a style sheet language used for describing the look and formatting of a document written in a markup language. While most often used to style web pages and user interfaces written in HTML and XHTML, the language can be applied to any kind of XML document, including plain XML, SVG and XUL. CSS is a cornerstone specification of the web and almost all web pages use CSS style sheets to describe their presentation.

No comments:

Post a Comment