0

Do you have to add / to an ending html tag?

If so, why? The lesson doesn't say, it just assumes you'll get it.

24th Apr 2019, 12:11 AM
Jude Keeshan
4 Respostas
+ 8
I think the slash is meant to indicate where the end of the content is. For instance, </p> tells that this is where the content for the paragraph tag ends.
24th Apr 2019, 8:29 AM
silentlearner
silentlearner - avatar
+ 6
Yes it is still recommended as a closing "/" for many tags. It was derivative of the xml era in programming and remains in much of the haml and html languages for web browser interpretations. Its origin actually can be seen in BASIC and Algo languages dating back before 1989 world wide web programming.
24th Apr 2019, 12:31 AM
BroFar
BroFar - avatar
+ 3
Most html tags have a closing tag like <h1>Sometext</h1> Some dont like input or img. Think of the html tags that have closing tags like a container. You can use it to add css and javascript to to the code inside it.
24th Apr 2019, 12:41 AM
Ryan Lusby
Ryan Lusby - avatar