O'Reilly logo

Teach Yourself Visually™ HTML5 by Mike Wooldridge

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 4

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.

image

Understanding Style Sheets

Create an Internal Style Sheet

Create an External Style Sheet

Link to a Style Sheet

Apply a Style Locally ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required