Page 35 - DCAP202_Fundamentals of Web Programming
P. 35
Fundamentals of Web Programming
Notes 3.1.3 Paragraphs
To create an empty line between two blocks of text, you need to label those text blocks (or
paragraphs) with the paragraph marker “p”. So, surround your paragraphs with <p> and </p>
like we have done in our example page. Actually, in HTML you do not need the closing tag for
“p”, you can create an empty line after a block by just writing <p>.
!
Caution You do not actually need to leave a blank line between the two paragraphs in your
source code.
Here is an example:
<p>This is the first paragraph. Isn´t it a nice paragraph? It has lots of words in it. It´s such a
nice paragraph that I think it should never end.</p>
<p>This is the second paragraph. It´s also a very nice paragraph
but maybe not as nice as that first one was.</p>
3.1.4 Preformatted Text
The HTML pre element inserts a block of preformatted text. This is exclusively a visual element,
as the semantic of the text remains the same with or without it. In fact, its specifications are
exclusively for visual user agents.
To render this element, we should follow these guidelines:
White space may be left intact, which means that consecutive spaces shouldn’t be stripped.
Text may be rendered with a fixed-pitch font, where all characters have the same width.
Automatic word-wrap may be disabled, so text lines won’t be splitted unless a line break
is found.
The bidirectional processing must not be disabled.
3.1.5 Boldface and Italics
Using bold text will display your text in a thicker font making one or more words really stand
out from the rest and will tend to draw the reader’s attention to these words. This has a variety
of applications and is largely a matter of taste.
Did u know? Bold text is sometimes used for list headers such as in this list of font styles. To
create bold text, place the desired text within the <b>...</b> tags.
Example: <b>Your bold text goes here.</b>
The italics font style slants the text to the right and thus can also be used to draw special attention
to one or more words. You may wish to use italics instead of bold when the bold font style is too
“loud” for your purposes. Italics has a variety of other applications and the use of it is largely a
matter of taste. The italics are often formally applied to the titles of newspapers, magazines and
books, such as when one wants to mention The Times of India. To display text in italics using
HTML, place the desired text within the <i>...</i> tags.
28 LOVELY PROFESSIONAL UNIVERSITY