An HTML element is everything from the start tag to the end tag.
An element consists of three basic parts: an opening tag, the element’s content, and finally, a closing tag.
HTML Element Syntax
<html>
<head>
<title>
My First html page
</title>
</head>
<body>
Hello World! All my content goes here
</body>
</html>
Example Explanation
Here, for any HTML document your basic layout must be as mentioned above.First write <html> to begin and always close </html> at the end of the page. And right after your <html> there is the place of <head> tag. Tags placed within head element are not directly displayed by web browsers. We have placed <title> tag inside head element. . The words you write between the opening and closing <title></title> tags will be displayed at the top of a viewer’s browser.
The <body> element is where all content is placed. (Paragraphs, pictures, tables, etc). For now, it is only important to understand that the body element will encapsulate all of your webpage’s viewable content.
An element consists of three 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
HTML Element Syntax
- An HTML element starts with a start tag / opening tag
- An HTML element ends with an end tag / closing tag
- The element content is everything between the start and the end tag
- Some HTML elements have empty content
- Empty elements are closed in the start tag
- Most HTML elements can have attributes
<html>
<head>
<title>
My First html page
</title>
</head>
<body>
Hello World! All my content goes here
</body>
</html>
Example Explanation
Here, for any HTML document your basic layout must be as mentioned above.First write <html> to begin and always close </html> at the end of the page. And right after your <html> there is the place of <head> tag. Tags placed within head element are not directly displayed by web browsers. We have placed <title> tag inside head element. . The words you write between the opening and closing <title></title> tags will be displayed at the top of a viewer’s browser.
The <body> element is where all content is placed. (Paragraphs, pictures, tables, etc). For now, it is only important to understand that the body element will encapsulate all of your webpage’s viewable content.
Comments
Post a Comment