In html when you're closing a line of code, why must i put a slash mark? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

In html when you're closing a line of code, why must i put a slash mark?

For example: <p>happy</p>

5th Jul 2019, 12:01 AM
Mariana C
Mariana C - avatar
2 Answers
+ 3
Just saying that the actual anchor <a> tag is used for hyperlinks and you generally don't nest other <a> tags inside it. I think Lexfuturorum used <a> as a general tag name.
5th Jul 2019, 2:10 AM
Sonic
Sonic - avatar
+ 2
Because if you wouldn't you couldn't do things like <a color="#ff0000" > Red <a color="#000000"> White </a> Red </a>
5th Jul 2019, 12:13 AM
Lexfuturorum
Lexfuturorum - avatar