An element consists of five basic parts: an opening tag, the element's content, and finally, a closing tag.
- <p> - opening paragraph tag
- Element Content - paragraph words
- </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
- <html>
- <head>
- </head>
- </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
- <html>
- <head>
- <title>My WebPage!</title>
- </head>
- </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
- <html>
- <head>
- <title>My WebPage!</title>
- </head>
- <body>
- Hello World! All my content goes here!
- </body>
- </html>
Go ahead and view your first, complete webpage.
0 comments:
Post a Comment