Text Modification Characters & Tags
Return to Main Page of Ted’s HTML Tutorial
To see lists of special characters which can be inserted into HTML source code documents, go to Special HTML Characters, Special ALT Characters, and Special <Font Face="Symbol"> Characters. For special HTML characters, either the HTML code or the character code (if any) may be used. For special ALT characters, the Alt key on the keyboard must remain depressed while a sequence of numbers on the numeric section of the keyboard is typed. (The Num Lock key must be depressed to activate the numeric keys.) Many special HTML characters and special ALT characters are the same.
Web browsers do not detect carriage returns (line breaks), tabs, extra spaces, nor other white space embedded in an HTML source code document. For instance, even if 10 spaces are present between two words in a source document:
Here, although 2 spaces have been typed between these sentences in the source code:
Frequently, it is desirable to cause a break in a sequence of words or phrases at one or more places, since web browsers do not recognize carriage returns (regular line breaks). This can be done easily by inserting a “break” tag:
- <BR>: forces a line break at that point, causing the text after the break to be displaced down one line.
cornea
iris
crystalline lens
vitreous humor
retina.
cornea<BR>
iris<BR>
crystalline lens<BR>
vitreous humor<BR>
retina.
cornea
iris
crystalline lens
vitreous humor
retina.
Sometimes, it is desirable for a group of words or characters to remain altogether on the same line rather than to be interrupted at the end of the line and continued onto the next line. One way to keep all of these words or characters together on the same line is to insert a character, instead of a regular space, between each word or character in the group. However, especially if the cluster of words or characters is lengthy, there is an easier way to do this—by surrounding the phrase with a pair of “no-break” tags:
- <NOBR>string of words and/or characters</NOBR>: forces the words and/or characters between the tags not to break, even at the end of a line, but rather to remain altogether on the same line.
= c².
a² + b² = c².
Rarely, within a no-break (<NOBR>/</NOBR>) section, there may be a place where it is permissible for the text to break and continue onto the next line. In such a case, a “word break” tag may be used:
- <WBR>: notifies the browser that, at that location, the text in a no-break section may be broken if the end of a line is reached before the no-break section has been completed. A line break is not forced at a <WBR> tag (a <BR> tag does that); rather, it lets a browser know where a line break is allowed, if needed.
Note: Some browsers do not recognize <WBR> tags.
Since web browsers ignore carriage returns (lines breaks) and tabs, then HTML source code text must include “paragraph” tags to create proper spacing between paragraphs:
- <P>paragraph</P>: defines the boundaries of a paragraph. A line break automatically is inserted before and after a paragraph. Also, a line space automatically is inserted before a <P> tag and after a </P> tag (that is, an entire line is skipped between a paragraph and any text before and after it). When a </P> tag ends a paragraph and a <P> tag begins the paragraph following it, only one line space is inserted between the paragraphs. Many browsers recognize only the <P> paragraph tag, and this really is the only tag required to separate paragraphs. However, it is a good habit in HTML word processing to end each paragraph with the </P> tag. This makes proofreading an HTML source code much easier.
Note: A <P> tag has the same effect as two <BR> tags.
On the other hand, the crystalline lens is located directly behind the iris (colored part) of the eye. Light passes through the pupil (hole in the iris) to reach the lens. Both the front and back surfaces of the crystalline lens are convex. The lens expands and contracts to focus light coming from objects at different distances away from the eye.
The eye's lens readily absorbs ultraviolet light from the sun. After years of exposure, a cloudy or opaque "cataract" eventually may develop in the lens, resulting in diminished vision.
<P>On the other hand, the crystalline lens is located directly behind the iris (colored part) of the eye. Light passes through the pupil (hole in the iris) to reach the lens. Both the front and back surfaces of the crystalline lens are convex. The lens expands and contracts to focus light coming from objects at different distances away from the eye.</P>
<P>The eye's lens readily absorbs ultraviolet light from the sun. After years of exposure, a cloudy or opaque "cataract" eventually may develop in the lens, resulting in diminished vision.</P>
On the other hand, the crystalline lens is located directly behind the iris (colored part) of the eye. Light passes through the pupil (hole in the iris) to reach the lens. Both the front and back surfaces of the crystalline lens are convex. The lens expands and contracts to focus light coming from objects at different distances away from the eye.
The eye's lens readily absorbs ultraviolet light from the sun. After years of exposure, a cloudy or opaque "cataract" eventually may develop in the lens, resulting in diminished vision.
- ALIGN="LEFT"|"CENTER"|"RIGHT"|"JUSTIFY": positions the lines of the paragraph at a specific location on the page.
"LEFT" (the default) aligns each line of text with the left margin of the page.
"CENTER" centers each line of text horizontally on the page.
"RIGHT" aligns each line of text with the right margin of the page.
"JUSTIFY" aligns each line of text with both the left and right margins of the page, creating non-uniform spacing between words.
Note: Many browsers do not recognize the "JUSTIFY" value and treat it the same as a "LEFT" value.
<P ALIGN="LEFT">I gazed down into valleys,<BR>
At the snowcaps white as cream,<BR>
Then soared above the puffy clouds—<BR>
Too bad it was a dream!</P>
<H3 ALIGN="CENTER">High Flying</H3>
<P ALIGN="CENTER">I gazed down into valleys,<BR>
At the snowcaps white as cream,<BR>
Then soared above the puffy clouds—<BR>
Too bad it was a dream!</P>
<H3 ALIGN="RIGHT">High Flying</H3>
<P ALIGN="RIGHT">I gazed down into valleys,<BR>
At the snowcaps white as cream,<BR>
Then soared above the puffy clouds—<BR>
Too bad it was a dream!</P>
High Flying
I gazed down into valleys,
At the snowcaps white as cream,
Then soared above the puffy clouds—
Too bad it was a dream!
At the snowcaps white as cream,
Then soared above the puffy clouds—
Too bad it was a dream!
High Flying
I gazed down into valleys,
At the snowcaps white as cream,
Then soared above the puffy clouds—
Too bad it was a dream!
At the snowcaps white as cream,
Then soared above the puffy clouds—
Too bad it was a dream!
High Flying
I gazed down into valleys,
At the snowcaps white as cream,
Then soared above the puffy clouds—
Too bad it was a dream!
At the snowcaps white as cream,
Then soared above the puffy clouds—
Too bad it was a dream!
Another way to isolate and even align an entire section of text is with the use of “division” tags:
- <DIV>section of text</DIV>: defines the boundaries of a section of text and divides or separates that section from the rest of the text. A line break automatically is inserted before and after a divided section.
Note: For the most part, <DIV> and </DIV> tags function like <P> and </P> tags, except that a line space is inserted before a <P> tag but not before a <DIV> tag, and a line space is inserted after a </P> tag but not after a </DIV> tag.
- ALIGN="LEFT"|"CENTER"|"RIGHT": positions the lines of the divided section at a specific location on the page.
"LEFT" (the default) aligns each line of text with the left margin of the page.
"CENTER" centers each line of text horizontally on the page.
"RIGHT" aligns each line of text with the right margin of the page.
"JUSTIFY" aligns each line of text with both the left and right margins of the page, creating non-uniform spacing between words.
Note: Many browsers do not recognize the "JUSTIFY" value and treat it the same as a "LEFT" value.
I gazed down into valleys,<BR>
At the snowcaps white as cream,<BR>
Then soared above the puffy clouds—<BR>
Too bad it was a dream!</DIV>
<DIV ALIGN="CENTER"><H3>High Flying</H3>
I gazed down into valleys,<BR>
At the snowcaps white as cream,<BR>
Then soared above the puffy clouds—<BR>
Too bad it was a dream!</DIV>
<DIV ALIGN="RIGHT"><H3>High Flying</H3>
I gazed down into valleys,<BR>
At the snowcaps white as cream,<BR>
Then soared above the puffy clouds—<BR>
Too bad it was a dream!</DIV>
High Flying
I gazed down into valleys,At the snowcaps white as cream,
Then soared above the puffy clouds—
Too bad it was a dream!
High Flying
I gazed down into valleys,At the snowcaps white as cream,
Then soared above the puffy clouds—
Too bad it was a dream!
High Flying
I gazed down into valleys,At the snowcaps white as cream,
Then soared above the puffy clouds—
Too bad it was a dream!
Frequently, it is desirable to center text (such as headings, graphic images, tables, and other things) horizontally on a page. Although the <P ALIGN="CENTER"> & </P> tags can be used to do this, it often is simpler and preferable to use “centering” tags:
- <CENTER>text, graphic image, table, etc.</CENTER>: horizontally centers print and other objects on a page. A line break automatically is inserted before and after anything surrounded by centering tags.
<IMG SRC="graphics/welcome.gif" ALIGN="ABSMIDDLE" WIDTH="279" HEIGHT="67"> <FONT SIZE=6 COLOR="#BAA21C"><B><FONT COLOR="#000000">to my</FONT> <FONT FACE="Lucida Handwriting, Times New Roman">Web Page!</B></FONT></FONT>
</CENTER>
| to my Web Page! |
On occasion, one may wish to create subscripts and superscripts in the text. To do this, “subscript” and “superscript” tags may be used:
- <SUB>number or character</SUB>: lowers a number or a character slightly below the midline level and reduces its font size by 1 degree.
- <SUP>number or character</SUP>: elevates a number or a character slightly above the midline level and reduces its font size by 1 degree.
Note: Some browsers do not recognize <SUB> & </SUB> nor <SUP> & </SUP> tags.
<CENTER>SULFURIC ACID (H<SUB>2</SUB>SO<SUB>4</SUB>)<SUP>§</SUP><BR><BR>
<SUP>§</SUP>Highly Corrosive and Poisonous.<BR>
Handle with Extreme Caution.</CENTER>
§Highly Corrosive and Poisonous.
Handle with Extreme Caution.
At times, it is too complicated and time-consuming to include the proper spacing and other formatting in the HTML source code text—for instance, when creating some charts or tables. There is a way around this problem, though, and this is by using “preformatting” tags:
- <PRE>text</PRE>: preformats text, preserving the spacing between the words and characters as typed in the source code. The font of preformatted text, appearing on a browser, is a monospaced Courier font. A line space automatically is inserted before and after preformatted text (that is, an entire line is skipped between the preformatted text and any text before and after it).
English Español Français Italiano Deutsch
1 one uno un uno eins
2 two dos deux due zwei
3 three tres trois tre drei
4 four cuatro quatre quattro vier
5 five cinco cinq cinque fünf
English Español Français Italiano Deutsch
1 one uno un uno eins
2 two dos deux due zwei
3 three tres trois tre drei
4 four cuatro quatre quattro vier
5 five cinco cinq cinque fünf
</PRE>
NUMBERS 1-5 in VARIOUS LANGUAGES English Español Français Italiano Deutsch 1 one uno un uno eins 2 two dos deux due zwei 3 three tres trois tre drei 4 four cuatro quatre quattro vier 5 five cinco cinq cinque fünf
When a lengthy quote or other section of text needs to be set apart from the rest of the text, “blockquote” tags may be used:
- <BLOCKQUOTE>text</BLOCKQUOTE>: sets blocks of text apart from the main body of text. The blocked text is indented on the right and on the left. A line space automatically is inserted before and after blocked text (that is, an entire line is skipped between blocked text and any text before and after it). Blockquoted text may be nested inside blockquoted text (one block inside of another block inside of another block).
One out of four people in this country is mentally unbalanced. Think of your three closest friends...and if they seem okay, then you're the one.Thinking of the eccentric mutual friend who had just departed, all three had a good laugh.







0 comments:
Post a Comment