W3c Validation confusion

i am validating this page http://www.ln-backups.co.uk/partsexport/about-us.php and these errors come up;

Line 162, Column 15: there is no attribute “width”
<iframe width=“230” height=“230” frameborder=“0” scrolling=“no” marginheight="0…

Line 162, Column 28: there is no attribute “height”
<iframe width=“230” height=“230” frameborder=“0” scrolling=“no” marginheight="0…

Line 162, Column 46: there is no attribute “frameborder”
… width=“230” height=“230” frameborder=“0” scrolling=“no” marginheight=“0” marg…

Line 162, Column 60: there is no attribute “scrolling”
…eight=“230” frameborder=“0” scrolling=“no” marginheight=“0” marginwidth=“0” sr…

Line 162, Column 78: there is no attribute “marginheight”
…order=“0” scrolling=“no” marginheight=“0” marginwidth=“0” src="http://maps.goo

Line 162, Column 94: there is no attribute “marginwidth”
…ing=“no” marginheight=“0” marginwidth=“0” src="http://maps.google.co.uk/maps?f…

Line 162, Column 102: there is no attribute “src”
… marginheight=“0” marginwidth=“0” src="http://maps.google.co.uk/maps?f=q&amp;s…

Line 162, Column 418: element “iframe” undefined
…amp;z=14&iwloc=A&output=embed"></iframe><br /><small><a href="http://m

what are these and how can i solve them? thanks (:

<iframe> is not allowed in a Strict doctype (because it is not recommended for use), and the various attributes you’ve used are likewise not part of the spec. If you change the doctype to Transitional then it will validate just fine.

how do i change the doctype? this is the code

<?php
	$yearsInBusiness  = date("Y") - 1984;
	$docTitle = "International Supplier of Construction and Agricultural Parts | About Us | Parts Export Ltd";
	$docDescription = "Parts Export Ltd supplying plant machinery and parts across the globe for " . $yearsInBusiness . " years.";
	$docKeywords = "parts export,tractor parts,tractors,agricultural equipment,massey,excavators,construction machinery,john deere,aveling,barford,parkers,plant machinery,jcb,parts for jcb,parts leyland";
	include('includes.php');
?>

<!-- Start Content -->
<div class="content" >
	<!-- Start Main -->
	<div class="main" >
	
	<!-- Start Mast -->
	<div id="mast" >
			<h1>About Us</h1>
			<h2>Our <strong>width of vision</strong> and <strong>depth of experience</strong> shortened to a page.</h2>
	</div>
	<!-- End Mast -->
	
	<!-- Start Meta -->
		<div id="meta" class="boxes" >
		
			<!-- Start Profile -->
			<div id="profile" class="box-left" >
				<h2>About the company</h2>
				<img src="images/about.jpg" alt="" class="img-align-left"/>
<p>Parts Export Ltd is an independent company with no affiliations.  We have been operating for over <?=$yearsInBusiness;?> years with a strong and loyal Customer base.</p>
<p>Our trading success is built on over 50 years of experience in the supply and  export of construction and mining parts and equipment.  We are committed to the highest levels of Customer Service and take pride in giving a fast and efficient response to all enquiries and carrying out all aspects in-house thereby providing additional cost savings:-</p><br />
<ul class="listitem">
<li>Sourcing the highest quality products both <strong>genuine</strong> and <strong>high quality aftermarket</strong></li>
<li>Submitting competitive offer promptly</li>
<li>Procurement of orders</li>
<li>Packing/Bookings for shipment via Air, Sea or Courier</li>
<li>Delivery to Airports/Docks</li>
<li>Preparation of all documentation</li>
</ul>
					<!--	
				<h2>Location</h2>
				<img src="images/sample-thumb-2.jpg" alt="" class="img-align-right"/>
				<p>Vestibulum vehicula purus nec dui accumsan fermentum. usly restore distributed niche markets with bricks-and-clicks action items. Phosfluorescently incentivize collaborative total linkage without goal-oriented results. sticky leadership after collaborative niche markets. Compellingly pursue world-class users vis-a-vis accurate internal or &#8220;organic&#8221; sources.ue eu neque suscipit consequat quis vel risus.  leadership after collaborative niche markets. Compellingly pursue world-class users vis-a-vis accurat</p>
				<p>Morbi euismod porta luctus. Nam in iaculis dui. Sed diam tellus, lacinia id fermentum ac, tempus ut justo. Phasellus feugiat auctor enim, eget commodo ante lacinia pretium. Proin faucibus tincidunt velit, non pretium quam porttitor id. Phasellus orci lectus, mollis non pharetra eu, eleifend et tortor. Donec non nisl mi, eget lacinia tortor. Donec venenatis tellus sit amet lorem mollis tincidunt ut sollicitudin urna.</p>
				
			      <blockquote cite="#linktoquote">
                <p>This is a blockquote. Vivamus et erat vel purus ornare hendrerit. In a sem. Vestibulum velit orci, commodo vehicula, vestibulum et, accumsan eget, orci. Maecenas eleifend volutpat leo. Mauris leo libero, porttitor sit amet, vestibulum at, ultrices a, nibh. Sed eu tortor. Duis iaculis urna a ante venenatis porttitor. Mauris euismod. Fusce nec nisi ut lacus faucibus convallis.</p>
                </blockquote><br/>

                <h1>Heading h1</h1>
                <h2>Heading h2</h2>
                <h3>Heading h3</h3>
                <h4>Heading h4</h4>
                <h5>Heading h5</h5><br/>

                <strong>List items </strong>

                <ul class="listitem">
                    <li>Donec eu lorem quis dui lacinia tincidunt</li>
                    <li>Etiam accumsan arcu placerat leo</li>
                    <li>Integer lacinia, eros quis mattis eleifend, tortor metus laoreet libero</li>
                    <li>Donec eu lorem quis dui lacinia tincidunt</li>
                    <li>Vivamus quis libero et neque iaculis congue.</li>
                </ul>			

			-->
			
			</div>
			<!-- End Profile -->
			
			<?php include('includes/sidebar.php'); ?>

			<div class="clear"> </div>		
		</div>
		<!-- End Meta -->
		</div>
		<!-- End Main -->
<?php include('includes/footer.php'); ?>

[font=verdana]At the very top of the file, before the <head>, before even the <html>, there should be a line that has the doctype. Change this to

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

and the job’s done.[/font]

Changing the doctype is pointless, really, but if you are going to change it, consider the most up to date one:

<!DOCTYPE html>

Changing the doctype doesn’t change your code. The validator is not the be all and end all. It’s just a way of checking if there are any serious problems on the page. <iframe>s are supported by all browsers, so it doesn’t matter if the particular doctype you are using doesn’t support them.

i need to validate it because i work for a web design company, and if we do not competition could use this against us to draw our customers away and claim we are not doing ‘a proper and thorough job’ my boss asked me to so i kinda have to…thankyou though everyone :slight_smile: xo

I would disagree with that. If your page contains features that are valid in Transitional but not in Strict then it makes no sense to have a Strict doctype. Although <iframe> itself will validate in HTML5, a lot of the attributes that lisamariexo has used (eg marginheight and frameborder) won’t. Why does this matter? As you say, it won’t make a dime of difference to the way browsers render the page. But where else is the doctype used? In the W3C validator. What you don’t want on the validator are false positives – reported errors that aren’t actually errors – because it makes it harder to see when you’ve got real errors. So choosing a doctype that throws up errors when you could just as easily use one that doesn’t is a bit perverse, and means that you’re potentially creating more trouble for yourself if you ever have to debug the page and fix real errors.

Many sites don’t validate—even those of the big wigs. Especially if they are using code from things like Google Maps, Facebook and the like. Anyone who uses this against you is a charlatan.

do you have any idea about these for my contact page?
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.ln-backups.co.uk%2Fpartsexport%2Fcontact.php

Thread closed to avoid confusion, as above question has been asked again in a new thread.