What if we don't close a tag? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

What if we don't close a tag?

If we don't close the tag, would it works, or the browser is going to give errors?

1st Apr 2019, 5:21 AM
Wahid Khudayar
Wahid Khudayar - avatar
1 Resposta
+ 2
Tags like <br> <IMG> <hr> <li> , etc doesn't need an end tag But tags like <head> <html> <body> <p> <ol> <ul> , etc needs an end tag Not writing an end tag would not bring an error but it would not show the content inside that tag So, it's better to follow the rulesšŸ˜Ž
1st Apr 2019, 7:39 AM
Poorva Mahesh Shukla