<BR>
tag for this purpose.
NOTE: Until recently the <P> (paragraph)
tag was also extensively used as the equivalent of two
<BR><BR> tags to provide a blank
line between paragraphs. This is no longer considered a correct
use of this tag, for reasons to be explained later.
|
<BR>
(or "break") tag causes
the text immediately afterwards to start on a new line.
You can put in as many <BR>
tags in a row as you want.
<BR>
tag is a "single" tag; that is, it can stand alone.
The <HTML>
and </HTML>
tags you used on your first page, on the
other hand, are "paired" tags, which means you always have to use
two (the second will start with a slash just after the "<
"
bracket). Think of these as "on/off" tags. For example, if you
want to make some of your text bold, put a <B>
(or "bold") tag
just before the text to be affected, and a </B>
tag at the point
where you want the bolding to stop. Another popular tag of this
kind is the <I>
(for "italic") tag, which should eventually
be followed by an </I>
tag.
Most HTML tags come in pairs (single tags such as <BR> , <IMG> ,
etc. are the exception, not the rule). A good rule of thumb in HTML is "If you open it, close it."
|
<BR>
,
<B>
and <I>
tags. Remember, one of the great pluses of HTML
is that you can make your changes and immediately call up the
changed file on your browser to see the results. (But don't
forget to save your changes first; the browser loads your HTML
file from your hard disk, not your screen, and if you make
changes and don't save them the browser will still be displaying
your older--unchanged--file.)
<H1>
, <H2>
, <H3>
, up to <H6>
(<H1>
is the largest and <H6>
the smallest). You must always use a closing version of the tag
(</H1>
, </H2>
, etc.) at the end of the heading. Be sure the
numbers match. (Try making the first sentence of your text page
into a heading and view the results).
ALIGN="CENTER"
to cause the heading to be centered on
the page:
<H1 ALIGN="CENTER">My centered heading</H1>
Terms to know from this lesson |
White space: Any combination of spaces, tabs, and carriage returns in the HTML code, which are collectively rendered as one space by the browser |
<HTML> and </HTML> tags: Enclose all of the HTML code making up your page (excepting only the <!DOCTYPE> tag, to be covered later). |
<HEAD> and </HEAD> tags: Enclose the "head" portion of the document, which contains the TITLE, search keywords, and other data not displayed as part of your actual page. |
<TITLE> and </TITLE> tags: Enclose the "title" of your document, which displays in the title bar of your browser and is also used as the title of your page when saved as a bookmark. No other tags of any kind can appear between these tags, only text. |
<BODY> and </BODY> tags: Enclose the actual "Web page" (the part appearing in your browser's main window). All of your actual visible page content
must be contained between these tags. |
<BR> ("break") tag: Inserts a carriage return in the displayed content |
<B> and </B> ("bold") tags: Enclose text to be displayed in bold. |
<I> and </I> ("italic") tags: Enclose text to be displayed in italics. |
<H1> and </H1> , <H2> and </H2> , etc. ("heading") tags: Enclose text to be displayed and interpreted as
a heading. The smaller the number, the larger the heading. These tags will also add a blank line before and after
the heading. |
Attribute: An attribute modifies a tag or gives more information about the contents of the tag. Attributes always appear in the opening tag and always in the form attribute_name="value" .
The quotes are required! |
ALIGN attribute: Controls the placement of text or graphic enclosed or
inserted by its parent tag |
![]() | ![]() | ![]() | ![]() | ![]() |
![]() | ![]() | ![]() | ![]() | |