CSS Text
CSS (Cascading Style Sheets) provides various properties and values for styling and formatting text on a webpage. Here are some commonly used CSS properties for text:
- Font Properties:
font-family
: Sets the font family for the text.font-size
: Specifies the size of the text.font-weight
: Sets the thickness or boldness of the text.font-style
: Specifies the style of the font (e.g., italic, oblique).
- Text Color:
color
: Sets the color of the text.
- Text Alignment:
text-align
: Aligns the text horizontally within its container (e.g., left, center, right, justify).
- Text Decoration:
text-decoration
: Adds decorations to the text, such as underline, overline, line-through, etc.
- Text Transformation:
text-transform
: Modifies the capitalization of the text (e.g., uppercase, lowercase, capitalize).
- Line Height:
line-height
: Specifies the height of a line of text. It can be a fixed value or a unitless value representing a multiple of the font size.
- Text Indentation:
text-indent
: Sets the indentation of the first line of text within a block.
- Text Overflow:
text-overflow
: Determines how overflowing text is displayed when it exceeds its container’s boundaries.
- Letter and Word Spacing:
letter-spacing
: Adjusts the spacing between characters.word-spacing
: Controls the spacing between words.
- Text Shadow:
text-shadow
: Applies a shadow effect to the text, allowing you to specify the color, blur radius, and position of the shadow.
These are just a few examples of CSS properties that can be used to style text. By combining and utilizing these properties, you can achieve various text formatting effects and customize the appearance of text on your webpage.