Now that you have already created your web page, we should examine some segments of "index.html" file. Certainly you have seen that there is a model in the arrangement of the commands , some words are surrounded of "<" and ">",
these are HTML tags.
An example of HTML tag is <body>. The <body> tag tell
s to the browser, where
the content of the web page begins.<body> is an example of tag who should exist in every web page.
Base tags in HTML
Lets take a look at the cod. A web page has in composition two base elements. If you try to create a page without those two tags, you will have problems.
<html>
<body>
Web`s page content will be here
</body>
</html>
First tag is called <<html> and is that which tells to the browser that it had started a HTML cod. The second tag, <body> , tells to the browser that from there it had started the visible part or page`s content.
How to close a HTML tag
You may have observed already other two similar tags at the end of the document, </body> and </html>. These tag are for closing.</body>, lets the browser know that page`s content is over, and </html> that the HTML document is done.
Slash "/" is situated before tag`s name and it tells to the browser that he wants yo stop the current function. So <tag> is used to start a function, and </tag> to stop it .
Tag`s order - very important
The order of opening and closing a tag is very important.If a tag is opened in an other, for example body is written open in html then that tag (body) is the
one who needs to be closed before the second tag (html).
We have closed first body because it was the first one written. This is the rule: opening and closing a tag applies at all the other HTML tag documents.
The second page
You may need time and more attempts so that you get used with this rules, so you should keep trying with the next web page. Copy this cod in notepad, like
you did with the first page.
<html>
<head>
<title>My second web page ! </title>
</head>
<body>
<h2>Welcome.</h2>
<p>Very soon I will make a page which is going to be so cool!</p>
</body>
</html>
After you have assured that everything is going along with the anterior indications. you can save the document. You could try to save it with the same name as the one before, "index.html".You may be asked if you want to save the document over the previous, select Ok, we won`t need any more the other document.
No comments:
Post a Comment