XHTML transitional self closing tags -
i using
<!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"> doctype , notice i'm being suggested elements such as
<p /> instead of <p> </p> in eclipse ide. self closing tag? capital letter standard of somesort?
yes, <p /> self-closing tag <p></p>, , valid in xhtml (but not html5).
every browser supports xhtml supports self-closing syntax every tag:
elements declared in dtd empty can have end tag or can use empty element shorthand (see empty elements).
having said that, self-closing paragraph makes no sense.
it's important note xhtml elements must written in lower-case:
xhtml documents must use lower case html element , attribute names. difference necessary because xml case-sensitive e.g.
<li>,<li>different tags.
it's important note xhtml doctype outdated as of 2012. strongly suggest switching html 5 instead.
hope helps! :)
Comments
Post a Comment