Adding CSS Styles

HTML5 code is for defining the meaning of your web page content. To define how your page looks — for example, the size of the text, the background colors, and the spacing around images — you need to use Cascading Style Sheets, or CSS. This chapter gives you the basics about defining CSS styles and assigning them to your HTML tags. Getting a solid foundation with CSS is important in HTML5 because many style features that were available in previous versions of HTML now must be done using CSS.


Understanding Style Sheets

Create an Internal Style Sheet

Create an External Style Sheet

Link to a Style Sheet

Apply a Style Locally ...

Get Teach Yourself Visually™ HTML5 now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.