๐ข When we write our html code we use tags and elements multiple times but we never focus on which one is a tag and which is one element, but for interviews perspective, it's one of the important questions I think.
Let's find out the difference between them.
tags vs elements
tags : used to mark up the start and end of an html element. ๐
<p></p>
elements : represents some kind of structure or semantics and generally consists of a start tag, content, and an end tag. ๐
<p>Hi, my name is vipin</p>
tags in HTML ๐
โข Used to storing html elements
โข Every single tag in html has a distinct meaning
โข Example :
<html>, <body> etc.
elements in HTML ๐
โข Used to storing html content
โข HTML elements are any text contained within an html tag.
โข Example :
<h1>Heading</h1>,
<p>paragraph</p>,
<br> etc.
End thread ๐งต
If this thread helpful for you then
1. Do Retweet the FIRST TWEET. 2. Follow me and turn on the notifications: @personalvipin
๐ข Note : I made this thread at the request of one of my follower.
I hope it's helpful for all of you guys!
display properties in CSS ๐
โข It's used to identify how our html elements display on the webpage.
โข In html the behaviour of display properties depends on elements. It's inline or block(default).
โข But we can reset it using css display properties.