January 2018
Intermediate to advanced
678 pages
20h 16m
English
In this section, we address CSS syntax details. First—the syntax for the style container. Refer back to Figure 3.1 and note how the three CSS rules are enclosed in a style container. Here’s the relevant code:
<style>
* {text-align: center;}
hr {width: 50%;}
h2, p {font-style: italic; color: blue;}
</style>
If you go back to the figure, you can see the style container positioned at the bottom of the web page’s head container. It’s legal to position it in the body container, but don’t do it. Coding conventions suggest positioning it at the bottom of the web page’s head container. By following that convention, other web developers will be able to find your CSS rules quickly.
In the style start tag, it’s ...
Read now
Unlock full access