O'Reilly logo

HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition by Bruce Hyslop, Elizabeth Castro

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

Displaying and Hiding Elements

The sample page in Image helps demonstrate the difference between the display and visibility properties.

Image Here’s the HTML: three simple img elements. The middle one has a class of hide, which I’ll take advantage of in an example later. By default, img elements display inline Image.

...<body>     <img src="assets/img/top.jpg" width="300" height="125" alt="At the top" />     <img src="assets/img/middle.jpg" width="300" height="100" ...

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