Loading Please Wait...
HTML Elements are the main building block of an HTML document. An HTML element is a combination of start tag, end tag, and content for the elements.
A tag is a name written in the form of <tagname>. Where </tagname> represent the ending of the tag.
An HTML Element is written like below
<tagname>Content For Element</tagname>
For Example
<h1>Some Heading</h1>
HTML Elements having a start tag, end tag, and content in between are called Container Elements, Paired Elements.
For example: <h1>Some Heading</h1>, <p>Some Paragraph</p>
HTML Elements having no content and are only defined by the start tag are called Empty Elements, Unpaired Elements.
For example: <br>, <hr>, <img>, etc.
HTML Elements that contain other elements are called Nested Elements.:
For example: <html>Other Elements</html>
<!DOCTYPE html>
<html>
<head>
<title>My First Web Page - Lynxsia IT Solutions</title>
</head>
<body>
<h1>My First Heading</h1>
<p>My first paragraph. <br> Another line in paragraph</p>
</body>
</html>
The most common mistake we usually do in writing HTML documents is we forget to write the end tag. This doesn't make any difference in displaying content but unexpected results may occur during layout and formatting. So never miss the end tag.
Sometimes we misspelled the tag name. So be careful in writing tag names.
<!DOCTYPE html>
<html>
<head>
<title>My First Web Page - Lynxsia IT Solutions</title>
</head>
<body>
<h1>My First Heading
<p>My first paragraph. <br> Another line in paragraph</p>
</body>
</html>
In the above example, we forget to close the h1 heading. This will cause the paragraph to be shown as the heading too.
HTML elements are not case-sensitive. You can use either uppercase, lowercase, or mixed letters to write tags. For example, <html>, <HTML>, and <Html> all are same. But W3C recommends using lowercase for the tag name and demands lowercase for stricter document types like XHTML
<!DOCTYPE html>
<HTML>
<head>
<title>My First Web Page - Lynxsia IT Solutions</title>
</head>
<Body>
<H1>My First Heading</H1>
<P>My first paragraph. <br> Another line in paragraph</p>
</Body>
</HTML>
How you feel about this blog:
Share this blog on:
If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com
Contact UsWe are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..
Copyright ©
, Lynxsia IT Solutions, All rights reserved