Page 158 - HTML5
P. 158
<style type="text/css">
p {
background-color: blue;
}
</style>
</head>
Inline Style
You can style a specific element by using the style attribute:
<span style="color: red">This text will appear in red.</span>
Note: Try to avoid this -- the point of CSS is to separate content from presentation.
Multiple Stylesheets
It's possible to load multiple stylesheets:
<head>
<link rel="stylesheet" type="text/css" href="general.css">
<link rel="stylesheet" type="text/css" href="specific.css">
</head>
Note that later files and declarations will override earlier ones. So if general.css contains:
body {
background-color: red;
}
and specific.css contains:
body {
background-color: blue;
}
if both are used, the background of the document will be blue.
Read Using HTML with CSS online: https://riptutorial.com/html/topic/4536/using-html-with-css
https://riptutorial.com/ 142

