English

List and explain the Font and text element properties and values used CSS.

Advertisements

Question

List and explain the Font and text element properties and values used CSS.

Long Answer
Advertisements

Solution

Formatting Properties Values Example
Text Colour Color Predefined_Color_Name
P
{
  color:pink;
}
H1
{
  color : MediumSeaGreen;
}
Text Alignment Text-align Center/Left/Right/Justify
P
{
  Text-align : center;
}
Font type Font-family Font_name
P
{
Font-family : “Times New Roman”;
}
Font Style Font-style Normal/Italic
P
{
  Font-family : “Times New Roman”;
  Font-style : Italic;
}
Font Style (Bold) Font-weight Normal/Bold
P
{
Font-family : “Times New Roman”;
Font-style : Italic;
Font-weight : bold;
}
Font size Font-size Size in pixels
P
{
Font-family : “Times New Roman”;
Font-style : Italic;
Font-size : 14px;
}
Background Colour Background Colour Predefined_Color_Name
Body
{
background-color : violet;
}
Border Colour Border Border thickness
<space> border style <space> Predefined_ borderColor_Name
H2
{
border : 2px solid red;
}
shaalaa.com
Introduction to CSS
  Is there an error in this question or solution?
Chapter 13: CSS - Cascading Style Sheets - Evaluation [Page 293]
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×