Jump to content

W3C validation


crmamx

Recommended Posts

I am trying to fix the errors generated via W3C validation. But most of them are generated by the code that I use for playing videos which I imported. I have no idea what they are. Nor have I seen a site which explains all the variables in video coding.

 

Since the videos work fine and I don't get any errors, need I concern myself with them?

Link to comment
Share on other sites

As far as warnings it depends a bit, You could get a warning for instance if you use wicked new css3, but that can be ignored if you did that on purpose. As far as errors you should be able to remove them. Lets do a few of them the rest look pretty the same:

 

So you go to :http://validator.w3.org/ and insert the domain you want to validate. In your case: http://bayarearcsociety.com

 

Some errors (44) pop up:

 

Line 21, Column 82: document type does not allow element "style" here

action: put you styles in a external stylesheet or change to a less strict doctype, but i would not do that ( you have <style type="text/css"> </style> inside the body)

 

Line 29, Column 10: ID "left-header" already defined

indication:An "id" is a unique identifier.

action: rename the id, or make it a class, since you use it more often (read my article?  ;D )

 

Line 130, Column 63: there is no attribute "language"

action: replace language with: type="text/javascript"

 

Line 130, Column 75: required attribute "type" not specified

action: replace language with: type="text/javascript"

 

Line 131, Column 98: required attribute "type" not specified

action: replace language with: type="text/javascript"

 

Line 144, Column 46: general entity "logo" not defined and no default entity

action: a variable is missing a value, I have no idea what it's default value is out of my head.

 

Line 144, Column 50: reference to entity "logo" for which no system identifier could be generated

indication: This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.

action: maybe replace the & with %26; not sure though havent tested it. I used this for it:

<?php $var = '&';
          $var = urlencode($var);
          echo $var; // outputs: %26
    ?>

 

Now if you read those errors they often give a short description of the error and after that it tells what might be the cause.

 

As far as warnings/errors in your case ( a non commercial small society for model planes ), if you have time left remove them, but don't panic about it.  ;D

 

Good luck!

Link to comment
Share on other sites

Well a bit of a problem is you are loading pages (and menu) dynamically and the validator ofc course only sees 1 thing and that is shown in your browser  (while your pages/menu get included serverside)

 

So Say we have a page(not a menu but a page) named monkeys,  this page is in your folder named content/pages/monkeys.php.

Thing is your pages do not have the <head> stuff in them. They only got the stuff  that is included in div#maincontent.

So what you could do is go to your homepage and right-click view-source and copy paste that whole page in to your favorite editor that shows line numbers. (because that is the line count the validator uses)

after you pasted it, skim through it until you find the opening tag for <div id="maincontent"> (or simple press ctrl+f and type main content) Since everything after that is being included. So that is the number you need to keep in mind. Because you need to substract that from the number given by the validator, since the page you include probably starts at around line 1.

 

In your case due to loads and loads of <style type="text/css"> tags (get them out there!)  in your code for both your menu and your content. <div id="maincontent"> starts at line: 323 and after that your page is included

 

So if the validator tells Line 400, in this case you know it's your page it's talking about since the number is higher than 323, so all you do is

400-323= 77, Assuming the content that gets included starts at line 1 (might very well be 2 or 3 but i don't know) you just go to line 77 of that file end edit it.

 

Again this would have been much less of a search if you did not add the style tags directly inside your html, but just in the external style-sheet. (and i am afraid you did this on pretty much all pages you have) So for anyone else that reads this. Put styles in an external style sheet at all times, don't mess with styletags or inline style, not even for practice or testing bad habits are expensive time wise.

 

Hope this helps

 

Cssfreakie

 

 

See here your code below, scroll down, that is line 323 where <div id="maincontent"> starts

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" >
<head>
<meta name="google-site-verification" content="y_kspZkCZOQM-WGNB_lQ8BhJS8p7-B66hkHI_UhzKbs" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-language" content="en" />
<meta name="keywords"
content="radio control, radio control models, model airplanes, model planes, RC airfields, model flying,
flying models,RC airplane clubs, RC clubs,RC flying fields" />
<meta name="description"
content="Index page for Bay Area Remote Control Society, Summerdale Alabama. Radio Control Model Airplanes." />
<link type="text/css" rel="stylesheet" href="css/reset.css"  />
<link type="text/css" rel="stylesheet" href="css/960.css"  />
<link type="text/css" rel="stylesheet" href="css/custom.css"  />
        <title>Bay Area Remote Control Society</title>
</head>
    <body>

        <div id="wrapper" class="container_12">
            <div id="header" class="grid_12">
                <div id="left-header" class="grid_5 alpha"><style type="text/css">
#left-header {
    background: url("../Pictures_Other/b3.png") no-repeat;
    height: 150px; 
    margin-top: 5px; 
}
</style>

<div id="left-header">
</div>

<!-- <img class="concorde" src="Pictures_Other/concorde.jpg" alt="new picture" border="0"
     height="155" width: "220px";" /> -->



</div>
                <div id="newsflash" class="grid_7 omega"><div class="content">

<h2>breaking news:</h2>
<p><strong>The runway has been repaired again and is ready for flying. Hopefully it will hold up to any future storms.</strong></p>
<p><strong> AMA sanctioned Sailplane Festival at Magnolia Field June 11. You have time to get ready to
participate. See Upcoming Events. Everyone invited.</strong></p>
</div></div>
            </div>
            <div id="leftmenu" class="grid_3">
<style type="text/css">
/* ======================== start supermenu ============================
  Color Combos:
    #012A80 - dark blue
    #81A9FE - medium blue
    #C0D4FE - light blue
======================================================================== */
body {
    behavior: url(csshover.htc);
}
div#supermenu a {
    color: #000; /* #000 the look of the links */
    text-decoration: none;
    margin: 5px;
}

div#supermenu ul {
    list-style: none; /* Remove the bullets */
    margin: 0;
    padding: 0;
    width:200px; /* Menu width */
}

div#supermenu ul li {
    display: block; /* Make a menu item a block (height 100%, width 100%) */
    font: bold 11px/16px arial, helvetica, sans-serif;
    height:100%;
    width:100%;
    background:#81A9FE; /* medium blue*/
    border-bottom:1px solid #fff; /* blue */
    position: relative;
    float:left; /* Make sure (in IE) there is no margin between the menu items */
}

div#supermenu ul li ul li{
    background:#C0D4FE; <!-- tan sub menu -->
    background:#fff;
}

div#supermenu ul li a{
    display:block;
    padding: 2px 3px;
}

div#supermenu ul li a:hover {
    color: #a00;
    background: #81A9FE; <!-- pink main menu during hover -->
    border-right:1px solid #fff;
    border-left:1px solid #fff;
}

div#supermenu ul li ul li a:hover{
    background: #E0EAFE; <!-- light tan sub menu during hover -->
    border-left:1px solid #fff;
}

div#supermenu ul ul {
    position: absolute;
    top: 0;
    display:none; /* Display nothing when not 'hovered' */
}

div#supermenu ul li:hover ul{
    display: block;  /* Make sure the submenu is displayed as blocks as well. */
    left:200px; /* Your menu width. The submenu appears there, when you hover a menu item. */ }
}
#div-1 {
    left: 2px;
    position: fixed;
    top: 28px;
}
#boxm {
background-color: #c0d4fe;
width: 140px;
height: 90px;
padding: 5px;
margin-bottom: 5px;
margin-left: 36px;
font-size: 13px;
float: left;
}
/*--- end supermenu  ----*/
</style>

<script src="http://24timezones.com/js/swfobject.js" language="javascript"></script>

<script src="http://24timezones.com/timescript/maindata.js.php?city=287777" language="javascript"></script>
<div id="boxm">
<table>
  <tbody>
    <tr>
      <td>      
      <div id="flash_container_tt4d168d7adee99">
      </div>
      <script type="text/javascript">
var flashMap = new SWFObject("http://24timezones.com/timescript/clock_digit_12.swf", "main", "140", "70", "7.0.22", "#FFFFFF", true)
flashMap.addParam("movie", "http://24timezones.com/timescript/clock_digit_12.swf");
flashMap.addParam("quality", "high");
flashMap.addParam("wmode", "transparent");
flashMap.addParam("flashvars", "color=0000FF&logo=1&city=287777");
flashMap.write("flash_container_tt4d168d7adee99");
      </script>
      </td>

    </tr>
    <tr>
      <td style="text-align: center; font-weight: bold;"><a href="http://24timezones.com/world_directory/mobile_local_time.php" target="_blank" title="time in Mobile" style="text-decoration: none;">Magnolia Field</a></td>
    </tr>  
  </tbody>
</table>
</div>


<div class="content">
</div>
<div id="supermenu">

<ul><!-- start ul 1 -->
    <li><a href="index.php?page=home">Home</a></li>
    <!-- ===================== Dropdown item #  =========================== -->
    <li>
        <a href="#">About us</a>
        <ul>
            <li>
                <a href="index.php?page=club_info">Club info</a>

            </li>
            <li>
                <a href="index.php?page=club_members">Club members</a>
            </li>
            <li>
                <a href="index.php?page=airplane_gallery1">Our airplanes</a>
            </li>
            <li>

                <a href="index.php?page=directions">Directions to field</a>
            </li>
            <li>
                <a href="index.php?page=calendar">Upcoming events</a>
            </li>
            <li>
                <a href="index.php?page=nolf">NOLF's</a>

            </li>
            <li>
                <a href="index.php?page=password_member">Member's area</a>
                
            </li>
        </ul>
    </li>
<!-- ===================== End Dropdown item #  =========================== -->
    <li><a href="index.php?page=weather">Weather</a></li>

    <li><a href="index.php?page=links">Links</a></li>
    
<!-- ===================== Dropdown item #2 =========================== -->
    <li>
        <a href="#">RC related</a>
        <ul>
            <li>
                <a href="index.php?page=how_to_articles">How to articles</a>

            </li>
            <li>
                <a href="index.php?page=learn_to_fly">Learn to fly</a>
            </li>
            <li>
                <a href="index.php?page=rookie_tips">Rookie tips</a>
            </li>
            <li>

                <a href="index.php?page=sailplanes">Sailplanes</a>
            </li>
            <li>
                <a href="index.php?page=covering_schemes">Covering schemes</a>
            </li>
        </ul>
    </li>
    <!-- ===================== Dropdown item #3 =========================== -->

    <li>
        <a href="#">Videos</a>
        <ul>
            <li>
                <a href="index.php?page=video_amazing3d">Amazing 3D</a>
            </li>
            <li>
                <a href="index.php?page=video_amazing3d1">Another 3D</a>

            </li>
            <li>
                <a href="index.php?page=video_crashes">Funny crashes</a>
            </li>
            <li>
                <a href="index.php?page=video_b36">B 36</a>
            </li>
            <li>

                <a href="index.php?page=video_b52">B 52</a>
            </li>
            <li>
                <a href="index.php?page=video_f86">F 86</a>
            </li>
            <li>
                <a href="index.php?page=video_largest_model">World's largest model</a>

            </li>
            <li>
                <a href="index.php?page=video_shuttle_accident">Shuttle accident</a>
            </li>
            <li>
                <a href="index.php?page=video_smoker">Smoker</a>
            </li>
            <li>

                <a href="index.php?page=video_turbine_helicopter">Turbine helicopter</a>
            </li>
        </ul>
    </li>
<!-- ===================== Dropdown item #4 =========================== -->
    <li>
        <a href="#">Slideshows</a>        
        <ul>
            <li>            
                <a href="index.php?page=slideshow_shed">Shed construction</a>

            </li>
            <li>
                <a href="index.php?page=slideshow_runway1">Runway construction</a>
            </li>
            <li>                
                <a href="index.php?page=slideshow_fabric">Laying the fabric</a>
            </li>
            <li>                
                <a href="index.php?page=slideshow_fabric2">Re-laying the fabric</a>

            </li>
            <li>                
                <a href="index.php?page=slideshow_flyin1">Funfly 1</a>
            </li>
        </ul>
    </li>

</ul><!-- end ul 1 -->
<!-- ===================== Dropdown item #5 =========================== -->
<ul><!-- start ul 2 -->
    <li>

        <a href="#">Miscellaneous</a>
        <ul>
            <li>
                <a href="index.php?page=modeler">Are you a modeler</a>
            </li>
            <li>
                <a href="index.php?page=trivia">Trivia</a>

            </li>
            <li>
                <a href="index.php?page=funny_stuff">Funny stuff</a>
            </li>
            <li>
                <a href="index.php?page=conversion_tables">Conversion tables</a>
            </li>
            <li>

                <a href="index.php?page=parapro">Paraprosdokian</a>
            </li>
            <li>
                <a href="index.php?page=games">Games</a>
            </li>
        </ul>
</ul> <!-- end ul 2 -->
</div>

</div>
            <div id="maincontent" class="grid_9"><div class="content"><!-- HERE is your page included  that could have been line 60 or so  -->

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.