Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 564173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:44:20+00:00 2026-05-13T12:44:20+00:00

Why this give error in W3c html validation ? I’m using HTML 4.01 Strict

  • 0

Why this give error in W3c html validation ? I’m using HTML 4.01 Strict doctype.

<form method="get" action="/search" id="search">

   <input type="text" value="search" maxlength="80" class="textbox" >

</form>

and this does not?

  <form method="get" action="/search" id="search">
    <div>
       <input type="text" value="search" maxlength="80" class="textbox" >
    </div>
  </form>

This is error

document type does not allow element
“INPUT” here; missing one of “P”,
“H1”, “H2”, “H3”, “H4”, “H5”, “H6”,
“PRE”, “DIV”, “ADDRESS” start-tag

Is it necessary to put input in a div?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:44:20+00:00Added an answer on May 13, 2026 at 12:44 pm

    The official reason is that in HTML4 strict the FORM elements can only contain block elements, but block elements are in turn allowed to contain form inputs. Hence, the structure form->block element->form input is what has to be used.

    I cannot find a serious reason, WHY it is so. It sounds like the authors of HTML did not want to allow forms that start on one line, then wrap over to next line and then have a submit button somewhere on the third line (which you can still achieve, by redefining the display property of a form, if you need. For instance, this article on 24ways just states that “it is a difference between Transitional and Strict standards”.

    Another comparison states (they are talking about xhtml vs html, but the idea is the same):

    In XHTML, the elements need to be coded
    in a semantic manner. Tables and forms
    can not be included in paragraphs, but
    form elements, being inline elements, need to be contained within a semantic
    block level element
    , such as a
    paragraph or table cell.

    This makes me think that FORM element is not “semantic enough” to contain other elements. It is not normally meant to be used for marking up your code, it is more like a technical element which shows where to post the data to. Hence, it technically is a BLOCK element, but it needs something more “semantic” to contain the actual input fields.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 292k
  • Answers 293k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Those nested parentheses and ?: are unnecessary. This should be… May 13, 2026 at 6:20 pm
  • Editorial Team
    Editorial Team added an answer Here's the media-wiki page: http://www.mediawiki.org/wiki/Wikipedia_iPhone_app. May 13, 2026 at 6:20 pm
  • Editorial Team
    Editorial Team added an answer You could map this column as a Formula. Map(x =>… May 13, 2026 at 6:20 pm

Related Questions

I have an AJAX application that downloads a JSON object and uses the data
I tried, to no avail! My problem is php's setcookie() fails in IE6. It's
Why does this give me parse error? going crazy over here.. I have this
why would this $trader_details = array_walk($trader_details, 'htmlspecialchars'); give this error? Severity: Warning Message: htmlspecialchars()
Not entirely sure how to phrase the question, because it's a why doesn't this

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.