Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 General
 Design issues
 w3 Validation Tips
 Topic Locked
Author « Topic     

Sinbad
ECT Moderator

USA
65937 Posts

Posted - 03/24/2009 :  17:17:33  
We've put together a list of the most common errors when validating your sites using http://validator.w3.org/ Markup Vaidation Service. The list will be updated as time permits with other common validation errors and solutions.

w3-Validation tips - specific to Doctype Transitional

Errors (E) and solutions (S) :

E -No DOCTYPE found!
S - Add the following Doctype to the top of your pages above the opening <head> tag.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

PHP Example:

<?php
session_cache_limiter('none');
session_start();
ob_start(); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

ASP Example:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

E - No Character Encoding Found! Falling back to UTF-8.

S - After the opening <head> tag check that you have:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

**Note the above charset maybe different for sites using for foreign characters.

E- end tag for "meta" omitted, but OMITTAG NO was specified

S- meta tag will need to be a self closing tag with / on the end - Example
<meta name="keywords" content="keyword, keyword, keyword />


E - There is no attribute "height" or There is no attribute "width" or there is no attribute "bordercolor" .

S - Remove height, width or bordercolor attribute from page, if height or width or border color is needed create a class in the style sheet for page element and assign class to element.

E - There is no attribute "background"

S - Create a class in the style sheet and assign the class to the table/cell.

E - Required attribute "alt" not specified

S - Include alt tags on all images, alt tags can reflect name of product or indicate action required. Alt tags can be empty see examples below. Alt tags are seen by users in some browsers unless left empty. Don't use alt tags as a way to spam search engines as it can cause unexpected negative results.

<img src="images/yourimage.gif" border="0" alt="Green Widget" />

<img src="images/yourimage.gif" border="0" alt="Add to Cart" />

<img src="images/clearpixel.gif" border="0" alt="" />

E - End tag for element "P" which is not open or end tag for element "form" which is not open .

S - All p and form tags require both an opening and closing.

<p>Content Here</p>

<form method="post" action="search.asp">
<input type="hidden" name="posted" value="1"/>
<input type="text" name="stext" size="16"/><br/>
<input type="submit" name="search"/>
</form>

E - End tag for element "font" which is not open

S- All font, tags require both an opening and closing.

<p><font color="#FF0000">Content here</font></p>
<p><font color="#FF0000"><font size="2">Content here</font></font></p>

Best solution is to create a class for fonts in the style sheet and assign the class to the paragraph.

E - End tag for "img" omitted, but OMITTAG NO was specified

S - Should be self closing like

<img src="images/YourImage.gif" alt="Shopping cart" />

Version 5.6.0 saw a lot of changes to move the code to XHTML 1.0 Transitional and Section 508 (accessibility) compliance. To take advantage if this new feature you will need to add the following to vsadmin/includes.php or vsadmin/includes.asp

PHP - $nomarkup=TRUE;
https://www.ecommercetemplates.com/phphelp/ecommplus/parameters.asp#accessibility
ASP - nomarkup=TRUE
https://www.ecommercetemplates.com/help/ecommplus/parameters.asp#accessibility

Remember when adding new content to re-validate.

Happy Validating

Winners never quit, quitters never win
User Manual for Ecommerce Templates
  « Topic     
 Topic Locked
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000