[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Offtopic: html gurus ... is <br /> valid ?



Colin Watson wrote:
> "Eric G . Miller" <egm2@jps.net> wrote:
> >Surfed over to salon.com with the links browser and <br /> showed up all
> >over the place. So I looked at the source, and sure enough, there was
> ><br /> all over the place.  Now it's my understanding that browsers are
> >supposed to ignore tags they don't understand -- which links is clearly
> >not doing -- but what on earth could be the purpose of such a thing?
> 
> I think it's just another SGML SHORTTAG construct, like </>. I agree
> that it shouldn't be used in HTML.

Salon.com may be on it's way to using an XHTML DTD. <br /> is really
supposed to be <br/>. But that won't be parsed correctly by the popular
browsers, so <br /> is used instead. You'll see this with other empty
elements on their site like img. In any case, they need to specify the
DTD they want to use at the beginning of their document, such as:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
   <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">

This is all covered at http://www.w3.org/TR/xhtml1/. The <br />
issue is covered in sections 4.6 and C.2.

Despite all of this, my lynx (2.8.3rel.1) from unstable doesn't display
the tags like you're saying Eric. Which version do you have? Also, can
you try using lynx at:

http://wsmake.org/index1.cgi

I use XHTML there and many <br /> tags, but unlike salon, my page
specifies the DTD. Perhaps your lynx needs the DTD for XHTML
to work.

HTH,

-- 
( Mike Brownlow | http://wsmake.org/~mike/ | http://wsmake.org/ )
( "A scorner seeketh wisdom, and findeth it not: but knowledge  )
( is easy unto him that understandeth." Proverbs 14:6           )



Reply to: