|
The head
Nice,
you created an empty page, but there should be more to it. A basic HTML
file contains a head, two tags have to be added to open and close this
part.: <head> and </head>. In
the head information can be stored about the content of the pages, the
title that needs to be displayed in the top of the browser, some Java-scripts
etc.
A basic rule you learned here is that tags can be embedded within tags,
like this: <html><head></head></html>. Looking
closely you will notice that the tag that opens first, has to be closed
last and vice versa. So never try to program something like this: <html><head></html></head>,
it will not work and will give in the most positive case error messages.
Title
In-between
the <head> tags we can place more commands, one of them is the <title>.
Text written here will be displayed in the top of the browser. The visitor
of your site can get directly information about where he/she is. In the
case of the site we are producing, the title can be: <title>Homepage
of LovelyMaps</title>
The
complete code now is: <html><head><title>Homepage of
LovelyMaps</title></head></html>
Action
Type
in the code in the TextEditor, save it and open the file in your browser.
Try out different titles and give in-between words more spacing, you will
see that the browser doesn't do anything with that. Even when you give
a hard-return, it is not recognized as such.
Organizing the html file
At
this point we used very few tags and a little text. The information in this
file will grow, the amount of tags and text will increase dramatically.
If we continue to type everything continuously, we will soon get lost. Better
is to organize elements in the html file. You already found out that extra
spacing and returns in the html file have no effect on the final result,
tabs can be added to this list. The example below gives some more overview
...
|
|