Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Invalid] Markup Validation of...

Featured Replies

By wrapping all the elements inside your <form> in a set of <p> tags, you are left with just one error; the one about the div. You can't enclose a div in <p> tags so you can either assign your id to the p tags (<p id="map">) or contain the p tags inside the div.

 

It is basically all about block and inline elements in html. http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.3 - some more info for you on this.

 

So your validated form could look like this:

 

		    <form method="post" action="contactengine.php">

			    <p><label for="name">Name:</label>

			    <input type="text" name="name" id="name" />



			    <label for="Tel"><i>Tel:</i></label>

			    <input type="text" name="Tel" id="Tel" />



			    <label for="Email"><i>Email:</i></label>

			    <input type="text" name="Email" id="Email" />



			    <label for="Location"><i>Location:</i></label>

			    <input type="text" name="Location" id="Location" />



			    <label for="Message"><i>Message:</i></label><br />

			    <textarea name="Message" rows="20" cols="20" id="Message"></textarea>



			    <input type="submit" name="submit" value="Submit" class="submit-button" /></p>

		    </form> 

 

then your map div could be like this:

 <p id="map"><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></p>

or this:

 <div id="map"><p><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></p></div>

 

Hope this helps :)

Nice site!

 

First off you need to wrap the form elements in a <fieldset> element. This is a required element for forms and xHTML strict. Also belt and braces approach would be to wrap the <label> around the <input> aswell (see here).

 

As for the map, you don't need all of those line breaks. You can use CSS to target that div and set margins to space it apart from the other elements. Also you have not need to wrap it in a <p> element.

 

For the address you should use an unordered list which you can then style in CSS but get the same effect.

 

Also I'd check out jQuery to see if that helps.

 

Also very minor point, but <i> isn't deprecated so can still technically be used, but given you've got CSS on the page there's no need to use it as { text-style: italic; } will work just as well.

 

This should clean up your code a bit and help the validation issue. HTH?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.