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" ...

Get HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition now with O’Reilly online learning.

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