faqts : Computers : Programming : Languages : PHP : General Information : About PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

Entry

Why do I see so many sample PHP files with "/>" instead of ">" in the HTML-interpreted portion?

Oct 8th, 2006 10:22
Matthew Wilkinson, Angelina Bell,


/> is the way of closing tags that do not require closing tags. For
instance <br /> does not require a closing tag, and so a slash is added
before the tag closes. This is only required in XHTML or HTML 4.01
Strict, but in normal HTML, this sort of closing method is not strictly
necessary.