[thelist] validate this
Joe Crawford
joe at artlung.com
Fri Sep 7 23:36:14 CDT 2001
>> document.write ("<style type='text/css'
>> media='all'>@import 'fancy.css';</style>")
>>
>> how do i change that to validate?
>>
>> Error: end tag for element "STYLE" which is not open
The </ part of the closing tag tells the validator that a tag is ending (I
think) ... so you need to escape that combination -- <\/ -- so the result
is:
<script type="text/javascript" language="JavaScript">
<!--
document.write("<style type='text/css' media='all'>@import url(fancy.css);<\/style>");
//-->
</script>
(That document.write is all on one line, in case it wraps)
- Joe
--
........... Joe Crawford : thinking and design about the web
.... enigmatic narcissism and miscellany : http://artlung.com
.... community instigator : http://WebSanDiego.org
.... San Diego, California, USA .....................AAAFNRAA
More information about the thelist
mailing list