Page 12 - DCAP604_MODERN_WEB_PROGRAMMING_TOOLS_AND_TECHNIQUES_I
P. 12
Modern Web Programming Tools and Techniques – I
Notes <TITLE>My Home Page</TITLE>
</HEAD>
<!-- Written by me -->
<!-- Created: yesterday -->
<!-- Last modified: today -->
<BODY>
This is where the text goes.
</BODY>
</HTML>
The Paragraph Tag
To separate your text into paragraphs use the <P> tag. For example, the following HTML source
code:
This is should be the end of my first paragraph in HTML.
This should be the start of my second paragraph in HTML.<P>
And this is should be my third paragraph in HTML.<P>
Would display this on the user's screen:
This is should be the end of my first paragraph in HTML. This should be the start of my second
paragraph in HTML.
And this is should be my third paragraph in HTML.
Normally all text in an HTML document is treated like one long paragraph. Indented or blank
lines which normally indicate start of paragraphs in text are ignored. The <P> tag is used to
separate paragraphs of text within an HTML document. The <P> tag forces an end of line and
forces a blank line before the next paragraph.
The <P> tag is only required to separate paragraphs in a document. It is not required after other
tags which imply a line break.
The BR Tag
Normally different browsers decide where is the best place to line breaks in your HTML
document. However, there may be times when you want to control where one line ends and the
next begins. Use the <BR> tag to do this.
The <BR> tag is very similar to the <P> tag in that both separate text, but the <BR> tag does not
include a blank line before starting the next line of text. In other words, the lines are single
spaced, not double spaced. For example, the following HTML source code:
This is should be the end of my first paragraph in HTML.
This should be the start of my second paragraph in HTML.<BR>
And this is should be my third paragraph in HTML.<BR>
Would display this on the user's screen:
This is should be the end of my first paragraph in HTML. This should be the start of my second
paragraph in HTML.
8 LOVELY PROFESSIONAL UNIVERSITY