HTML Elements
An HTML element is an individual component of an HTML document.
HTML documents are composed of a tree of HTML elements and other nodes,
such as text nodes.
Each element can have attributes specified. Elements can also have content, including other
elements and text.
In the HTML syntax, most
elements are written with a start tag and an end tag, with the content in
between.
Tags are composed of the name of the element, surrounded by angle
brackets.
For
example, a paragraph, which is represented by the p element, would be written
as
<p>In
the HTML syntax, most elements are written ...</p>
Description
An
element consists of three essential pieces: an opening tag, the content, and a
closing tag.
1. <p> - opening paragraph tag
2. Element Content - "Once upon a
time..."
3. </p> - closing tag
A
single page can contain hundreds or thousands of elements, but when all is said
and done, every HTML page should have a bare minimum of four critical elements:
the HTML, head, title, and body elements.
Use of HTML element
The
html elements represent the root of an HTML document.
Example
<! DOCTYPE html>
<html>
<body>
<p>This is my first paragraph.</p>
</body>
</html>
Display



0 comments:
Post a Comment