Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can i invent new Html element attributes without getting an error while validating?

    I want to know if it is possible to invent new html atrributes so that i can access it via javascript and avoid getting a validation error in the process.

    The only other alternative that i can think of (kind of a noob, can't really think of much) is to store the elements i want to affect as a javascript object and add properties to it there but i'm not very good with working with objects.

    If it is possible to invent object properties without getting a validation error then my problem is solved. I just need to know if it is possible.

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,932
    Thanks
    6
    Thanked 1,041 Times in 1,014 Posts
    In HTML 5 you can use data attributes.


  •  

    Tags for this Thread

    Posting Permissions

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