Question:

Decrement operators ?

by  |  earlier

0 LIKES UnLike

Decrement operators may cause W3C XHTML to incorrectly report errors, so how do we cope with it?

 Tags:

   Report

1 ANSWERS


  1. XHTML doesn't have decrement operators!  

    Are you using PHP or JavaScript?  These languages do allow decrement operators, but by the time they produce XHTML output, the decrement has already happened.  

    If you've embedded JavaScript directly in your page, XHTML validators sometimes get confused.  Use the CDATA directive to tell the validator to ignore JavaScript:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

    "http://www.w3.org/TR/xhtml1/DTD/xhtml...

    <html lang="EN" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">

      <head>

        <meta http-equiv="content-type" content="text/xml; charset=utf-8" />

        <title>HelloWorld.html</title>

        <script type = "text/javascript">

          //<![CDATA[

            // Hello, world!

            alert("Hello, World!");

          //]]>

        </script>

      </head>

      <body>

      

      </body>

    </html>

    http://www.aharrisbooks.net/xfd/book_4/c...

You're reading: Decrement operators ?

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.