froggyboy604
Seasoned Veteran
I see some websites use <br> and other websites use <br />. Which one is better for creating a line break?
I'm aware of that. As I use PHP and CSS mostly now, it's easy to stay within the rules, as on most complex PHP scripts, on some files there is almost no HTML (and styles are defined though CSS).death180 said:If you want to be W3C valid though you would want to stay consistent and correct.
XHTML is an XML based language, you forgot that.gbl08ma said:Although both are correctly understood by all the most recent (by recent I mean, 2008 and later) browsers (including the horrible IE), <br /> is a better coding practice, and is a more recent approach because it is XHTML.
XHTML is the same as HTML, but XHTML is considered as the evolution of HTML, thus is better (in my opinion) to use XHTML. XHTML is based on the XML markup and that's why even single tags like <br /> and <img source="..." /> need to have the closing slash (/) in the end preceded by a space ( ).
HTML5 (in development) is considered by some as the successor of XHTML
Read more about this on the usual site...
http://wikipedia.org/wiki/XHTML
PS: if you really want to know my own opinion, nowadays browsers understand basically all the types of HTML, from HTML1 to HTML5 including XHTML, and they even parse correctly mixtures of these standards, and I don't really follow a standard. Let's say my HTML is something between HTML4.1 and XHTML. 😀
Since 2007, Forum Promotion has specialized in providing advertising solutions to webmasters looking to promote their communities. We pride ourselves in being the bridge that connects forum administrators, bloggers, and more.
We use essential cookies to make this site work, and optional cookies to enhance your experience.