Well then, let's start shall we?
now, for absolutely basic HTML, you actually only need a plaintext editor. If you use windows, notepad works fine.
Pretty much every HTML book on earth says this, so i will too: Don't use so-called "rich-text" editors like Word or Wordpad for coding html. They add all kinds of weird formatting that doesnt really jive with HTML.
So try this, creat a text file, and name it "page.htm". If you get prompted about changing the file extension, click yes. Right click it and select "Open with", and if it asks you if you want to select a program or search the web, choose select a program and then click ok. In the list you are presented with, select notepad and then ok.
now, we need to type something. This is the most basic standard for a web page. It is NOT necesarry to format everything 100% correctly, almost all web browsers are very forgiving when interpreting HTML. if you could see how awful some of the code is on many (if not most) professional pages was, you would laugh.
here we go:
<html>
<head></head>
<body></body>
</html>
Notice that all tags have an opening and closing tag. its not really allthat different from UBB code or the Vb code the forum uses. You see the head and body tags? how they sit inside the HTML tags? that is called nesting. Remember that, because it is important later on.
Now, any of these can be left out and the page will work just fine. BUT, there is this little thingout there called "best practices". These groups of really smart people sit down and hash out sets of guidelines, which are base don the most efficient, and usually easy to read ways of doing things. i am a big fan of using best practices because it keeps things consistent and easy to read. My first pro web job had me going through 2000 files, getting rid of the 98% that werent necesarry, and giving a consistent look and feel to the ones that were left over. I have many many emotional scars from this.
Anyway, you probably want to know how to do something fun.
we have our basic code, now make it look like this:
<html>
<head>
<title>My Page</title>
</head>
<body>
This is the body.
</body>
</html>
save it, and open the file in your web browser. look at the title bar, it should say "MY Page", and the window itself should say "This is the body."
Congradulations. You just made a web page.
|