Jump to content

Xhtml Issue


fanciman

Recommended Posts

The tag:"script" is not allowed within: "html" It is only allowed within: a, abbr, acronym, address, b, bdo, big, blockquote, body, button, caption, cite, code, dd, del, dfn, div, dt, em, fieldset, form. . ..[XHTML 1.0 strict]

I converted an HTML page to XHTML 1.1 in Dreamweaver. I received the error message above. The line of code creating the problem is below:

<script type="text/javascript">

I don't know how to rewrite the line so that it is valid xhtml.

Could anybody help?

There was just one more problem:

The tag: "br" doesn't have an attribute: "clear" in currently active versions.[XHTML 1.0 strict]

The line of code generating the problem is:

<br clear="all" />

Link to comment
Share on other sites

The tag:"script" is not allowed within: "html" It is only allowed within: a, abbr, acronym, address, b, bdo, big, blockquote, body, button, caption, cite, code, dd, del, dfn, div, dt, em, fieldset, form. . ..[XHTML 1.0 strict]

script tages are usually placed in the head or body:

<html>

<head>

<script ...>

</head>

<body>

...

</body>

</html>

from the error message it seems you may have something like:

<html>

<script ...>

<head>

...

</head>

<body>

...

</body>

</html>

Edited by bkkguy1970
Link to comment
Share on other sites

bkkguy1970 is right about the script tag. It must be included between two other tags, not just after the html declaration. Best places are:

<head>

<script...></script>

</head>

or

<body>

<script...></script>

</body>

For your other problem, try using this instead:

<br style="clear: both;" />

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.










×
×
  • Create New...