Friday 5 July 2019

html - Is it OK to use a self closing DIV tag?










For example:







Something would then be done to populate this div using Javascript.



Is this valid HTML?


Answer



No. HTML 4.x doesn't have any concept of self closing tags.



It is valid in XHTML.


No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...