chrisale
Joined: 09 Nov 2005 Posts: 187
|
Posted: Wed Feb 08, 2006 10:50 pm Post subject: Working HTML comments!! |
|
|
A while back I was on Marks case cuz wview uses <!-- for it's tags... which is the same as what HTML uses for comments... meaning it's very hard to do comments in your HTML code, and... if you have any javascript, very hard to make your code VALID to strict XHTML standards.
Well, today, someone more XHTML savvy than me enlightened me to another way to comment XHTML code.
Instead of:
Use this:
Why do I care? Well, I'm a stickler for using the HTML validator. http://validator.w3.org
And I have a personal goal to make every page that I create, valid to the Strict XHTML standard.
The only thing standing in my way was the Javascript. Inline Javascript code cannot be validated... to get around this, you usually comment it out like so:
Code: |
<script type="text/javascript">
//<!--
Your Javascript
Code Here
//-->
</script>
|
But of course wview gets rid of those comments... opening up the javascript and annoying the validator...
Sooo, we use the XML style "CDATA" comments above.
Now everyone is happy!
YAY! |
|