Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   html errors in custom widgets as told by W3C Markup Validation (http://forum.bytesforall.com/showthread.php?t=19641)

swimflyfast2 Feb 15, 2013 11:12 AM

html errors in custom widgets as told by W3C Markup Validation
 
when I ran the w3c validator I get 32 errors relating to my custom widgets see example below.
I'm wondering if I should be worried about this and how it happened. Everything seems to work ok.

example widget:
<?php bfa_widget_area('name=header-slide&cells=3&width_1=220&align_1=9&align_2=9&widt h_640=5&width_3=60&align_3=8&before_widget=<div id="%1$s" class="header-widget %2$s">&after_widget=</div>'); ?>


EXAMPLE of ERRORS from W3C Markup Validation tool:
Line 203, Column 59: an attribute value must be a literal unless it contains only name characters
…_1" align="left" valign="top"><div id=\"text-9\" class=\"header-widget widget_…

You have used a character that is not considered a "name character" in an attribute value. Which characters are considered "name characters" varies between the different document types, but a good rule of thumb is that unless the value contains only lower or upper case letters in the range a-z you must put quotation marks around the value. In fact, unless you have extreme file size requirements it is a very very good idea to always put quote marks around your attribute values. It is never wrong to do so, and very often it is absolutely necessary.

Line 203, Column 59: character "\" is not allowed in the value of attribute "id"
…_1" align="left" valign="top"><div id=\"text-9\" class=\"header-widget widget_…

It is possible that you violated the naming convention for this attribute. For example, id and name attributes must begin with a letter, not a digit.

Line 203, Column 76: an attribute value must be a literal unless it contains only name characters
…valign="top"><div id=\"text-9\" class=\"header-widget widget_text\"> <div cl…

You have used a character that is not considered a "name character" in an attribute value. Which characters are considered "name characters" varies between the different document types, but a good rule of thumb is that unless the value contains only lower or upper case letters in the range a-z you must put quotation marks around the value. In fact, unless you have extreme file size requirements it is a very very good idea to always put quote marks around your attribute values. It is never wrong to do so, and very often it is absolutely necessary.

Line 203, Column 103: "widget_text" is not a member of a group specified for any attribute
…-9\" class=\"header-widget widget_text\"> <div class="textwidget"><center><a…




Atahualpa 3.7.10 The Best theme out there!
wordpress 3.5.1
juggledads multicolumn custom query

juggledad Feb 15, 2013 11:21 AM

set your CSS to external and then try the validation
also check to see if your PHP is running with 'magic quotes' set to on and if so, set it off (ask your host about how to check and change this)

juggledad Feb 15, 2013 01:06 PM

p.s. you should go validate google.com or apple.com or microsoft.com and see the results...oh and try multiple validators and see if any of them agree to the same errors. This is why I don't pay attention to validation


All times are GMT -6. The time now is 09:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.