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.

Validator question

Featured Replies

Hey, I recently tested my code with the W3C validator. I got a few errors, but I've managed to fix them all bar two. I was wondering if someone could point out where I'm going wrong with these simple errors. I'm sure they're not hard to fix, but I don't really understand the FAQ it supplies for these two specific errors:

 

Here are the errors: [using 4.01 transitional]

 

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

 

 

Line 181, Column 49: end tag for element "DIV" which is not open

 

echo '<div id="dark" class="transparent"></div>';

 

The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

 

 

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

 

 

Line 181, Column 50: character data is not allowed here

 

echo '<div id="dark" class="transparent"></div>';

 

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

 

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

 

 

Like I say I understand what the erorrs are telling me, but a bit confused how to fix them, I can't see why it's not saying the DIV not open...anyone mind pointing out how to fix these?

 

Thanks alot.

It looks like you're trying to validate php code. You need to open the page with your php server running, take the source code and validate that

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.