29th Oct 2017, 12:05 PM
Gourab Dutta
Gourab Dutta - avatar
3 odpowiedzi
+ 18
HTML course described these tags.
29th Oct 2017, 12:07 PM
Igor Makarsky
Igor Makarsky - avatar
+ 4
@Elizabeth: It seems to me than the ending slash is technically invalid in Html5 (but tolerated by browsers according to Html specifications permissivity which expect than html documents are parsed and displayed "as well as they can" and do auto-correcting invalid codes), optional in Html4 (purpose was to migrate towards XHTML, wich was abandonned since Html5), and obviously required in XHTML ^^ (but I'm too much lazy to go searching again for references ;P)
29th Oct 2017, 1:04 PM
visph
visph - avatar
+ 2
Here's a complete list of self-closing tags of HTML5. These are called “void-elements” . <area /> <base /> <br /> <col /> <command /> <embed /> <hr /> <img /> <input /> <keygen /> <link /> <meta /> <param /> <source /> <track /> <wbr /> The space before the slash is optional. HTML5: the slash is optional.HTML4: the slash is technically invalid. However, it's accepted by W3C's HTML validator.XHTML: The slash is REQUIRED. but i recommend to always add the slash. Because, it provides a visual clue of non-closing tags. It's also convenient if you write simple script to check your HTML.
29th Oct 2017, 12:53 PM
Elizabeth🌸
Elizabeth🌸 - avatar