HTML
|
JavaScript
Alignment
Basics
Character Codes
Colors
CSS
DIVS
Forms
Frames
Links
Lists and Bullets
Meta Tags
Multimedia
Pictures
Spacing
Tables
Text
Advanced Spacing
Basic Spacing
Advanced Spacing
252
Pre-Formatted Text
Description
Pre-Formatted Text can be a very interesting and useful part of HTML. The tags for Pre-Formatted Text are <PRE> for the starting tag and </PRE> for the closing tag. The text in the middle is affected by the tags. What it does, is allows you to type text and not to have to worry about the <BR> and <P> tags. This is because it will show up on the web page as it shows up in your HTML document. This can be very useful for creating columns that need to be lined up. However, we recommend not to use this tag all the time.
Code
<PRE>
Welcome!
I hope you like my site
</PRE>
Output
Welcome! I hope you like my site
Practice
<PRE> Welcome! I hope you like my site </PRE>
Horizontal Rule
Description
The tag for a horizontal rule is <HR>. This tag will put a line across the screen. Below, is an example that uses the Horizontal Rule. You can also choose the color, width, size and no-shading for the horizontal rule by adding (inside of the <HR> tag) :
width="xx", where xx is the size in percent or pixels of how wide you want it to be
noshade , which means no shading
color="xxxxxx" , where xxxxxx is the hexidecimal code of a color
size="x, where the x can be 1-7. This determines how thick the line is
Code
Hello World!
<HR>
Welcome To My Site
Output
Hello World!
Welcome To My Site
Practice
Hello World! <HR> Welcome To My Site
Subscript
Description
This tag makes the text appear below the normal line of writing. The subscript tag looks like <SUB>. The starting tag is <SUB> and the closing tag is </SUB>. The text between the two is affected. Here is an example using the subscript tag.
Code
<SUB>Hello World!</SUB> Normal Text
Output
Hello World!
Normal Text
Practice
<SUB>Hello World!</SUB> Normal Text
Superscript
Description
This tag makes the text appear above the normal line of writing. The superscript tag looks like <SUP>. The starting tag is <SUP> and the closing tag is </SUP>. The text between the two is affected. Here is an example using the superscript tag.
Code
<SUP>Hello World!</SUP> Normal Text
Output
Hello World!
Normal Text
Practice
<SUP>Hello World!</SUP> Normal Text
Block Quote
Description
This tag makes the text indented one tab (5 spaces). The blockquote tag looks like <BLOCKQUOTE>. The starting tag is <BLOCKQUOTE> and the closing tag is </BLOCKQUOTE>. The text between the two is affected. Here is an example using the blockquote tag.
Code
<BLOCKQUOTE>
Hello World! Welcome To My Site. I hope you enjoy looking at it.
</BLOCKQUOTE>
Output
Hello World! Welcome To My Site. I hope you enjoy looking at it.
Practice
<BLOCKQUOTE> Hello World! Welcome To My Site. I hope you enjoy looking at it. </BLOCKQUOTE>
Advertisements