Sams Teach Yourself HTML, CSS & JavaScript Web Publishing in One Hour a Day

(singke) #1
ptg16476052

Comments 65

4


What if you want more (or less) space between your paragraphs than the browser pro-
vides by default? The answer is to use CSS. As you’ll see, it provides fine control over
the spacing of elements on the page, among other things. Figure 4.3 shows what happens
when I add another paragraph about Enigern and the dragon to the page. The paragraph
breaks are added between the closing and ope ning

tags in the text.


Input ▼


The dragon fell to the ground, releasing an anguished cry and
seething in pain. The thrust of Enigern's sword proved fatal as
the dragon breathed its last breath. Now Enigern was free to
release Lady Aelfleada from her imprisonment in the dragon's lair.


Output ▼


The closing

tag, while not required, is important for defining the exact contents of a
paragraph for CSS. Most web designers use it automatically, but if you don’t need it, you
can leave it out of your HTML.


Comments


You can put comments into HTML pages to describe the page itself or to provide some
kind of indication of the status of the page. Some source code control programs store the
page status in comments, for example. Text in comments is ignored when the HTML file
is parsed; comments never show up onscreen—that’s why they’re comments. Comments
look like the following:



FIGURE 4.3
An HTML para-
graph.

Free download pdf