Validation errors!

intertec

New Member
Messages
946
Reaction score
0
Points
0
hey. I recently made my portfolio and started wit 223 errors. Now I have cut it down to only 7 errors. Can someone help me!


The errors are:

Line 14, Column 35: there is no attribute "leftmargin".<body bgcolor="#FFFFFF" leftmargin='2' topmargin='2' marginwidth='2' marginheigh

Line 14, Column 49:
there is no attribute "topmargin".…r="#FFFFFF" leftmargin='2' topmargin='2' marginwidth='2' marginheight='2' cla

Line 14, Column 65:
there is no attribute "marginwidth".…="#FFFFFF" leftmargin='2' topmargin='2' marginwidth='2' marginheight='2' class="splash">


Line 14, Column 82:
there is no attribute "marginheight".…gin='2' marginwidth='2' marginheight='2' class="splash">

Line 16, Column 26:
there is no attribute "height".<table width="801" height="601" border="0" cellpadding="0" cellspacing="0" id="T

Line 20, Column 29:
there is no attribute "background". <td colspan="4" background='images/splash-page_02.jpg'>&nbsp;</td>

Line 41, Column 111:
required attribute "alt" not specified.…7" height="139" class="link_border" /></a></td>
 

TheMan177

New Member
Messages
179
Reaction score
0
Points
0
I don't think any of these are valid attributes at all, you should look into styling with CSS instead of what you're doing there.

Line 41, Column 111:
required attribute "alt" not specified.…7" height="139" class="link_border" /></a></td>

The "alt" attribute is used as an alternative piece of text that is shown when the primary element can't be, such as being viewed from a text based browser. So, say, if you had an image of a dog, you could use alt="dog", if it's an element with a link, you could use the url. If it doesn't really provide any information at all, I think its okay to use alt="".
 

marshian

New Member
Messages
526
Reaction score
9
Points
0
All the margin-attributes you used for the <body>-tag are invalid. They just don't exist in your standard. The solution to this is using CSS:
Code:
style="margin: 2px;"
or
Code:
body {
  margin: 2px;
}
or something like that.

<table>-elements are disencouraged (since many browsers render them different), but again height is not considerred to be valid, so use the css element height.
<td>-elements have no element background (again css), but remember you should have a height and a width set if you want to render a background properly.

Last error is (as TheMan177 already said), all <img>-tags must have at least 2 attributes: src and alt. alt is the text you see when an image is loading (in some browsers), when you hover the image, that text could appear too (in some browsers) and (of course) for text browsers, which don't even show images, only their alt texts.

I hope this made it any clearer,
Marshian
 

mattura

Member
Messages
570
Reaction score
2
Points
18
style="margin:2px 0 0 2px"
(4 numbers for: top, right, bottom, left margins)

or

style="margin-top:2px; margin-left:2px;"
Edit:
PS @ Marshian:
table elements are not discouraged where tables are sensible. Only too often people use tables when div is a better choice.
To have consistent rendering, use the CSS "margin:0 auto;padding:0 auto;" where you want no margin.
 
Last edited:

phpasks

New Member
Messages
145
Reaction score
0
Points
0
HTML:
<htnl>
<head>
<Style>
body {font-family: Verdana, Arial, Helvetica, sans-serif; margin-top:5px; margin-left:5px; margin-right:5px font-size: 11px; color: #5A5A5A; background: #ffffff; margin: 0px; padding: 0px}
</style>
</head>
<body>
</body>
</html>

You can use this way now dircetly into body
 
Top