|
Lets start off with some need to know stuff |
| |
| .html |
All html files are named by having the name of the file, followed by
either '.htm' or '.html'. For example "index.html" or "news.htm".
Note: It doesn't really matter if you use '.htm' or '.html'. The standard
is to use '.html' but the reason '.htm' exists is that on old versions of windows you
were limited to 3 characters after the dot. |
| |
| index.html |
The start page of your site should be named "index.html" (or "index.htm")
since all web browsers default to that page whenng up a website.
If you visit a site like "http://www.yahoo.com/", your browser
automatically looks for and "http://www.yahoo.com/index.html". |
| |
| tags |
Tags are the "code" in your html file that tells how your page will
look.
Web pages are just text files, telling your browser how to put a page
together (what images, what colors, what text, etc). The way you do this
is with Tags.
Tags are defined by having a < and > surrounding
them. The syntax, or how you use tags, is like this:
<TAGNAME OPTION1=option> text if required </TAGNAME>
For example, if you wanted to have blue text
you would have:
<font color="blue">blue text</font>
The </font> tells the browser to end the font tag. Not all tags require
"end tags" but most do. |
| |
| html layout |
The basic structure for a html is as follows:
<html>
<head><title> PAGE TITLE </title></head>
<body> PAGE CONTENT </body>
</html>
"PAGE TITLE" would become the page's title (displayed on your browsers title bar),
and the content of the page goes in place of "PAGE CONTENT" (inbetween the "body" tags)
|
| |
| <br> |
|
Carriage Returns in the source code (when you go to the next line)
are seen just as spaces when the web page is shown. To force text
to the next line you need to use the <br> tag (note, no end tag)
|
| |
| <!-- comments --> |
Comments are any text in your html code that are inbetween the <!-- and --> identifiers.
Anything commented out will only be visible in the source code (it won't be shown on the displayed page).
|