Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the use of the letter-spacing attribute in css

Shulou Source: shulou.com Published: 2022-06-01 12:15:12 10月03日 Update

This article mainly shows you the "what is the use of letter-spacing attributes in css", the content is simple and clear, and I hope it can help you solve your doubts, so let me lead you to study and learn "what is the use of letter-spacing attributes in css" this article.

How do I use the cssletter-spacing attribute?

The letter-spacing property increases or decreases the white space between characters (character spacing).

Syntax:

Letter-spacing:normal | length | inherit

Attribute value:

● normal: default. Specifies that there is no extra space between characters.

● length: defines a fixed space between characters (negative values are allowed).

● inherit: specifies that the value of the letter-spacing attribute should be inherited from the parent element.

Note: negative values are allowed for this property, which tightens the squeeze between letters.

Note: all browsers support the letter-spacing attribute. No version of InternetExplorer (including IE8) supports the attribute value "inherit".

Example of cssletter-spacing property

H2 {letter-spacing:-10px}

H4 {letter-spacing:normal}

H5 {letter-spacing:20px}

Thisisheader1

Thisisheader3

Thisisheader4

The above is all the content of the article "what is the use of letter-spacing attributes in css". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Attributes characters content articles spaces negative values learning help support between elements letters easy to understand more organization comments browsers versions knowledge examples Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Shulou Tech Info MariaDB OPPO Reno Shulou Technology