- Introduction To HTML
- HTML Editors
- HTML Basic Examples
- HTML Elements
- HTML Attributes
- HTML Headings
- HTML Paragraphs
- HTML Styles
- HTML Formatting Elements
- HTML Quotation
- HTML Comments
- HTML Colors
- HTML Styles - CSS
- HTML Links
- HTML Images
- HTML Tables
- HTML Lists
- HTML Block And Inline
- HTML Class
- HTML Id
- HTML Iframes
- HTML JavaScript
- HTML File Paths
- HTML Head
- HTML Layout
- HTML Responsive
- HTML Computer Code
- HTML Semantic
- HTML Forms
- HTML Form Attributes
- HTML Form Elements
- HTML Input Types
- HTML Input Attributes
- HTML Input Form Attributes
- HTML Canvas
- HTML SVG
- HTML Media
- HTML Video
- HTML Audio
- HTML YouTube
HTML Elements
HTML Elements
Everything inside start and end tag are HTML elements
Examples of some HTML elements:
<p>This is a first paragraph.</p>
Start tag
|
Element content
|
End tag
|
---|---|---|
<h1>
|
This is a First Heading
|
</h1>
|
<p>
|
This is a First paragraph.
|
</p>
|
<br>
|
none
|
none
|
Nested HTML Elements
Elements in HTML can be nested (this means that elements can contain other elements).
Nested HTML elements are present in every HTML document.
<html>
<body>
<h1>This is a First Heading</h1>
<p>This is a First paragraph.</p>
</body>
</html>
Example Explained
The root element of an HTML document is the <html>
tag, which defines the whole HTML document.
It has a start <html>
and end tag </html>
<h1>This is a First Heading</h1>
<p>This is a First paragraph.</p>
</body>
Never Skip The End Tag
Even if the end tag is missed, several HTML components will still display correctly:
<body>
<p>This is a First paragraph</p>
<p>This is a second paragraph</p>
</body>
</html>
Empty HTML Elements
Empty HTML elements are those that have no content.
The <br>
tag, which is an empty element without a closing tag, defines a line break:
HTML Is Not Case Sensitive
HTML tags are not case-sensitive, so <P>
and <p>
have the same meaning.
Although lowercase tags are not required by the HTML standard, the W3C advises using them and requires them for more stringent document formats like XHTML.
Products
Partner
Copyright © RVR Innovations LLP 2024 | All rights reserved - Mytat.co is the venture of RVR Innovations LLP