help required for XHTML, CSS and some PHP

Hey all again.

Small issue

I tryed validateing but this is an error

<a href="DS Lite White.xhtml"><img src="../images/DS Lite White.jpg" /></a>
That above gives me a nice box with an image and a link...
But w3C gives this error:

Line 48, Column 75: required attribute "alt" not specified

<a href="DS Lite White.xhtml"><img src="../images/DS Lite White.jpg" /></a>

The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.


Anyone got any ideas why this is happening?


Thanks
here is the code for the box:
<div class="item_box">
<a href="DS Lite White.xhtml"><img src="../images/DS Lite White.jpg" /></a>
<br /><a href="DS Lite White.xhtml">Nintendo DS Lite White</a><br />
<small>&pound;65.00</small>
</div>
 
http://www.w3schools.com/html/html_images.asp

The Alt Attribute

The alt attribute is used to define an "alternate text" for an image. The value of the alt attribute is an author-defined text:
Code:
<img src="boat.gif" alt="Big Boat" />
The "alt" attribute tells the reader what he or she is missing on a page if the browser can't load images. The browser will then display the alternate text instead of the image. It is a good practice to include the "alt" attribute for each image on a page, to improve the display and usefulness of your document for people who have text-only browsers.

http://www.w3schools.com/tags/att_img_height.asp

Tip: It is a good practice to specify both the height and width attributes for an image. If these attributes are set, the space required for the image is reserved when the page is loaded. However, without these attributes, the browser does not know the size of the image, and cannot reserve the appropriate space to it. The effect will be that the page layout will change during loading (while the images load).
 
Well an element like an image tag has attributes you can use with it to specify information about that element.

The document type sets the rulebase for the doc according to specifications set by the W3C.

So you have a doc type where the rules state your images needed an alt tag, so you just put one in and that satisfies that rule.
 
hey all.

here is what Validator says:
#

DOCTYPE Override in effect!

The detected DOCTYPE Declaration "<!DOCTYPE html PUBLIC "-//W3C//XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">" has been suppressed and the DOCTYPE for "XHTML 1.0 Strict" inserted instead, but even if no errors are shown below the document will not be Valid until you update it to reflect this new DOCTYPE.
#

Info Using Direct Input mode: UTF-8 character encoding assumed

Unlike the “by URI” and “by File Upload” modes, the “Direct Input” mode of the validator provides validated content in the form of characters pasted or typed in the validator's form field. This will automatically make the data UTF-8, and therefore the validator does not need to determine the character encoding of your document, and will ignore any charset information specified.

If you notice a discrepancy in detected character encoding between the “Direct Input” mode and other validator modes, this is likely to be the reason. It is neither a bug in the validator, nor in your document.


I cant figure it out... my code is:

xml version="1.0" encoding = "UTF-8"?>
<!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>...............................>
 
Well the site is done.. It meets the brief i was given so all i need now is to do a presentation on it

http://www.cwatson.org/hosted/iwantoneofthese/public_html/xhtml/index.html

Thats the link to the site.

Here is wat the brief said:
You will need to:
 Design and develop an on-line e-commerce website
 Design and Structure – main page linked to at least 5 other pages, all of whose appearance is defined in at least one but no more than three external stylesheet.
 Decide on a style/format.
 Construct main web page and other pages (at least 5 pages) using the text and suitable mark up language, incorporating the techniques that you have learnt in your lab sessions e.g. forms, lists, images etc.
 The site must be validated xhtml strict. The css must also be validated.
 The site must be shown to work in at 2 named browsers available in the labs (Internet Explorer, Firefox)

marking:
70%-100%
• The whole design process has been well planned, and logged in your lab record book.
• An excellent piece of work whose content demonstrates a high level of ability to select, create and edit appropriate content including images and text.
• The site is structured in a manner which is entirely consistent with its content. This includes the size of the site and its partitioning into separate pages.
• The appearance and physical layout of the site is an effective aid to the viewer, is resilient to changes in browser window size and different browsers.
• Separate style sheets have been used for appearance and layout.
• The English language and grammar and xhtml syntax clearly demonstrate attention to detail.
• Submitted on time.
• The overall impression is of a carefully crafted piece of work which is well worth viewing and has been published to meet all reasonable needs of the viewer.
 
The fact is i have fullfilled each thing they asked at a higher level aswell...
And the fact you can actually make orders via paypal should gain me better marks... considering paypal's code is like 90% not valid and i had to change it -.-

I started this knowing Very little to knowing a lot!
I would not have got this far if it wasnt for some special people who helped me in hard times
 
I'd give you about 60% for it because you've done the minimum asked.

Where you lose marks:
- not resilient to browser window size changes
- overall impression doesn't wow me
- contact page is ****ed
 
Last edited:
mistake?

It is 100% valid mate lol

Only going on the web link that you gave, on your contact page, the code does validate, but it doesn't do what you want it to, or at least I don't think it does.

See for yourself on your "Contact Us Here" page, Half of your html code has spewed into the last textarea, because of the error I posted. It displays the same in both IE and Firefox.
 
Back
Top Bottom