WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] duplicate specification of attribute "class" when validating (6 posts)

  1. Mezloh
    Member
    Posted 4 years ago #

    I am getting this error when trying to validate my site:

    duplicate specification of attribute "class"

    Which of the two would I be safe removing to clear up this validation error. for both the "user_login" and "user_email"?

    Thanks in advance!

    Trav

    ===================================================================

    <form name="registerform" id="registerform" action="http://thebalanceyouneed.com/wp-login.php?action=register" method="post">
    <h1>Not a member yet? Sign Up!</h1>
    <label class="grey" for="user_login">Username</label>
    <input class="field" type="text" name="user_login" id="user_login" class="input" value="" size="20" tabindex="10" />
    <label class="grey" for="user_email">E-mail</label>
    <input class="field" type="text" name="user_email" id="user_email" class="input" value="" size="25" tabindex="20" />
    <label id="reg_passmail">A password will be e-mailed to you.</label>
    <input type="submit" name="wp-submit" id="submit" value="Register" />
    </form>

    ====================================================================

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    <form name="registerform" id="registerform" action="http://thebalanceyouneed.com/wp-login.php?action=register" method="post">
    <h1>Not a member yet? Sign Up!</h1>
    <label class="grey" for="user_login">Username</label>
    <input class="field input" type="text" name="user_login" id="user_login" value="" size="20" tabindex="10" />
    <label class="grey" for="user_email">E-mail</label>
    <input class="field input" type="text" name="user_email" id="user_email" value="" size="25" tabindex="20" />
    <label id="reg_passmail">A password will be e-mailed to you.</label>
    <input type="submit" name="wp-submit" id="submit" value="Register" />
    </form>
  3. Mezloh
    Member
    Posted 4 years ago #

    @esmi

    Much appreciated, that worked beautifully.

    Would you have a minute to look at my page in the w3 validator for a quick sec. thebalanceyouneed[dot]com

    Let me know if you see what the problem is at first glance I can't find a problem causing everything to throw an error. I know it has to be something simple but my eyes and brain are not catching it.

    I have tried to re-save the urls with & in them but wordpress is stripping it back out to just read &.

    The others are throwing me for a loop.

    There is only 20 errors and they are all related to each other

  4. esmi
    Forum Moderator
    Posted 4 years ago #

    I'm seeing a lot of errors on image links that all have the format:

    <a href="http://domain_name/foo/bar"/>

    Notice the / before the closing >? This means that the <a tags are being parsed as self-closing - so an error is triggered when the validator hits to following </a>. How are you adding these image links to posts/pages? By hand or via a plugin or function? You need to get rid of the / in the first part of the link.

  5. Mezloh
    Member
    Posted 4 years ago #

    Totally my fault for that, I was up til 3am one morning adding the links and just because I got in the habit of adding the "/" in my image urls I accidently added the "/" in my url also.

    Thanks for pointing it out.

    I had to laugh at myself for that one.

  6. esmi
    Forum Moderator
    Posted 4 years ago #

    Been There. Done That. Got the T-shirt. :-)

Topic Closed

This topic has been closed to new replies.

About this Topic