Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

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.)

 

 

 

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...