HTML5, CSS3, and JavaScript Fourth Edition

(Ben Green) #1

CHAPTER 28. STYLING WITH CSS 259


Although inline styling is permitted, using inline style is regarded as a bad
thing. The best practice is to separate the styling into a style sheet, such
as the internal style sheet we will mention next. The HTML part of the
document can then hook onto the styles by using class= and id= as needed.


28.2 Internal Style Sheet


When you usein the head of an HTML document,
it is called an internal style sheet.


If we want all h1 headings to use red text, we could do it like this:


...