SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,530
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Should Buttons have an ALT?

    Should I have an alt attribute in this button code...

    HTML Code:
    		<!-- Submit Form -->
    		<input type="submit" name="logIn" class="button" value="Log In" />

    Debbie

  2. #2
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Unless you using an image input, i.e. (type="image"), and you aren't you have chosen (type="submit") hence there is NO need the for the alt attribute.

  3. #3
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,530
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by xhtmlcoder View Post
    Unless you using an image input, i.e. (type="image"), and you aren't you have chosen (type="submit") hence there is NO need the for the alt attribute.
    I am using a background image, though.

    But I guess even if my background image fails, the user would still see "Submit", right?


    Debbie

  4. #4
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    151 Post(s)
    Tagged
    3 Thread(s)
    Yup
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  5. #5
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,598
    Mentioned
    411 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    the user would still see "Submit", right?
    Or rather, "Log In".

  6. #6
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,530
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Or rather, "Log In".
    Oh, okay, thanks for the clarification.


    Debbie

  7. #7
    SitePoint Member
    Join Date
    Jul 2012
    Location
    Leicester
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I never do this and although I dont think it will do any harm I dont think it will do anything good either.

  8. #8
    SitePoint Zealot
    Join Date
    Apr 2003
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Adding in code that's not part of the HTML specification could do you some harm because it's not going to validate. Also, there's just no sense is bloating your code with things you don't need. Better site speed = better seo.


Bookmarks

Posting Permissions

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