I do not understand what element is | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

I do not understand what element is

<p> Hello </p> in this code what is element ? 1) <p> Hello </p> or 2) Hello

1st Mar 2019, 5:26 AM
Insufficient Storage
Insufficient Storage - avatar
14 Answers
+ 29
Good Question:👌 ● P Is Element ●<p> Is Tag ●< / > Is Element ●<p align=""> (Align) Is Attribute Keep It Up!👍 Good luck!!!✌
1st Mar 2019, 9:15 AM
K͜͡ɩnɢ・ムzizi 🖤
K͜͡ɩnɢ・ムzizi 🖤 - avatar
+ 5
Html is a markup language ( use to identify content and structure of a web site). Basically, html including two things: tag and content or element (tags are use to identify the display of content). Tag in basically inside <> or </> symbol (the <> tag is call openning tag and </> is call closing tag) Content (element) is within the tag. In your case, Hello is the content. And <p>, </p> is tags to tell the browser: print out the string "Hello" as a paragraph!
1st Mar 2019, 6:14 AM
Thống Nguyễn
Thống Nguyễn - avatar
1st Mar 2019, 6:15 AM
Sudarshan Rai
Sudarshan Rai - avatar
+ 3
Thank you all for helping me 🎁
1st Mar 2019, 6:28 AM
Insufficient Storage
Insufficient Storage - avatar
+ 2
the first one is coding ☺ but the second one is not☺☺
1st Mar 2019, 6:05 AM
Moumen Al_Bakkar
Moumen Al_Bakkar - avatar
+ 2
the second one isn't an element
1st Mar 2019, 6:14 AM
Moumen Al_Bakkar
Moumen Al_Bakkar - avatar
+ 2
Htlm element is every thing from the openning to the closing tag. That mean "Hello" is html element, and the rest is tag
1st Mar 2019, 6:20 AM
Thống Nguyễn
Thống Nguyễn - avatar
+ 2
In Html: element can contain other elements (call nested element) Ex: <body><p>Hello</p></body>
1st Mar 2019, 6:25 AM
Thống Nguyễn
Thống Nguyễn - avatar
1st Mar 2019, 6:32 AM
Thống Nguyễn
Thống Nguyễn - avatar
+ 2
The element is <p>Hello</p> Hello is the content of the element.
1st Mar 2019, 6:56 AM
Alexander Lippitsch
Alexander Lippitsch - avatar
+ 1
do you mean that the second one is an element ?
1st Mar 2019, 6:08 AM
Insufficient Storage
Insufficient Storage - avatar
+ 1
no programmer use "hello" without a paragraph tag or div or.... because we difining the paragraphs inside <p> tag. Also u can use <h1> sometimes of course not to make the sentence bigger but u can it for important one
1st Mar 2019, 6:12 AM
Moumen Al_Bakkar
Moumen Al_Bakkar - avatar
+ 1
only <p> is an element ? <div style="color:red"> Hi </div> in the second example, from starting tag to ending tag of div with content isn't an element ?
1st Mar 2019, 6:17 AM
Insufficient Storage
Insufficient Storage - avatar
+ 1
But Moumen Al_Bakkar told that Hello is not an element. I'm confuse...
1st Mar 2019, 6:26 AM
Insufficient Storage
Insufficient Storage - avatar