JavaScript EditorDebugger script     Dhtml css 



Team LiB
Previous Section Next Section

Spacing, Tabs, and Returns: For Your Eyes Only

In HTML, the elements themselves do all your page's formatting. A browser ignores more than one space inserted into text (two, five, or ten spaces all appear as if they are a single space), as well as all tabs and hard returns (unless they're inside a PRE element, which you will learn about later). Any formatting of your HTML file using extra spaces or tabs and returns is for your eyes only. So feel free to use all the extra spaces, tabs, and returns you want to make your raw HTML files more readable as you work on them. For instance, insert a hard return in front of the UL element's start tag and insert three spaces in front of each LI element in the bulleted list you created earlier (the hard return is indicated by a "¶" character and spaces are indicated by "·" characters):

<h2>Personal Information</h2>
<p>Here is some more information about me:</p>

<ul>
···<li>I have red hair and green eyes.
···<li>I <i>like</i> science and math.
···<li>I'm taller than my boyfriend.
···<li>I live to skate!
···<li>When not studying or skating, I like to go to the movies.
</ul>

Be sure to check this out in your browser. Save your file, switch over to your browser, and refresh the display of your page. You should notice no difference in your page, since browsers completely ignore empty P elements and spaces.


Team LiB
Previous Section Next Section


JavaScript EditorDebugger script     Dhtml css