Types of styles:
- Inline
- Internal
- External CSS
Inline Styles : This kind of style takes values inline with the html tag
Try this example:
Test Font
Internal Styles : Here we define style under head tag and use it for our tags.
Inside head tag we will define styles as given in the examples. Internal styles can be used in three ways
Try this example :
body {
background-color: gray
}
p {
color: red;
}
h3 {
color: white;
}
External CSS : When using CSS it is preferable to keep the CSS separate from your HTML. Placing CSS in a separate file allows the web designer to completely differentiate between content (HTML) and design (CSS). External CSS is a file that contains only CSS code and is saved with a “.css” file extension. This CSS file is then referenced in your HTML using the
instead of
This is example of internal css
This is example of internal css
This is example of internal css
Inline css code
This is the example of basefont…
This is the example of basefont…
This is the example of basefont…