Graeme Posted August 15, 2013 Report Share Posted August 15, 2013 hello all, in html 5 do you close tags say like this < /br> or </br> no space before the / i keep getting errors when validating and they all seem to be badrd around this thank you as always best wishes graeme Link to comment Share on other sites More sharing options...
falkencreative Posted August 15, 2013 Report Share Posted August 15, 2013 You're getting errors because that's not the right form. A valid break tag looks like this: <br> <br /> As far as I can tell, when using HTML5, "<br>" is the right way to do it. 1 Link to comment Share on other sites More sharing options...
Graeme Posted August 15, 2013 Author Report Share Posted August 15, 2013 thanks ben, what about other tags, how should they end? Link to comment Share on other sites More sharing options...
Andrea Posted August 15, 2013 Report Share Posted August 15, 2013 Same as in HTML 4 - </p> (but some closing tags are no longer required) If but if you really want to know all about it, read this Link to comment Share on other sites More sharing options...
Moloney Posted August 16, 2013 Report Share Posted August 16, 2013 I have used <br> without problems. Link to comment Share on other sites More sharing options...
Andrea Posted August 16, 2013 Report Share Posted August 16, 2013 I have used <br> without problems. <br> is the correct way for HTML 4 and 5. XHTML requires <br/> (the space is for older browsers, but I don't know what the exact definition of 'older' is) HTML 5 does not need the closing tags that XHTML requires, however, using them will not give you any validation errors. Link to comment Share on other sites More sharing options...
Graeme Posted August 16, 2013 Author Report Share Posted August 16, 2013 thanks andrea, the link you gave me is amazing, now i'm baffled about the tables, no <tr>! Link to comment Share on other sites More sharing options...
falkencreative Posted August 16, 2013 Report Share Posted August 16, 2013 thanks andrea, the link you gave me is amazing, now i'm baffled about the tables, no <tr>! I think you might be confused about that. Can you point to the spot in the article where it says it has been depreciated? Link to comment Share on other sites More sharing options...
Andrea Posted August 16, 2013 Report Share Posted August 16, 2013 I think you might be confused about that. Can you point to the spot in the article where it says it has been depreciated? Maybe this part - it does read like that to me, too: 8.1.2.5 Restrictions on content models For historical reasons, certain elements have extra restrictions beyond even the restrictions given by their content model. A table element must not contain tr elements, even though these elements are technically allowed inside table elements according to the content models described in this specification. (If a tr element is put inside a table in the markup, it will in fact imply a tbody start tag before it.) Link to comment Share on other sites More sharing options...
Graeme Posted August 17, 2013 Author Report Share Posted August 17, 2013 That is exactly it Andrea! Link to comment Share on other sites More sharing options...
Recommended Posts