In this second tutorial i am going to discuss about main elements of HTML document
Understanding the main elements of HTML will fetch you a lot in our future tutorials so pay attention on this tutorial
These elements are important during the validation of document.Lets go through the main elements of HTML document
- <!DOCTYPE>
- <html>
- <head>
- <meta>
- <title>
- <body>
It Communicates with software(validators, browser) accessing the page to help identify the HTML rules being followed inside the document. It states and helps verify that all tags used within the document are syntactically correct to the document type defined.
<html>
Defines the beginning and end of the HTML document. It contains <head>,<meta>,<title> and <body> sections of the document
<head>
It is used to describe the content in the document. It contains two tags <meta> and <title>.
In this section we can also integrate external CSS and javscript.
<meta>
<title>
<body>
As i have said about this in the first tutorial. Lets describe it again.Directly after the <head> element closes(</head>) we define our element. This element contains everything that we want to display to the browser software. All the paragraph tags tables and all other content used to represent information goes under this tag.
The above are the main elements in a HTML document.
Analyze the below html code and try to execute it!!!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta name="keywords" content="html, elements, web, page, structure, code"/>
<title>My Webpage</title>
</head>
<body>
<html>
<head>
<meta name="keywords" content="html, elements, web, page, structure, code"/>
<title>My Webpage</title>
</head>
<body>
<p>Hello World!</p>
</body>
</html>
</html>
Find the output and comment the result below
0 comments:
Post a Comment