Wednesday, October 26, 2011

HTML Elements

HTML elements have many ranks.All you see : paragraphs, ZiZix`s banner, the
navigation links from the left side and the right side , all are elements of this page.
An element has three parts : an opening tag, element`s content and an closing.
  1. <p> - the tag that opens a paragraph
  2. Element`s content - the paragraph itself.
  3. </p> - the closing tag.
***Note:
All the web pages will have at least the base elements: html, head, title and body.
--------------------------------------------------------------------------------------------------------------------------

<html>element...</html>

An HTML document will always begin and end with a <html> tag and respective
</html>. This is the standard structure of an HTML.

Please open a Notepad and copy the next cod :
<html>
</html>

Save the document from the File/Save As menu. Select All Files and name the new created file "index.html".Hit Save.Now open the file in a browser so that you have the possibility to refresh the page (F5).
If you did everything well you will be able to see your web page white !

--------------------------------------------------------------------------------------------------------------------------

<head> element

The <head> element is the one that is next. While you put in between html and body everything should be just fine."Head" has no visible function, so we will talk about this aspect in the next tutorials. Even though i want to mention that <head> can offer to the browser very useful informations.You can introduce here other cods like Javascript or CSS.
For the moment we will let the notions like that with the exception of the act that we introduce the next element from the list, but first lets take a look without him:
<html>
<head>
</head>
</html>

If you save the document and try to refresh the initial page from the browser you will not see any difference. Just have a little patience, because next we will study some visible elements.

--------------------------------------------------------------------------------------------------------------------------

<title> element

So that every thing goes well you must put the title tag inside the head tag. what you write between those two title tags ( <title> and </title>) will be seen as browser`s name, usually in the upper right side. Next we have the source code:
<html>
<head>
<title> My first web page!</title>
</head>
</html>

Now save the file and open it in your browser. You will be able to see the title
in the upper left or right side as like the majority of the browsers.
You can put any name you want, just remember that the descriptive names are the ones that are easier to find later.

--------------------------------------------------------------------------------------------------------------------------

<body> element

The body element is the one that defines the beginning of the itself page`s content (titles, paragraphs, photos, music and any all the others).As you can see in the menu from the left, we debate one by one all these content elements.
For now all you need to keep in your mind is that body covers all the content of the page.
<html>
<head>
<title> My first web page!</title>
</head>
<body>
Hey guys! Here we will put the content later !
</body>
</html>

Now see what you have done, and after i invite you to see what is in the next section.

References from http://www.tutorialehtml.com

0 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More