HTML Elements
From w3cyberlearnings
Contents |
HTML - Element
All HTML Documents define by HTML Elements.
HTML - Syntax Element start and end tags
<html> <head> <title> My Page Title </title> </head> <body> <i>Information Technology</i> <p>Pollution is seriously hurt Programmer</p> </body> </html>
HTML - Syntax Element without end tag
<html> <head> <title> My Page Title </title> </head> <body> <i>Information Technology</i> <br/> <p>Pollution is seriously hurt Programmer</p> <hr/> </body> </html>
Example - for open and end tags
Start Tag | Element body | End Tag |
---|---|---|
<p> | My world! | </p> |
<pre> | My Content Place Here | </pre> |
<h3> | Welcome to heading | </h3> |
Note
- Always use lowercase word for the HTML tags. i.e: <p>...</p> NOT <P>...</P>
- Don't forget to close the tag when it requires one.
Example 1: <p> element
- This defines the paragraph in the HTML document.
<p>This is my first paragraph.</p>
Example 2: <h3> element
- This defines the heading in the HTML document.
<h3>Welcome to our world of HTML</h3>
Example 3: without closing tag
- This defines a break line in the HTML document.
Googgle<br/>w3cyberlearnings.com<br/>
Example 4: without closing tag
- This defines the Line in the HTML document.
Good<hr/>Bad<hr/>
Related Link
- HTML - First Page
- HTML - Elements
- HTML - Comments
- HTML - Attributes