CodeClerks

What is the difference between HTML elements and tags?



Write the reason you're deleting this FAQ

What is the difference between HTML elements and tags?

What is the difference between HTML elements and tags? And, do most people use these correctly in HTML?

Comments

Please login or sign up to leave a comment

Join
raypal
A tag in HTML is a representation of an element in the serialized form of an HTML document
An element is an object in the hierarchical model of a document.



Are you sure you want to delete this post?

dennis123
HTML tag is just opening or closing entity. For example:

<p> and </p> are called HTMl tags

HTML element encompasses opening tag, closing tag, content (optional for content-less tags) Eg:

<p>This is the content</p> : This complete thing is called a HTML element



Are you sure you want to delete this post?

AjayPrasad
Tags are used to markup the opening and closing of an HTML element.Ex-
<p></p>

An element in HTML is content between html tags. Ex-
<p> This is paragraph element</p>



Are you sure you want to delete this post?

renoldscott
I agree with dennis123.



Are you sure you want to delete this post?

postcd
I would say tag is part of the code

like

<h1>...<h1>
<p>...</p>

and element is path to some file like image (.jpg), javascript (.js), style sheet (.css)
anirban09P
HTML elements
An element in HTML represents some kind of structure or semantics and generally consists of a start tag, content, and an end tag. The following is a paragraph element:

<p>This is the content of the paragraph element.</p>

HTML tags

Tags are used to mark up the start and end of an HTML element.

<p></p>



Are you sure you want to delete this post?