|
Build Using a Machete
- by
John Wolf
(Weave a Web Series Part II)
This is part two in the series of how to weave and web site. I assume
you are hooked now or you wouldn't be reading this. We'll start
with a reference library, and then get into the thickets of web building
- bring a machete.
- HTML Complete, 3rd ed - Sybex ISBN 0-7821-4209-5
$25 list, $17 Amazon. Various edited authors.
No frills, has it all, reads like a dictionary, just enough
explanation to get the idea.
- HTML 4 for Dummies - Tittel & Burmeister
ISBN 0-7045-8917-1
The dummy books are well done, but they are full of jokes,
cartoons, and verbose diatribe that wastes your time.
- HTML & CSS in 24 Hours - Oliver & Morrison
Sams books - ISBN 0-672-32841-0
Don't let the glib learn in 24 hours fool you. These books are
very well written and you can learn it all with this book.
- HTML & XHTML - The Definitive
Guide, 5th ed.
Musciano and Kennedy
O'Reilly - ISBN 0-596-00382-X
Don't bother to go this far up the food chain, you could get
eaten. Great book for college courses. Too much definitive and
not enough - oh, that's how it works. If you want to write a
rock song, do you really need to know everything about semi-quivers used
in Motets of the 12th century - that was a no, right?
Before we
whack into the bush, it would be good to grab a copy of the "24
Hours"
book. Here's another tip. HTML 1.0 is dead. The whole worlds has moved
on to HTML 4.0, so don't bother to buy a book or check one out of the
library that's talking 1.0. It's like doing this in Latin. We want
street credit here.
So what's all the mumbo-jumbo about. You now know from
the first installment what HTML is in name. What breed it is, comes next.
Unlike politicians, digital protocol tells the truth. It is the standard
on which all the users and commercial products depend. The HTML protocol
has progressed to version 4.0. I see an X in front of one of those
reference - XHTML, what's that? The "X" is a compound idea, jammed onto
something familiar. It means two things. First, it lets you know that
interactive HTML is present and it implies you might run into XML, which
is HTML piled higher and deeper. Both HTML and XML are markup languages
that work with tags - these guys <tag></tag>. For now, we will stick to
HTML. It's all we need, along with CSS, to get the job done.
Okay, you dumped another one on us - what the heck is
CSS? Cascading Style Sheets - like that helps. Think style, that's the
operative word here. Cascading refers to the hierarchy that the style
occurs in. Nested styling is influenced by the upper style. If the king
says wear red, even the guy in blue at the bottom, changes to red.
Style gives you a lot of freedom to get ziggy. Remember
that was our final goal in Part I. Do you have to use styles? Yes - by
default, why not make it easier, more fun, and better looking! If you
don't tell the browser how you want something to look, it jams a default
down your neck and that's like wearing a respirator. You might as well
learn how styles work, choose your own, and the first thing you know -
you're getting ziggy.
Well - get your machete out, we're going into the bush. In
Part I, we established the parts needed to have an Internet presence.
You can develop your whole site right on your computer and run it
independently from the Internet. That's like making up sandwiches for
the Rotary Club when you're not even a member, but if you were, the
sandwiches would make the day. The goal is to get Internet ready. Here
we go.
Click on this: next column
Wine,wires,and women, you can't get better than that.
|
|
Open Notepad. Oh, please, you know the utility
accessory on all Windows systems that records text files - no formats,
just raw ASCII. Go to "Start", up to "Accessories", and down to
"Notepad." What's ASCII? That's another standard. It allows numbers and
letters to be represented in the computer and on our screens. Yeah, it's
really important. But here's where it gets sticky. You type into a word
processor, any word processor, and the program adds formatting. Hidden,
nasty, gummy little buggers that screw up things when you want to have
plain text. That's where Notepad comes in. It only records ASCII, no
junk. Here's is another Wolf-track to follow. When you grab text from
the Internet, or copy from any MS product, paste that into Notepad
first, when select-all and re-copy it. The formatting is stripped out.
Then when you paste into, say an HTML file, you get clean text. If you
don't do this, your page suddenly takes on a life of its own. Don't ever
push the "Make this a Web Page" button in any MS product. It produces a
web page alright, one filled with MS gibberish that only a nerd on the
penthouse floor of the Seattle headquarters could understand. It will
take you a week to strip it all out.
Back to Notepad. Type the following, no wait. Select
the following: copy, then paste into Notepad, save as "page1":
<html>
<head>
<title>Best Page Ever</title>
</head>
<body>It has taken a while to get here, but this is my very own web page
- Yes!
</body>
</html>
If you saved to your desktop, go there and find the file. It will say,
"page1.txt" Select it and change the txt to html to read,
"page1.html" Your operating system will come out of hiding and ask
you to reconsider, and warn you this could change things up a bit. Great,
that's what you plan to do. Hit okay. Notice the icon changes from a
little page of text to the Internet Explorer icon. Double click it.
Voilą - your first page.
Notice, the only thing you see is what was in the body
of the code. Therefore, pages have a few parts. The whole thing is a
HTML coded page, so that's why that's first and last, by the way. More
on this in a minute. Then there is the header section that contains a
title. The title and header are closed as well. That means each tag has
a brother with a slash that tells the browser where the end of that tag
is. That makes sense - right. In the early days of HTML, some tags
didn't require closure and the world thought it was cool to minimize
typing by leaving them out. Things like breakline <br>, paragraph <p>,
who cared? The protocol police care. Everything now days should be
closed properly to avoid confusing the browser and it keeps you out of
protocol court. The authorities would also like you to use small letters in
tags.
Like every organized perfection, there are exceptions.
Well, in this case, just a little play on tags. Breaklines are closed
using <br />, as well as horizontal linebreaks
<hr
/>, and a few others.
Paragraphs really need to be closed, because styling information can
go nuts if you don't. </p>
Note the slash in is the front this time - oh bother. That's means
there are some things you just have to memorize. That's where an editor is
very handy. They slap your hand, if you vary from the chosen path. Most tags
are not stand alone and encompass a group of words, letters or a list of
things. They all require the closing tag with the slash in front.
Next installment, more impressive pages - I promise.
The Web was invented in 1991 and was called the world wide web, thus
the www in front of domain names...
© 2007 John Wolf, all rights reserved
Read Responses Sent In
|
|