HTML Styles

The default style of any HTML document is a white background and black letters.
To change the style use the following attributes.

style
The style of your page
  • place the (style) attribute within your body tag
  • style is written like so: style="property: value"
Background Color
  • Example: 
  • <body style="background-color:limegreen">
  • your property is (background-color) and value is (limegreen)
Changing Font Color
  • Example:
  • <h1 style="color:blue">This is a heading</h1>
  • This will change the letter color of this particular heading to blue.
  • Example:
  • <p style="color:pink">This is a paragraph</p>
  • This will change the letter color of this paragraph to pink. 
Font Type
  • Example:
  • <h1 style="font-family:veranda">This is a heading</h1>
  • This will change the font type in this particular heading to veranda.
  • Example:
  • <p style="font-family:courier">This is a paragraph</p>
  • This will change the font type in this paragraph to courier.
Text Size
  • Example:
  • <h1 style="font-size:300%">This is a heading</h1>
  • This will change the font size in this particular heading by 300 percent.
  • Example:
  • <p style="font-size:150%">This is a paragraph</p>
  • This will change the font size in this paragraph 150 percent.
Align Text
  • Example:
  • <h1 style="text-align:center">This is a heading</h1>
  • This will center your heading to the middle of the page.
  • Example:
  • <p style="text-align:right">This is a paragraph</p>
  • This will make your text appear on the right side of the page.
For information on HTML styles in CSS click HERE.

Comments