|
|
HTML Styles
|
|
HTML can seem like a limited resource when it comes to styling the appearance of the HTML elements. This holds especially true when trying to style a complete website to give it a unique look. CSS or Cascading Style Sheets is the answer to such advanced styling requirements.
| |
The style attribute of HTML serves as a direct means for styling all HTML elements.
HTML Style Examples:
Eg 1:
<body style="background-color:red">
This style attribute defines the background color red for the <body> element |
| |
. |
|
|
|
|
| |
Eg 2:
<h1 style="text-align:left">
This style attribute defines the left alignment for the <h1> element.
Eg 3:
<p style="font-family:calibri new; color:yellow; font-size:50px">
This style attribute is for styling the <p> element. |
| |
|
|
|
|
| |
|
|
| Use only hexadecimal #RGB values for colors. The behavior of named colors is browser-idiosyncratic and totally unpredictable. |
|
| |
|
|
|
|
| You can resize your images without a graphics program by changing the HEIGHT and WIDTH in your image tag. |
|
| |
|
|
|
| |