Text Properties
color
,text-align
,text-decoration
,line-height
,letter-spacing
,word-spacing
Font Properties
font-family
,font-size
,font-weight
,font-style
,font-variant
Web Fonts
- How to use Google Fonts and @font-face rule
Text Properties:
- color: Sets the text color.
- text-align: Aligns text (
left
,center
,right
,justify
). - text-decoration: Adds effects like underline, overline, or strikethrough.
- line-height: Sets the space between lines.
- letter-spacing: Adjusts space between characters.
- word-spacing: Adjusts space between words.
Font Properties:
- font-family: Defines the font (e.g., Arial, sans-serif).
- font-size: Sets the size of the text (e.g.,
16px
,1em
). - font-weight: Controls the thickness of the font (
normal
,bold
,lighter
). - font-style: Applies italics or oblique style.
- font-variant: Specifies small caps or normal text.
Web Fonts:
- Google Fonts: Use by linking in the HTML
<link>
tag. - @font-face: Allows custom fonts by importing files directly into CSS.
This provides basic control over the appearance of text and fonts in CSS.