Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Q element does not get quoted in IE

Browser Bugs Affecting HTML

Q element does not get quoted in IE

by  BillyRayPreachersSon  Posted    (Edited  )
Unfortunately, Microsoft has not adhered to the HTML specifications for the Q element:

[quote W3C]Visual user agents must ensure that the content of the Q element is rendered with delimiting quotation marks. Authors should not put quotation marks at the beginning and end of the content of a Q element.[/quote]

One way around this is to use IE's conditional comments to insert quotes for IE only:

Code:
<html>
<body>
    And so I said to him <q lang="en-uk"><!--[if IE]>"<![endif]-->I have never been so exhausted after such a marathon session<!--[if IE]>"<![endif]--></q>
</body>
</html>

The only drawback of that method is, as you can see, the quotes are not language-dependant. They will be fixed to the quotes given in the source, whereas the browser-inserted quotes should be dependant on the language of the quote (or document, if none is specified).

Should Microsoft fix this for IE 7, then version detection can be placed in the conditional comment:

Code:
<!--[if lt IE 7]>

Dan


[link http://www.coedit.co.uk/][color #00486F]Coedit Limited[/color][/link][color #000000] - Delivering standards compliant, accessible web solutions[/color]

[tt]Dan's Page [blue]@[/blue] Code Couch
http://www.codecouch.com/dan/[/tt]
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top