Results 1 to 2 of 2

Thread: attrributes and nesting problems

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2011
    Location
    wv
    Posts
    21

    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">&nbsp;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.

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    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
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width