Yo Guys! I'm new here, and this is my first tut. (also my first topic).
This are just the very basics and if you guys like it then I might learn you how to build it out to a template. (Using HTML, CSS and Photoshop).
HTML tut Part I
Start by opening up Notepad or another simple text editor, and type (or copy paste) this:
Each of these little lines are calles tags. There’s a start and end tag. To make a end tag, simply put a “/” before the begin tag (without the “”).<HTML>
</HTML>
Most tags (not all) have an end tag. I can hear you thinking.. ‘What do tags do?’ Well, they explain your browser how and what to view. You just told your browser: ‘This is the begin of a HTML document’ (<HTML>) and ‘This is the end of a HTML document’ (</HTML>).
But ofcourse you want to do some more then telling your browser that it’s a HTML document, so let’s add some more.
Each HTML document needs the <HEAD> tags.
Next, add the <TITLE> tags to your document.<HTML>
<HEAD>
</HEAD>
</HTML>
Now, add the <BODY> tags between the </HTML> and </HEAD> tags.<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
</HTML>
What you just made is the skeleton of a HTML document. Let’s continue with adding a title to your document.<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
</BODY>
</HTML>
Now, let’s save it before your computer crashes or an angry 3-headed next-door-Gnome kills your computer. Don’t save it as a text document, but as a HTML file. Name it ‘index.html’ and put it in a new folder.<HTML>
<HEAD>
<TITLE>Your title here!</TITLE>
</HEAD>
<BODY>
</BODY>
</HTML>
Let’s continue by adding content. Content has to be placed between the <BODY></BODY> tags.
If you want to see it, save your document again and open it in your browser. If you have it opened already then you can view your newly saved file by hitting the refresh button.<HTML>
<HEAD>
<TITLE>Your title here</TITLE>
</HEAD>
<BODY>
Put some text here..
</BODY>
</HTML>
As you can see, it’s quite empty.. Just a blank page with a line of black text. So the next thing we’r going to do is add a background color.
The “#000000”stands for the color of the page. #000000 = black. You can find some more colors here: HTML Colors<HTML>
<HEAD>
<TITLE>Your title here</TITLE>
</HEAD>
<BODY BGCOLOR=”#000000”>
Put some text here..
</BODY>
</HTML>
If you don’t want to have a color as background, you can also use an image:
It’s important that you setup your maps the right way. Lets say you u=just saved the index.html file in a new map called ‘website’ then in the map ‘website’you must have your index.html file and a new folder called ‘images’ where you put your background image in. If you place the images folder somewhere else, then your browser will not be able to find it.<HTML>
<HEAD>
<TITLE>Your title here</TITLE>
</HEAD>
<BODY BGCOLOR=”images/yourimage.extention”>
Put some text here..
</BODY>
</HTML>
Now let’s go back to a normal, white screen.
Let’s add some text decoration. This is pretty much like the BB-codes you use on this forum, but you have to use ‘<’ and ‘>’ instead of ‘[‘and ‘]’.<HTML>
<HEAD>
<TITLE>Your title here</TITLE>
</HEAD>
<BODY BGCOLOR=”#FFFFFF”>
Put some text here..
</BODY>
</HTML>
So, Put = now Bold, Some = italic and Text here = Underlined. I don’t think I have to tell you guys where to put the end tags, since you have to put them on the same position as you’ll use with BB-codes. You can also combine those tags:<HTML>
<HEAD>
<TITLE>Your title here</TITLE>
</HEAD>
<BODY BGCOLOR=”#000000”>
<b>Put</b> <i>some</i> <u>text here..</u>
</BODY>
</HTML>
As you can see, I’ve started by placing the begin tag <B> first, but didn’t end it as first, but as last. This is a rule you must ALWAYS apply. For e.a:<HTML>
<HEAD>
<TITLE>Your title here</TITLE>
</HEAD>
<BODY BGCOLOR=”#000000”>
<b><u><i>Put some text here..</i></u></b>
</BODY>
</HTML>
<THIS><THAT></THIS></THAT> is WRONG
<THIS><THAT></THAT></THIS> is good
I continue without the decoration codes we just used. This is how to change the font size.
This will make your text bigger. Here are some sizes:<HTML>
<HEAD>
<TITLE>Your title here</TITLE>
</HEAD>
<BODY BGCOLOR=”#000000”>
<FONT SIZE=”6”>Put some text here..</FONT>
</BODY>
</HTML>
1= very small
2= small
3= normal
4= medium
5= big
6= very big
7= huge
Let’s explain some things. First, a TAG tells the browser that it has to do something. Second, a option that is standing in the TAG tells him how to do it, and last, a value in the TAG tells him how to do it. For example, in: <FONT SIZE=”6”> : <FONT > is the tag, SIZE=”” is the option, and 6 is the value. If you don’t add a option and/or value to the document, then the browser will use the standard value’s. The standard fontsize is 3
Now some other things. Let’s say you want to place this text on your page:
Yo!
Wazz
Up?
And you paste it between your body tags like this:
Then it’ll appear like this: Yo! Wazz Up?<HTML>
<HEAD>
<TITLE>Your title here</TITLE>
</HEAD>
<BODY BGCOLOR=”#000000”>
Yo!
Wazz
Up?
</BODY>
</HTML>
Then how can you add a Break? Well, you can do that using the break tag: <BR>
the Break tag is one of the tags that has no endtag. Let’s add him to the code:
Now your text will appear as it was ment to. Another tag like break, <P>, wich does have an endtag, but you don’t have to use it. The only difference between <BR> and <P> is that <P> will not only add a break, but also an empty line.<HTML>
<HEAD>
<TITLE>Your title here</TITLE>
</HEAD>
<BODY BGCOLOR=”#000000”>
Yo!<BR>
Wazz<BR>
Up?
</BODY>
</HTML>
Apart from that you don’t use end tags when using <P> and <BR>, there is something else strange about those tags. You can only use them once between text.
For e.a:
A word<P> Another word
Will look like:
A word
Another word
But A word<P><P><P><P> Another word
Will also look like that.
So how do you add more then 1 empty line? Well, there is a usefull code wich will make your browser add a space: (Non Breaking Space)
plaching 10 of those codes after eachother will have the effect of pressing your spacebar 10 times. You can also use it to add more blank lines. To do so, use it like this:
Placing <P> </P> 3 times has the effect of pressing enter 3 times.<HTML>
<HEAD>
<TITLE>Your title here</TITLE>
</HEAD>
<BODY BGCOLOR=”#000000”>
Yo!
<P> </P>
<P> </P>
<P> </P>
Wazzup?
</BODY>
</HTML>
Next, a very useful tag: <CENTER></CENTER> I think you’ll understand what it does.. everything between those tags will be placed in the center of the page.
Let’s add an image to our page. The Image tag is <IMG> the option SRC tells the browser he has to find a image, and the “image.gif” tells him the location of the image. So if you make your code like this:
Then you tell the browser to open the image.gif in your root folder. So, still with the same map structure we just had, that isn’t right. The image is in our image folder, so let’s point our browser to it:<HTML>
<HEAD>
<TITLE>Your title here</TITLE>
</HEAD>
<BODY BGCOLOR=”#000000”>
<IMG SRC=”image.gif”>
</BODY>
</HTML>
This will tell the browser the correct location.<HTML>
<HEAD>
<TITLE>Your title here</TITLE>
</HEAD>
<BODY BGCOLOR=”#000000”>
<IMG SRC=”/images/image.gif”
</BODY>
</HTML>
Well, this is where I stop for today. If you guys like it I'll add another part later about adding links, making lists, puting your site on the web, etc.
I might also make a serie or tut, to start with this very basics, and learn up to making your own template. But let's see wether you guys like it or not first.
P.S
Sorry for my bad english!!!