Harvard Extension School, Fall 2018
CSCI E-12 Fundamentals of Web Site Development

## Visibility

Visibility controls whether or not an element is displayed. The element still takes up space in the block model.

Example 6.2 - visibility: hidden; - Example 6.2 (Without Styles) | <ul><li>American League <ul><li id="ale">East <ul><li>Baltimore</li><li>Boston</li><li>New York</li><li>Toronto</li><li>Tampa Bay</li></ul></li><li id="alc">Central <ul><li>Chicago</li><li>Cleveland</li><li>Detroit</li><li>Kansas City</li><li>Minnesota</li></ul></li><li id="alw">West <ul><li>Los Angeles</li><li>Oakland</li><li>Texas</li><li>Seattle</li></ul></li></ul></li></ul> #ale { visibility: hidden; } #alw { visibility: hidden; } * { font-family: arial,helvetica,sans-serif; }

- Markup
- Style
- Screenshot

     <ul>
    <li>American League<ul>
    <li id="ale">East<ul>
    <li>Baltimore</li>
    <li>Boston</li>
    <li>New York</li>
    <li>Toronto</li>
    <li>Tampa Bay</li>
    </ul></li>
    <li id="alc">Central<ul>
    <li>Chicago</li>
    <li>Cleveland</li>
    <li>Detroit</li>
    <li>Kansas City</li>
    <li>Minnesota</li>
    </ul></li>
    <li id="alw">West<ul>
    <li>Los Angeles</li>
    <li>Oakland</li>
    <li>Texas</li>
    <li>Seattle</li>
    </ul></li>
    </ul></li>
    </ul>

In `style` element (`<style type="text/css">`) within `head` element:

    #ale { visibility: hidden; }
    #alw { visibility: hidden; }
    * { font-family: arial,helvetica,sans-serif; }

Full list for the American League:

Copyright © David Heitmeyer