So, now that you know how to define paragraphs, you are ready to ask about the character formatting. How do they do to create all those text effects and fancy stuff, just with text? Simple, too. This part of the document is intended to help you enhance the look of your info by using font and color effects attractive to people. See my Tips and tricks on style section for info about what to do and what not to do with these invaluable resources.
Example:
<BODY TEXT="#FFFFFF" BGCOLOR="#000000" ALINK="#0000FF" VLINK="#FF0000">as a body tag would render the background of a page black, the text white, the links blue, and the visited links in red.
Tip posted by Ryan Peterson. Visit him on his homepage: http://www.oocities.org/TimesSquare/Arcade/1086
You can specify a base font so that all text in your page renders with that specific font. Do it with the <BASEFONT> tag. This tag accepts the following parameters:
The SIZE parameter specifies the base size for the font, being 3 the default, 1 the smallest and 7 the largest font size. Normally all parameters requiring a font size use this rank of values.
This tag should be before the <BODY> tag. For example, if you wanted all your text to render in Arial font, you would put the following:
<BASEFONT FACE="Arial"> <BODY> Here goes your text.... </BODY>and so on....
You can change the color of the text with <FONT COLOR=colorname>, where "colorname" is a color like "white", "red" or "black", or a hexadecimal value in RGB format (click here for a list of colors in RGB notation). Change the font with the <FONT SIZE=> tag, where SIZE is between 1 and 7 (7 is the largest). If you specify a plus or a minus before the number, you are telling the browser that you want a relative font size. Example:
Original text<BR> <FONT SIZE=+1>Augmentated one size,<BR> </FONT> restored,<BR> <FONT SIZE=-1> diminished,<BR> </FONT> again restored.would render as:
Original text
Augmentated one size,
restored,
diminished,
again restored.
You can specify text colors with the COLOR= attribute in the <FONT> tag. You have to specify a color name or number, in RGB format. Click here if you want to learn more about specifying colors.
You can sum the attributes in one single <FONT> tag, like <FONT FACE="Arial" SIZE=+1>, to apply those attributes to the same text, and you just put one single ending </FONT> tag.
To align text to the right, surround the text you want to align with a <DIV ALIGN=RIGHT> tag, and the corresponding closing </DIV> tag. DIV stands for division. It means the section between the two DIV tags share the alignment attributes you specify in it. It is the only way to specify a section of text as right-aligned. You can put in it ALIGN=JUSTIFY to justify the portion of text.
To center some text quickly, put around it a <CENTER> and the corresponding </CENTER> tag. That will center the text enclosed in the container of the tags (the text between the CENTER tags).
To change the alignment of only one paragraph, put in its <P> tag (the one with which the paragraph begins) an attribute ALIGN=xxx. xxx depends on what you want: you can choose between RIGHT, which will align the paragraph to the right, LEFT which will align the paragraph to the left, JUSTIFY which will justify the text, or CENTER which will center it.
To quote a textm you normally use bigger left and right margins, in HTML markup there's a way to do it easier: the <BLOCKQUOTE>/</BLOCKQUOTE> tag. Begin you quote with a <BLOCKQUOTE> tag, type your text, and end it with the closing </BLOCKQUOTE>. There are examples of this across the document. Are you able to identify them?
Some times, it's worth to put some text in fixed-width text (letters are all the same size) and use standard carriage returns, for example when putting a text extract. Use the <PRE> tag, that displays the text in fixed-width type (like a teletype). The carriage returns are the ones you put between the tags, there is no auto line wrapping. Close the fixed-width type with the </PRE> tag. All of the example texts in this document are rendered this way. To put the special signs like < and > you should check the HTML Entities list, which gives you a mean to display EVERY single special character.
Put in your <BODY> tag a BACKGROUND="image.gif" parameter, where "image.gif" is the path to the file you want to put. For example:
<BODY BACKGROUND="starwars.gif">tells the browser to put the image "starwars.gif" as a background image, behind the text.
In the <BODY> tag, along with the BACKGROUND= attribute put another attribute that says BGPROPERTIES=FIXED and that will fix the background image.
Member of the ILE | Free Home Pages at GeoCities |