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.

Help with W3C validation for a Facebook Widget

Featured Replies

Hello website experts and thank you in advance for any assistance that you can provide to a complete novice.

 

A couple of years ago I completed a website design course and then went on to create a site for my wife’s business.

Plain and simple, no fancy templates, just raw HTML. The site has served my wife well and she now has a nice established business. I know it could definitely use some cosmetic improvements (and there are still tables on one page) but for now it just works fine!

 

I’m working through a SEO document and have become semi obsessed with getting zero errors on the W3C validation tool.

First things first, here’s the site: www.kindermusikwithnadine.com

 

I need help cleaning up my HTML so that it passes the test please.

At first I got 24 errors but have managed to get it down to just 7 - one about an HR, the other six to do with a Facebook widget. I've also noticed that the widget doesn't always show up properly - some times it shows, some times not!

 

First the easy error that I'm struggling with and it's a simple HR.

 

 

Line 26, Column 20: there is no attribute "color"

<hr size="8" color="purple" />

I just want a simple purple line under my header as you can see on the page.

Can someone suggest some better code to get rid of this error?

 

Then there are six more errors all to do with the FaceBook widget.

 

Here is one:

 

Line 88, Column 215: there is no attribute "profile_id"

…c244ee6");</script><fb:fan profile_id="37968251888" stream="0" connections="10

 

 

Please could someone help me with getting rid of the errors?

 

Webtastic.

Hello mate,

 

Line 26, Column 20: there is no attribute "color"

<hr size="8" color="purple" />

I just want a simple purple line under my header as you can see on the page.

Can someone suggest some better code to get rid of this error?

 

The correct way to do this is to use CSS rather than attributes. Use this instead:

 

 
<hr style="height: 8px; color: purple; background-color: purple;" />

 

Improving on this I tend to use hex codes for colours rather than the words (A simple google search for hex colour codes and you will find loads). Bit more flexibility:

 

 
<hr style="height: 8px; color: #551A8B; background-color: #551A8B;" />

 

In terms of the facebook widget I have never used it but what it is saying is that no attribute exists called profile_id. Just like it was saying a color attribute does not exist for <hr>. Not sure how to sort the widget out myself.

  • Author

Hello mate,

 

 

 

The correct way to do this is to use CSS rather than attributes. Use this instead:

 

<hr style="height: 8px; color: purple; background-color: purple;" />

 

Improving on this I tend to use hex codes for colours rather than the words (A simple google search for hex colour codes and you will find loads). Bit more flexibility:

 

<hr style="height: 8px; color: #551A8B; background-color: #551A8B;" />

 

In terms of the facebook widget I have never used it but what it is saying is that no attribute exists called profile_id. Just like it was saying a color attribute does not exist for <hr>. Not sure how to sort the widget out myself.

 

Well that is a start on how to fix the HR error - thanks very much, greatly appreciated! :drinks:

Now to work out how to fix that pesky widget.

Edited by Webtastic

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.