Self-closing HTML tags

Need technical advice on coding your web pages? Covers HTML, JavaScript, CSS, and some server side technologies. Also the issue of some webpages not displayed well.

Moderator: Don_HH2K

Self-closing HTML tags

Postby Don_HH2K » Sun 06 Mar, 2005 9:47 pm

I know that, in XHTML 1.0, you can self-close a tag in the following manner:
Code: Select all
<a name="anchor name" />
Does anybody know if I can do the same with HTML 4.01, without breaking the rules set by the DTD?
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Donzilla/0.6PR1 (like Netscape/7.2; wml/1.3)
Laptop: HP Compaq nx6325 - Turion 64 X2 @ 2GHz, 2GB DDR2, 100GB HD, ATI Radeon X300, 15" LCD, Seven Pro
Handheld: Palm Treo 650 - Intel PXA270 @ 312MHz, 10MB RAM, 32MB flash, 2.7" LCD, Palm OS 5.4
User avatar
Don_HH2K
Moderator
Moderator
 
Posts: 5112
Joined: Sun 09 May, 2004 3:59 pm

Postby jalarie » Tue 15 Mar, 2005 12:26 pm

No. I just tried it and received a ton of error messages.
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1
jalarie
new member
new member
 
Posts: 2
Joined: Tue 23 Jul, 2002 7:34 am
Location: Flint, Michigan, U.S.A.


Return to Web Design and Page Coding

Who is online

Registered users: Google [Bot]