/    Sign up×
Community /Pin to ProfileBookmark

form tag error

Hi guys,
I’m doing a HTML assignment for university, we’ve been told we have to use HTML 4.0 Strict. Done most of it no problem but the only thing I have been having trouble with is the form tag. Could someone look at this code and see if you can see the problem:-

<form action=”anotherpage.php” method=”post”>
This is a Textbox:<input type=”text” name=”textexample”>
<br><br>
This is a Checkbox:<input type=”checkbox” name=”checkexample”>
<br><br>
This is a Radio Button:<input type=”radio” name=”radioexample”>
<br><br>
Choose an option:<br><select name=”sections” multiple>
<option>Option One</option>
<option>Option Two</option>
<option>Option Three</option>
</select><br><br>
<textarea name=”textarea” rows=”5″ cols=”25″>This is a TextArea:
</textarea>
<br><br>
<button name=”submit” value=”Modify” accesskey=”M”>
This is a Submit Button
</button>
</form>

The W3C validator is giving me this error:-
“Line 116, column 31: an attribute value literal can occur in an attribute specification list only after a VI delimiter”

Any help would be much appreciated!

Thanks
James

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@FangNov 10.2004 — The contents of a form must be wrapped in a block element; <p> or <div>
Copy linkTweet thisAlerts:
@NogDogNov 10.2004 — I got it to validate by adding a paragraph tag around the form elements:
<i>
</i>&lt;form action="anotherpage.php" method="post"&gt;
&lt;p&gt;
This is a Textbox:&lt;input type="text" name="textexample"&gt;
&lt;br&gt;&lt;br&gt;
This is a Checkbox:&lt;input type="checkbox" name="checkexample"&gt;
&lt;br&gt;&lt;br&gt;
This is a Radio Button:&lt;input type="radio" name="radioexample"&gt;
&lt;br&gt;&lt;br&gt;
Choose an option:&lt;br&gt;&lt;select name="sections" multiple&gt;
&lt;option&gt;Option One&lt;/option&gt;
&lt;option&gt;Option Two&lt;/option&gt;
&lt;option&gt;Option Three&lt;/option&gt;
&lt;/select&gt;&lt;br&gt;&lt;br&gt;
&lt;textarea name="textarea" rows="5" cols="25"&gt;This is a TextArea:
&lt;/textarea&gt;
&lt;br&gt;&lt;br&gt;
&lt;button name="submit" value="Modify" accesskey="M"&gt;
This is a Submit Button
&lt;/button&gt;
&lt;/p&gt;
&lt;/form&gt;
×

Success!

Help @jimmah spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...