O'Reilly logo

JavaScript Step by Step by Steve Suehring

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 15. JavaScript and CSS

After reading this chapter, you'll be able to

  • Understand the basics of Cascading Style Sheets (CSS).

  • Understand the relationship between JavaScript and CSS.

  • Use JavaScript to change the style of an individual element.

  • Use JavaScript to change the style of a group of elements.

  • Use JavaScript to provide visual feedback on a Web form using CSS.

What Is CSS?

Cascading Style Sheets (CSS) is a method for specifying the look and feel of a Web page. Items such as color, fonts, and layout can all be applied using CSS.

Figure 15-1 shows a basic Web page. It's fairly boring—or at least the layout is.

A basic Web page with no styles applied

Figure 15-1. A basic Web page with ...

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