|
|
Open your page1.html file in Notepad. Save it as page4.html. Now open it in your Browser, to watch the changes as you change your code during the lesson. |
Hey! What's going on here?? |
The browser ignores instructions it does not understand (maybe you used a spelling error).
It also ignores upper and lower case.
The browser doesn't recognize formatting. Unless you tell it otherwise, it just displays the characters in a steady stream. If you want to start a new line you have to use a line break.
<BODY BGCOLOR="#FFFFFF">
Hey!<BR>
What's<BR>
going<BR>
on<BR>
here??
</BODY>
Hey! What's going on here?? |
<BODY BGCOLOR="#FFFFFF">
Hey!<P>
What's<P>
going<P>
on<P>
here??
</BODY>
Hey! What's going on here?? |
Look at this first...
<BODY BGCOLOR="#FFFFFF">
Something really cool
</BODY>
Something really cool |
The browser won't recognize more than 1 space. I know at first this might all seem pretty stupid for it to be this way, but really, it's better to have it this way. It gives you absolute control over the document's appearance.
There is a nifty little code that means "space" to the browser ->
Try this...
<BODY BGCOLOR="#FFFFFF">
Something
really
cool
</BODY>
Something really cool |
The & means we are beginning a special character the ; means ending a special character and the letters in between are sort of an abbreviation for what it's for. There are six of these special characters.
(Note- these should always be lower case)
You don't need to use them all the time, just when typing the real character would confuse the browser. How do you know when that is? No hard and fast 'rule' that I can think of. It will just come with a little practice and a few screw-ups.
By the way, some thoughts on mistakes & screw-ups. There are those that are of the opinion that mistakes are bad. They are afraid to try anything new for fear of messing it up. Making the same mistake over and over might be a little dumb, but especially while you are learning, don't be afraid to screw everything all up. Mistakes are our friends :)
If you are not screwing something up then you are not learning anything and probably not doing anything. Remember, messing things up is a perfectly acceptable by-product of learning!
Let's go over the last couple points real quick because if you're at all like me, it will get confusing. The browser will dispay your text in a steady stream unless you tell it otherwise with line breaks, etc. It will reduce any empty areas to 1 space. If you want more spaces, you must use the space code ( ). Here's a tidbit that we didn't cover... If you hit Return (or Enter) while you are typing, the browser will interpret that as a space... unless there is already a space there.
One more quick example.
<BODY BGCOLOR="#FFFFFF">
Something<BR>really<BR>cool<BR>
like<BR>an<BR>icecube!
</BODY>
Something really cool like an icecube! |
Pretty clear?? I hope so. I gave it my best shot!
Next up is a very useful little tag. It's pretty self explanatory.
<BODY BGCOLOR="#FFFFFF">
<CENTER>Something really cool</CENTER>
</BODY>
|
You can center one word or your whole page. Everything betwen the <CENTER> tags gets centered.
I almost forgot, I was going to show you how to make multiple blank lines. It's really simple. Make an empty space with a line break for each blank line you want.
<BODY BGCOLOR="#FFFFFF">
Something really<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
cool
</BODY>
Something really cool |
<BODY BGCOLOR="#FFFFFF">
\|/ (@ @) +----oOO----(_)-----------+ | ELIZABETH | | for | | FAVOURITE TEACHER | +-----------------oOO-----+ |__|__| || || ooO Ooo</BODY>
\|/ (@ @) +----oOO----(_)-----------+ | ELIZABETH | | for | | FAVOURITE TEACHER | +-----------------oOO-----+ |__|__| || || ooO Ooo |
Well, with the <PRE> (preformat) tag, we can put a stop to that and have things displayed the way we type them.
<BODY BGCOLOR="#FFFFFF">
<PRE>
\|/ (@ @) +----oOO----(_)-----------+ | ELIZABETH | | for | | FAVOURITE TEACHER | +-----------------oOO-----+ |__|__| || || ooO Ooo</PRE>
\|/ (@ @) +----oOO----(_)-----------+ | ELIZABETH | | for | | FAVOURITE TEACHER | +-----------------oOO-----+ |__|__| || || ooO Ooo |
<B>text</B> | Display text in bold |
<BIG>text</BIG> | Display text in big font |
<I>text</I> | Display text in italics |
<SMALLl>text</SMALL> | Display text in small font. |
<S>text</S> | Strikethrough |
<SUB>text</SUB> | Subscript text |
<SUP>text</SUP> | Superscript text |
<TT>text</TT> | Typewriter text |
<U>text</U> | Underline text |
<KBD>text</KBD> | Keyboard text |
<STRONG>text</STRONG> | Strong emphasis text |
<FONT SIZE="size">text</FONT> | Font size = 1 to 7 Text |
<BLINK>text</BLINK> | Blinking |
Text can be specially separated and formatted using the following tags:
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
|