CSS Full Course Day 4 [Hindi] π» | Text Styling π | Mohit Decodes
βοΈ CSS Tutorial β Day 4: Text Styling
Welcome to Day 4 of the CSS Full Course [Hindi] by Mohit Decodes! Todayβs lesson focuses on Text Styling β how to beautifully style text elements using CSS.
πΉ Key CSS Properties for Text Styling
color
β Change text colorfont-family
β Set font style (e.g., Arial, Verdana)font-size
β Adjust size of textfont-weight
β Make text bold or light (normal
,bold
,lighter
)font-style
β Italicize text (normal
,italic
,oblique
)text-decoration
β Underline, overline, line-throughtext-transform
β Change text case (uppercase
,lowercase
,capitalize
)letter-spacing
β Space between lettersword-spacing
β Space between wordstext-align
β Align text (left
,right
,center
,justify
)line-height
β Control spacing between lines
βοΈ Example CSS:
css
CopyEdit
p {
color: #333;
font-family: 'Arial', sans-serif;
font-size: 18px;
font-weight: bold;
font-style: italic;
text-decoration: underline;
text-transform: uppercase;
letter-spacing: 2px;
word-spacing: 5px;
text-align: center;
line-height: 1.5;
}
π‘ Tips:
- Combine multiple properties for rich text effects
- Use web-safe fonts or Google Fonts for better typography
line-height
improves readability by adjusting spacing between lines- Use
text-align: justify;
to create clean blocks of text