June 2025
Beginner
817 pages
31h 30m
English
To use the CSS principle so that it makes sense, you should first create the HTML document with logical and semantic HTML elements. You’ve already learned in detail how to create a proper HTML document with HTML elements in the previous chapters. With CSS, you can use rules for the individual HTML elements to determine their appearance. As an example (see Figure 8.2), we’ll use a header element, which has been written as shown here in the HTML document, index.html:
... <header> <h1>My cooking blog</h1> <p>A blog with delicious recipes ...</p> </header>...
Listing 8.1 /examples/chapter008/8_2/index.html
You’ll assign a new style to this HTML element using CSS, which will determine the formatting and ...
Read now
Unlock full access