![]() |
||||||||
HomeBasicsUsing FlagsMore Text FlagsPlacing ImagesColorsBackgroundsLinking PagesTablesGetting Online |
HTML Basics, Tips and Tricks |
|||||||
USING FLAGS
Okay, before we start doing fancy stuff, you gotta know about flags. Not the kind that you wave around or stick up a flagpole... I'm talking about HTML flags. What you use to set certain sections apart as bigger text, smaller text, bold text, underlined text, blah blah blah, is a series of flags. Think of them as commands. Let's say you want a line of text to be bold. To accomplish that, you put a flag at the exact point you want the bold lettering to start and another flag where you want the bold lettering to stop. If you want just a word to be italic, you place a "starting" italic flag at the beginning of the word and an "ending" italic flag at the end of the word. Is this making sense so far? All flag (also known as command) formats are the same. They begin with a less-than sign: < and end with a greater-than sign: >. That's how it ALWAYS is. What goes inside the < and > is the flag. Learning HTML is learning the flag to perform whatever command you want to do. Here's an example: The flag for bold lettering is
"B". (that makes sense...) Here's what the flags look like to turn the word
"HALLELUJAH!" bold: <B> HALLELUJAH!</B> Look at what's happening. 1. <B> is the beginning bold
flag
Q. Is the end flag for other commands
simply the begin flag with the added slash? Q. Will the flags show up on my
page? Q. Your bold flag uses a capital
"B". Do all HTML flags use a capital letter? Q. Must everything have a flag
to show up on the page? Q. What if I forget to add the
end flag or forget to add a slash to the end flag command? Q. Do all HTML flags require both
a begin and end flag, like above?
The majority of HTML flags do require both an open and a close flag (a begin and end flag). Most are very easy to understand because the flag is obvious. Here are a few and what they do to text: <B>Bold</B>
Just make sure to begin and end both. Like so: <B> and <I> give you Bold and Italic.ÊIf you use multiple flags to alter text, make a point of not getting the end flags out of order. Look at this: <B><I>Blah Blah</B></I>ÊÊÊÊ In terms of format, the example above is not correct. The end flags are out of order in relation to the start tags. Follow this rule: Always set the beginning and end tags at the same time, always placing them on the farthest end of the item being affected. Here, again, is the example above in correct form: <B><I>Blah Blah</I></B> ÊÊÊÊÊ Notice the Bold flags are on the far ends. Next in line are the Italics, and finally the Bold flags are closest to the affected text. Just keep setting commands at the farthest ends each time you add them, and you'll stay in good form.
<HR> This command gives you a line across the page. (HR stands for Horizontal Reference.) The line right up there was made using an <HR> flag. <BR> <P> This stands for Paragraph. It does the exact same thing as the above except this flag skips a line. BR just jumps to the next line; P skips a line before starting the text again.
So, here we go... you're going to write your first HTML page using what you've just learned, plus a few other items. And these two items are important to every page you will ever write. Why? Because they'll be on every page you ever write. You'll start every page with this flag: <HTML>.ÊÊÊThat makes sense. You're telling the computerthat this is an HTML document (remember the Basics lesson?). Your next flags will always be these: <HEAD><TITLE> and </TITLE></HEAD>.ÊÊSee the very top of this page? I mean way up top. Above the FILE -- EDIT -- VIEW menus. The colored bar up there. Right now it reads "Using Flags." That's the title of the page, and that's what you're denoting here. Whatever you put between these two flags will show up in the title bar way at the top. After that, you'll denote the body of the document with the <BODY> flag. Finally, you'll end every page you write with these: </BODY></HTML>ÊOkie-dokie? You started the page with <HTML> and so you'll end the page with </HTML>. Same with the body... it started off with <BODY> and should end with </BODY>. That makes sense again. So, let's go! Here's a sample page to show you what I mean. The text flags show how you they affect the text, to make things easy. <HTML> <HEAD><TITLE>My First
Page</TITLE></HEAD> <B>This is my first HTML
page!</B> <B></I>Or I can
write in both</I></B> Ta-daaaa! Yes, it's pretty simple, but hey, we're just starting out. But what the heck... it's a webpage! Congratulations! Give yourself a pat on the back before we go on to the next topic...
|
||||||||