Tag vs Element

An element is not a tag, and a tag is not an element. 

The Difference?

In most cases, an element is made up by an opening, and closing tag. For example, below we have a div tag:


Below, we have a fully created div element:


Now, that’s pretty straightforward, but as I’m guessing you’re thinking - there are some things which have no closing tag such as break, image or horizontal rule. 

In the times of XHTML (which is still kicking around), these would self close, by placing a forward slash before the last right angle bracket.

These would still be referred to as elements instead of tags

Read More

117 notes