+ 1
Tags in HTML
Between the two types of tags empty and container in HTML. The empty tag, does not have end tag at all or it is just not necessary to include them? While still waiting for response, I will continue reading...
4 Réponses
+ 2
Empty tag don't have closing tag. if it contain a closing tag than it a container tag
+ 2
Ls$%¥ looks like you are exploring block and inline tags .. here is a code that might help ...
https://sololearn.com/compiler-playground/WGgAs0eZKPTY/?ref=app
+ 2
Empty tag doesn't have any closing tag, and if you include them, it'll result in error.
Container tag has a closing tag, and it should look like this:
<tag> (Content) </tag>
If you don't include closung tag here, it'll result is error.
Keep learning and practicing! 🚀
+ 1
The name may be confusing, since empty tags are not exactly empty. For sake of comparison:
EMPTY tag: <img src="my_img.png width="500" height="600">
Notice that all information you've got there relates to the image that will appear on your user's screen. This is considered an "empty" tag. Now compare to the following container tag.
<p> whatever text </p>
You need to close this paragraph tag with the </p>, otherwise your code will get all messy. This is a container tag; the information goes between an opening tag (<p>) and a closing tag (</p>).