HTML Element
HTML Element Syntax
HTML elements follow a certain format. An HTML element starts with a start tag and ends with an end tag. The element content is between the start tag and the end tag.
The following shows a paragraph tag p.
<p>This is a paragraph.</p>
Empty HTML tags
HTML elements can have empty content. HTML tags without content are called empty elements. Empty elements can be closed within the start tag. For example,
<p></p>
Empty elements can be closed in the start tag as follows.
<p/>
Nested Elements
Most HTML elements can be nested. Nesting is to contain other HTML elements.
<html>
<body>
</body>
</html>
In the html document above <html>
tag contains <body>
tag.
And we can say body
tag is nested inside html
tag.
Lowercase Tags
HTML tags are not case sensitive.
<P>
means the same as <p>
.
HTML CSS Tutorial HTML CSS Basic
HTML Introduction
HTML Documents
HTML Core Attributes
HTML Comments
HTML Headings
HTML Paragraphs
HTML Rules (Lines)
HTML Line Breaks
CSS Introduction
CSS Syntax
CSS Color
CSS Lengths
CSS Comments
CSS selector
Grouping/nesting Selectors
Add CSS to HTML
Compare em measurement and pixel measuremen...
Select class along with tag name in HTML an...
Select Next Sibling with Next Sibling Selec...
Select with Descendant Selectors in HTML an...
Set color to purple in HTML and CSS
Set color with rgb function in HTML and CSS
Set text color for body element in HTML and...
Show the difference between block and inlin...
HTML Introduction
HTML Documents
HTML Element
HTML AttributesHTML Core Attributes
HTML Comments
HTML Headings
HTML Paragraphs
HTML Rules (Lines)
HTML Line Breaks
CSS Introduction
CSS Syntax
CSS Color
CSS Lengths
CSS Comments
CSS selector
Grouping/nesting Selectors
Add CSS to HTML
Compare em measurement and pixel measuremen...
Select class along with tag name in HTML an...
Select Next Sibling with Next Sibling Selec...
Select with Descendant Selectors in HTML an...
Set color to purple in HTML and CSS
Set color with rgb function in HTML and CSS
Set text color for body element in HTML and...
Show the difference between block and inlin...