What is the difference between a tag and an element in HTML?

devquora
devquora

Posted On: Feb 22, 2018

 

HTML tag is just opening or closing entity.

Example: <p> and </p> are called HTML tags

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

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

source: https://stackoverflow.com/questions/8937384/what-is-the-difference-between-html-tags-and-elements

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    HTML Interview Questions

    What is HTML and what is it used for?

    HTML is a widely used language that gives our webpage a structure. HTML stands for HYPERTEXT MARKUP LANGUAGE. HTML was..

    HTML Interview Questions

    What does HTML stand for?

    HTML means Hypertext Markup Language. This language is basically used for creating web applications and also for web pa..

    HTML Interview Questions

    In which year HTML was first proposed?

    Basically, in 1980, A great physicist Sir Tim Berners -Lee who is a contractor at CERN proposed the way through which documents can be shared easily. So, he prototyped ENQUIRE (a system for CERN), whi..