Ryan's District
November 22, 2008, 06:03:22 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Ryan's District Lottery: Claim your ticket or check
Jackpot details  
 
   Home   Help Search Chat Calendar Chess Shop Login Register  
Digg This!
Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: HTML course - The <BR> (break) Tag  (Read 4130 times)
0 Members and 1 Guest are viewing this topic.
ben2ong2
Quality Poster
Paid
Hero Member
*****

Reputation: 17
Offline Offline

Gender: Male
Posts: 2374
9976.80 RD$

View Inventory
Send Money to ben2ong2

View Profile Awards
« on: October 03, 2006, 04:46:49 PM »

Let's try out an experiment. Open Notepad and type in the following code exactly as I have written. Check the results in a browser.

<HTML>
<HEAD>
<TITLE>Testing the BR tag</TITLE>
</HEAD>
<BODY>
This is a long piece of text consisting of three
sentences and shows you the functions of the
Line Break tag. This tag is used quite frequently
to add line breaks in the HTML code. It is also used
to add blank lines to a document.
</BODY>
</HTML>

The text is placed on five lines. When you display the file in a browser, you shall find that the line breaks we had introduced (by hitting 'Enter' key) are ignored by the browser.
The browser 'wraps' the text only at the end of the window space. In the browser window, click on VIEW - SOURCE (or PAGE SOURCE in Netscape). The line breaks are still very much present! So what is happening? Try hitting the 'Enter' key 10 times after the first line, the browser will ignore all these. This is because HTML has a special Line Break Tag, <BR>. You should use this tag to introduce any line breaks.

<HTML>
<HEAD>
<TITLE>Testing the BR tag</TITLE>
</HEAD>
<BODY>
This is a long piece of text consisting of three<BR>
sentences and shows you the functions of the<BR>
Line Break tag. This tag is used quite frequently<BR>
to add line breaks in the HTML code. It is also used<BR>
to add blank lines to a document.<BR>
</BODY>
</HTML>
When the above code is displayed in a browser, the text will be broken into five lines.

The <BR> tag has no end tag because it doesn't need too. Just the presence of <BR> adds a line break.

The opposite of the <BR> tag is the <NOBR> tag. It has an ending </NOBR> tag. Text placed between these tags will be displayed in a single line, which might result in horizontal scrolling if the text too is long. Try this out with the following code.

<HTML>
<HEAD>
<TITLE>Testing the BR tag</TITLE>
</HEAD>
<BODY>
<NOBR>
This is a long piece of text consisting of three
sentences and shows you the functions of the
NOBR tag. This tag is causes the text between it
to be displayed in a single line and will result
in horizontal scrolling in the browser if the text
is too long and continues and continues and continues
and continues and continues and continues and continues
and continues and continues and continues and continues
and continues and continues and continues and continues
and continues and continues and continues and continues
and continues and continues and continues and continues
and continues and continues and continues and continues
and continues and continues and continues and continues
and finally ends here.
</NOBR>
</BODY>
</HTML>

Logged

You are not allowed to view links.
Register or Login
Free Paid Survey & Home Business Resources.

You are not allowed to view links.
Register or Login
Free Article Directory | Quality Content
Ryan's District
« on: October 03, 2006, 04:46:49 PM »

 Logged
Pages: [1]   Go Up
  Send this topic  |  Print  
 
Jump to:  

Archive - WAP2 - WAP - imode
Sponsors: RAYAN.tv
-

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 20.754 seconds with 30 queries.

Google visited last this page Yesterday at 06:29:27 AM