Solved

W3C standards "http://www.w3.org/TR/html4/strict.dtd"

Posted on 2007-11-16
8
2,577 Views
Last Modified: 2013-11-19
I have the following errors coming when I use http://validator.w3.org/
to validate my page:
Here is my page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> 
<html>
<head>
<title> paswordform</title>
</head>
<body>
<!--center-->
<!--The center element is not supported in XHTML 1.0 Strict DTD-->
<!--use CSS-->
 
<form id="form" action="" onsubmit="return false" >
     <input id="Password1" type="password" maxlength="20"  />
      &nbsp; &nbsp; &nbsp;
     <input name="button" id="button" type="button" onclick="Login()" value="Login" />
  <!--input name="button" type="button" id="button" onClick="login()" value="Login"-->
</form>
<!--/center-->
<!--The center element is not supported in XHTML 1.0 Strict DTD-->
<!--use CSS-->
</body>
</html>

--------------------------------------------------------------------------------------------

Validation Output: 4 Errors
 Line 13, Column 60: NET-enabling start-tag requires SHORTTAG YES.
      <input id="Password1" type="password" maxlength="20"  /> ✉
The sequence <FOO /> can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HMTL 4.01 Strict, the '/' terminates the tag <FOO (with an implied '>'). However, since many browsers don't interpret it this way, even in the presence of an HMTL 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.

 Line 13, Column 60: document type does not allow element "INPUT" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS" start-tag.
      <input id="Password1" type="password" maxlength="20"  /> ✉
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

 Line 13, Column 61: character data is not allowed here.
… <input id="Password1" type="password" maxlength="20"  /> ✉
You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include:

putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>), or
forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes), or
using XHTML-style self-closing tags (such as <meta ... />) in HTML 4.01 or earlier. To fix, remove the extra slash ('/') character. For more information about the reasons for this, see Empty elements in SGML, HTML, XML, and XHTML.

 Line 15, Column 85: NET-enabling start-tag requires SHORTTAG YES.
…ton" onclick="Login()" value="Login" />✉
The sequence <FOO /> can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HMTL 4.01 Strict, the '/' terminates the tag <FOO (with an implied '>'). However, since many browsers don't interpret it this way, even in the presence of an HMTL 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.

 Line 15, Column 85: document type does not allow element "INPUT" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS" start-tag.
…ton" onclick="Login()" value="Login" />✉
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

 Line 17, Column 6: end tag for "FORM" which is not finished.
</form>✉
Most likely, you nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>

Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, in HTML the <head> element must contain a <title> child element, lists (ul, ol, dl) require list items (li, or dt, dd), and so on.

Can someone help me with these errors?


0
Comment
Question by:mathieu_cupryk
  • 5
  • 3
8 Comments
 
LVL 30

Accepted Solution

by:
Steggs earned 500 total points
ID: 20300575
Hello,

Change the inputs so that they are not self closing

<input id="Password1" type="password" maxlength="20"  />

to

<input id="Password1" type="password" maxlength="20"></input>


See where we are after you make those changes

Steggs
0
 

Author Comment

by:mathieu_cupryk
ID: 20300686
Hi Steggs, it gives me

 Line 13, Column 57: document type does not allow element "INPUT" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS" start-tag.
     <input id="Password2" type="password" maxlength="20"></input>✉

What can I do know?
0
 
LVL 30

Expert Comment

by:Steggs
ID: 20300855
Hey,

you need to put the input inside a block level element like a <div> or a <fieldset>

Steggs
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Author Comment

by:mathieu_cupryk
ID: 20300878
Something like this?

<form id="form" action="" onsubmit="return false" >
<div>
     <input id="Password2" type="password" maxlength="20"></input>
     <input name="button" id="button" type="button" onclick="Login()" value="Login"></input>
</div>
</form>
0
 
LVL 30

Expert Comment

by:Steggs
ID: 20300891
yes... give that a go
0
 

Author Comment

by:mathieu_cupryk
ID: 20300903
Byte-Order Mark found in UTF-8 File.

The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is known to cause problems for some text editors and older browsers. You may want to consider avoiding its use until it is better supported.

Validation Output: 2 Warnings
Below is a list of the warning message(s) produced when validating your document.

 Line 15, Column 57: NET-enabling start-tag requires SHORTTAG YES.
     <input id="Password2" type="password" maxlength="20"/>
0
 

Author Comment

by:mathieu_cupryk
ID: 20307670
Syntax would go something liike this:
<div>
<input id="Password2" type="password" maxlength="20">
     <input name="button" id="button" type="button" onclick="Login()" value="Login">
</div>

Will work. I will give u a B for trying.  
0
 

Author Closing Comment

by:mathieu_cupryk
ID: 31409622
You pointed me in a good direction.
0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question