|
|||
Is HTML hard to learn? It can be, but i can also be wery simple once you get the hang of it.Its like learning a new language, because it is a language.
The mening with this site is to show the beginners that never before have seen or had contact with HTML, how it works, by giving you exampels and exercises.
Why im a writting this in English? Its because i can reach a bigger audience this way. I�m not a HTML hacker, but a happy computer nerd that wants to learn, by teaching others HTML. There are a lot of books in the market that will "teach" you HTML for money, but the truth is, that you doesnt learn how to program just by reading a book. Learning to program is the same as writting and reading code. So my advice to you, is to read this short introduction and then read source code, and practise, practise and practise.
If you can choose colors etc, why is this page so dull?
Its because its a text document , not a homepage.This document is written in 1 page 2000. It can be found at
Webattack.com
O be dowloaded here .
Lets get back to work!
Ok, now you know the tags that must be in, in wich order should they be written in?
Lets give a example:
<HTML>
<HEAD>
<TITLE>
My first web-page
</TITLE>
</HEAD>
<BODY>
Text!
</BODY>
</HTML>
Ok, now you know what elements that must be in a document. So, we move on.
This is the correct order, so learn it by writting it a few times.
<HTML>
<HEAD>
<TITLE> My first web page </TTTLE>
</HEAD>
<BODY>
This is my first webpage! Its just black and white, and with boring text.
</BODY>
</HTML>
This is a very simple page, but that is what were gonna do here. Try do write a page of your own now. Write it, do NOT just copy it and paste it in you editor. You�ll learn by writing not reading. Of course its good to be able to read an HTML code and se whats it gonna look like before, like preview in you head. A good way to learn is to read "source code" of pages that you like, and then try to write to code for your own page. Again, do NOT copy, modify the code, so it will fit your demands and style. If you are Swedish you can also se my Swedish school But iv�e tried to do this one more complete, than my other tutorials.
<HTML> This element tells the browser what language the document is
written in, and is the start and stop tag.
#include<stdio.h>
Lets move on! Ok, now you now some tags, but how should we write this? Lets do an example. Try to write a page using these <tags> and check it.
Example:
<HTML>
<HEAD>
<TITLE> Example!</TITLE>
</HEAD>
<BODY>
<H1> Lets try some tags </H1>
Hello, this is my first HTML page, so dont judge me so quickly.
Im trying to understand the different tags.
Now the text is gonna be<U> underlined</u> and now the text
is <I> italic </I>.<BR>
Bye bye
</BODY>
</HTML>
A web page without links, is like an orange without taste. A page like that is called a "leaf node", and is very boring, because the Internet is all about Hypertext.
Oh,thats it? You ask. Yeah thats it. But wait, you say.Whats that "mailto:" protocoll doing here, and what does it do? When you write the "mailto:" protocoll, the viewers email-program automaticaly starts with a blank page, but with your adress in the "to" field. This is very good, becuse you maybe, get som respons from the people that looks at your page.
Exercise:
Write a simple HTML page and try to use al the elements that i�ve shown you.
That way you will learn faster. If you think this tutorial sucks, then email me and complain.
You can reach me at [email protected]
Now, ive written a page, you say.Now, i want to add color!
How do you do that?
Color of the background, links and text is written in the <BODY> tag.
Like this:
<BODY BGCOLOR=#000000 TEXT =#FF0000 LINK = #FF8787>
Whats does the # and the numbers stand for? Color in HTML is either hexadecimals or a word.Hexadecimals are 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C , D, E and F. But there is a simple way! Just type the name of the colors. The two first #is RED, the second two Green and the last Blue. Try to experiment with different # and look at the result. You can also set the colors at Visited links(Vlink) and active links (Alink).
Sixteen predefined colors:
BLACK
GREEN
SILVER
LIME
GREY
OLIVE
WHITE
YELLOW
MAROON
NAVY
RED
BLUE
PURPLE
TEAL
FUCHIA
AQUA
You can download a colour picker here
Now, you can write a very simple page. But!, you say! I want a picture of me in it.
Yeah, lets try to add a picture in to the page.
The tag for pictures are <IMG SRC = "url to the picture">. You can also choose the size of the picture by adding WIDTH ="#" HEIGHT ="#". Experiment a little, and you�ll se that you get what you want. If you want a picture as backgroud you type in the<BODY> BODYBACKGROUND = "url>". The pictures must either be on the Internet or on the server that holds your page.You can choose the size of your pictures like this:< IMG SRC = pictureofme.jpg "WIDTH = 150" "HEIGHT = 170" ALT = "This is where you enter comments to to the pictures.They will be shown when the mouse is on the picture">.
This is very simple, but you must have a CGI-program running behind on the server.
But, you might wanna write a form like this anyway? This is how:
The code for the form i just shown you is:
<B>Hello! Please fill out this form:
What programming languages do i know?</B>
<input type = radio name = form>C/C++ <BR>
<input type = radio name = form> Java <BR>
<B>
I use this platform:</b> <BR>
<input type = radio name = platform> Win95/98/NT <BR>
<input type = radio name = platform> Linux <BR>
<input type = submit value = "Send in my answer"> < input type = reset value = "Erase what i wrote">
There is tons of CGI-scipts�available on the Internet for download. Just look around. Try searching on Northernlight.
Name: | Link: |
---|---|
Sleipners homepage | Click here |
HTML tutorial | Click here |
Name: | Link: |
---|---|
Sleipners homepage | Click here |
HTML tutorial | Click here |
I have tried to write as short a possible, and i think i have succed? What do you think?
Please email me and let me know.I�m gonna put out
a guest book, where you can ask questions, if you dont want to email.
I hope you have learnt somthing, because that whas the general idee behind this page.
I have written other HTML tutorials. You can check em out at:
insipidorpheus.homepage.com
If you are swedish you can take a look at my Swedish school
This is it, but im gonna upgrade these from time to time, so check back at a later time.
Take care and practise, practise and practise !
My other pages
Sleipners homepage
Sleipners other homepage
Download the code for this page