attrributes and nesting problems
i am designing my website with visual studio 2010. the issue i'm having occurs when i publish the website and am getting validation errors. one error says "this attribute name must be followed by an "=" sign. if the value has quotation marks, they must match. the line of code mentioned is as follows:
<p align="center">
<img style height="596px" width="500px" alt="photo of lisa, a technician" src="http://kitswv.com/lisa.jpg" /></p>
the error is in the 2d line, but i thought it was correct. i needed to put the top line in to get the picture centered, and the 2d line is displaying the image on the internet. according to the error message, there should be an = sign after the <img but when i put it in, another error pops up.
the other error that i am getting is element 'h1' cannot be nested within element 'html' the line of code here is as follows:
<h1 align="center"> Kanawha IT Services</h1>
near the top of the page is an <html> and at the bottom is an </html> i think that's what is throwing the error, but when i put the </html> before the <h1> line, it throws a bunch of errors saying the attributes (<h1> <p> etc) need to be within a parent element.
the problem i am having with this is mainly that it works just fine on the web, but i have heard that it is important to have my code validated. should i worry about this or just say if it ain't broke, don't fix it? you can visit the site live at kitswv.com and see the (mostly) working pages live. i'm still working on the contact form trying to get a vb script to send an email to me, but i'll get that eventually. thanx for any help.
Re: attrributes and nesting problems
The first error is this one
<img style height="596px" width="500px"
you want to assign height and width as the value of the style attribute:
<img style="height:569px; width:500px" ... that's the correct format for the style tag.
regarding the h1 "error" ... usually you have the html tag, followed by meta data, followed by style data, then the body... that sounds like what you're missing...
<html>
<head>...</head>
<body>...<h1>Headline</h1>
...
</body>
</html>
-tg