Manipulating text with HTMLText manipulation is the changing of text styles outside of the body tag. You can change the properties of any single letter or word whenever you please. In this section we will discuss the base- font, the bold tag, the italic tag, the underline tag, the base font, preformatted text and typewriter text. We will also discuss changing font color, size, and faces "on the fly", headings, empty lines and line breaks, "big" text, listing and addresses, text alignment and centering.
The basefont tag commands your browser on which font
specifications you want used as default throughout the
document.
There are three main elements to this tag. First we will
specify a default color:
You can make text appear bold by adding text between
these two easy-to-remember opening and closing tags:
<b> bold text </b>
Italic text is created the exact same way as bold text,
only the "b" is replaced by an "i". Look:
Underlined text does not work on all browsers in both tags.
The em tag sometimes italicizes on Netcape and underlines
on Internet Explorer, but the one tag that always underlines
no matter which browser is this tag:
<u>underlined text</u>
How simple is that?
< t t > and < p r e > and < k b d > and
Preformatted text and typewriter text perform the same function
They each set text off from the other text by a paragraph seperation
and change them to a courier-like font. Here is an example: preformatted text</pre>
Using these four following tags does the same:
<tt> or <kbd> or <plaintext> or <samp>....
</samp></plaintext></kbd></tt> I'm not exactly sure why someone would want to do that. It's ugly. And there's more than enough tags to do the same thing. Beats me.
The font tag is used to change font elements "on the fly", as
opposed to changing their default settings in the body tag. This
tag opens with the <font attribue=____> tag and closes with the
</font> tag.
Tying all those elements to change the text appearance considerably
requires nothing more than joining them. Here is an example of using
all three elements in a tag:
The heading tag is used to increase the size and thickness
of words and put an empty line after them. This tag creates
a heading:
You insert a number, 1 - 6, into the spot holding the pound
symbol. In heading size 1 is the largest and 6 the smallest. The text
in between the opening and closing tags will be bold.
Here are examples of the 6 heading sizes: H1 is largestH2 is the second biggestH3 is the sorta bigH4 is almost normal.H5 is really rather smallH6 is smallYou can use the align tag with this. Look: This is H3 to the right
That was done with this: Blockquotes are quotes that are indented on both sides, therefore "blocking" that section of text into a snug, little section of the body, seperated from the rest of the information, and therefore more visible. They have little use otherwise, except in layout. It's a good way to keep text away from the sides of the screen, where there might be something on your background you might want people to see. Here is an example of a blockquote:
If you wanna leave, take good care. Hope you have a lot of nice things to wear. But then again a lot of nice things go bad out there. Oooh, baby, baby it's a wild world. It's hard to get by just upon a smile. Oooh, baby, baby it's a wild world, and I'll always remember you like a child girl. -Cat Stevens, Wild World And here is the HTML for that: <BLOCKQUOTE>If you wanna leave, take good care. Hope you have a lot of nice things to wear. But then again a lot of nice things go bad out there. Oooh, baby, baby it's a wild world. It's hard to get by just upon a smile. Oooh, baby, baby it's a wild world, and I'll always remember you like a child girl. -Cat Stevens, Wild World</BLOCKQUOTE> Blockquotes can also be used to slightly align text off of the two sides of the browser, but I think I already said that. Oh, well. Now that I said it twice maybe it'll help twice as much. The q tag is used to define a quote withing a blockquote (it is nested). Nothing special, just figured someone might care.
Rob said"go to hell"when the police officer told him to be subordinate. Rob hates the word subordinate. He thinks it has evil and demeaning connotations. In the above example, the words "go to hell" are enclosed in the q tag, but you cannot tell unless you check out the source. So, what I am trying to say is the q tag is more-or-les useless.
The tag is the evilest command ever handed
down and given to people with computers. No single HTML tag,
not even the frame tag, has evoked as much fear and disgust
into the hearts of innocent visitors as the tag has.
It's a virtual tool of satan, if you ask me. Check out this link, I find it funny. And look at the URL. Odd, huh? I have no idea how I happened upon this page, but it still freaks me out a bit. Click here. < b r > and < n o b r > and < p >
Empty lines and paragraph breaks are two of
the most basic elements of the text in the body of
your web page. Text has to look nice in order to
get visitors to bother reading what it is you have
to say to them. Just like in English class, the nicer
your presentation looks, the more attention it gets.
Now, in order to end a line and begin a new line with
no vertical space in between the two lines, you use the tag: Examples of both:
The cats in the cradle and the silver spoon,
little boy blue, and the man in the moon, when you
comin' home said "I don't my boy, we'll have a good time then.
In this example, the tag for a break was used
after the word "don't", and the paragraph tag was
used after the word "then".
The big tag is a fun tag. At least I think so.
This tag with each use increases your font size by one.
If you had a size 5 font, doing this:
The small tag is equally as fun as the big tag,
and equally as easy. Look:
The listing tag shrinks your text down to a very small font,
just about the size of those very small listings at the bottom of
certain very official looking pages. It's nice to use when writing
a copyright line or a disclaimer. This stuff is the small print.
That example was created with this HTML: The address tag is very similiar to the previous tag we did, the listing tag. This tag, though, isn't used for the default size of most disclaimer lines but instead is used for the default size and style of most address lines, like this one: Robert Romano 29 Water Road Rocky Point, NY 11778
That was created with this code:
Aligning blocks of text to one side of the page or in the center
requires a wider use of the "p" tag. Instead of just using that tag
with only it's opening as an empty line tag, we will now use the
closing tag also to block off how much text will and won't be aligned.
Here is an example: I don't mind stealing bread from the mouths of decadance, and I don't mind stealing bread when their cup's already over filled. (I think I screwed up the lines)
That was done with this HTML: This is aligned to the right. You can also use "center" and "left" as command elements in this tag. The div tag is used to block off parts of the html document that are assigned certain values. This tag is used, like the p tag, in html to create a paragraph block of text with one line of white space around it. In CSS, though, this tag is widely used to differentiate which "styles" apply to which blocks of text. The span tag is used in html to seperate inline objects. An inline thingie is one that is not seperated by white space, such as the b and i tags. Span can be used in style sheets, like the div tag, to seperate elements with different attributes.
Centering images and text on your pages will really improve the
overall design and layout of the page. Not only do images
often interfere with text and other page content if not "restrained"
correctly, but they look boring if they're all lined up against the
left edge of the browser window.
and so is this line, and even this one. <center>This line is centered,<br> and so is this line,<br> and even this one.</center> A house divided against itself A house divided against itself <center>cannot stand. </center> A house divided against itself <center>cannot stand. </center> A house divided against itself <center>cannot stand. </center> A house divided against itself <center>cannot stand. </center> <center><img src="button.gif"></center> That Paint Shop Pro picture is centered, as is the top text example. In the second example, the one featuring part of "honest Abe's" House Divided speech, I centered part of each line, but not the other parts. As you can see now, like with headings, tags often force line breaks. Mulitple columns will not be covered on this page. Instead, click here for the tutorial. I do this because many browsers do not support columns and it will screw up this page if your browser can't handle it. The spacer tag is used to make white space. It's really quite easy and useful with the layout. As with columns I will not be showing it on this page because a big blob of white space would be ugly in this case. Go here.
The subscript tag is used to set text lower than the rest.
I'm sure I don't need to get too into explaining it since
you should be able to see it right now, on the words
subscript.
The super tag does the opposite of the subscript
tag. Simple enough. The HTML for superscript is: The "other" title tag can be used with IE4 to create an alt box when you put the mouse over a link. If you are using IE4 you might notice a "tooltip" or alt box over this link to YAHOO! Do you dig it? If you're using Netscape you don't. Bye, bye.
|
Related Links FONT Properties in CSS Interactive HTML Tag Reference |