Writing our code with CSS
While HTML can be responsible for specifying the actual content of a web page, CSS is again about customizing the visual aspects of that content. Looking at the <p></p> tag in the previous HTML example, you might say that we already have the ability to customize the styling of HTML content (for example, the color and the alignment of the text).
However, the way we applied the style to the text in the previous example—while it can work for small, simple web pages—is not efficient and extensible in large web projects. Instead, we can have a separate file to specify the styling of individual HTML elements in a systematic way, and that is the problem CSS addresses.
Inspect the external.html file in our current folder, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access