Sponsored Ad

Wednesday, December 2, 2009

How to Create HTML Elements

An element consists of five basic parts: an opening tag, the element's content, and finally, a closing tag.

  1. <p> - opening paragraph tag
  2. Element Content - paragraph words
  3. </p> - closing tag

Every (web)page requires four critical elements: the html, head, title, and body elements.

 

1.The <html> Element...</html>

<html> begins and ends each and every web page. Its sole purpose is to encapsulate all the HTML code and report the HTML document to the world wide web browser. Recall to close your HTML documents with the corresponding </html> tag at the bottom of the document.

Example:-HTML Code

<html>
</html>

2.The <head> Element

Other elements used for scripting (JavaScript) and format (CSS), finally appeared and you have to put in your head element. For now, the top element will remain empty, except for the title element is presented below.

Example:- HTML Code

  1.    <html>
  2. <head>
  3. </head>
  4. </html>

 

3.The <title> Element

Place the labels are displayed at the top of your browser from a spectator. Here is the html code:

Example;- HTML Code

  1. <html>
  2. <head>
  3. <title>My WebPage!</title>
  4. </head>
  5. </html>

 

Save the file & open it in your browser. You ought to see "My WebPage!" in the upper-left, as the window's title.

The name of your website as you note that the best titles are short and descriptive.

4.The <body> Element

The element is where all the content. (Paragraphs, tables, etc..) In the menu on the left indicates, searching each one of these elements in greater detail in the tutorial progresses. For now, only important to understand that the body element encapsulate the entire contents of your site visible.

Example:- HTML Code

  1. <html>
  2. <head>
  3. <title>My WebPage!</title>
  4. </head>
  5. <body>
  6. Hello World! All my content goes here!
  7. </body>
  8. </html>

 

Go ahead and view your first, complete webpage.

0 comments:

Post a Comment

Sponsored Ad

More Related Articles

Website Update

Followers