Are the terms html element and html tag same or different? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

Are the terms html element and html tag same or different?

15th May 2018, 6:09 PM
Ram Bahadur Gurung
Ram Bahadur Gurung - avatar
4 Answers
+ 13
An HTML tag is simply opening or closing an object. For example: <p> and </ p> are called HTML tags. The HTML element includes an open tag that closes the tag, content (optional for tags without content) For example: <p> This is the content </ p>: this complete thing is called an HTML element.
15th May 2018, 6:18 PM
アルゴリズム X
アルゴリズム X - avatar
+ 11
By "element" is meant the DOM element of the tree. That is, this is what turned into the record of your Tag. In essence, the Tag is converted to an Element, one of the properties of which is tagName. In fact, the tree does not care, like the browser, which tag you shoved. Simply, it creates an Element for each Tag, with its own predefined styles and behavior.
15th May 2018, 6:15 PM
アルゴリズム X
アルゴリズム X - avatar
+ 3
thanks
17th May 2018, 2:41 PM
Ram Bahadur Gurung
Ram Bahadur Gurung - avatar
+ 2
With <b> only one tag is used. Whats inside opening and closing of other tags is element.
22nd May 2018, 1:36 AM
Apple Blossom
Apple Blossom - avatar