Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 110479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:14:00+00:00 2026-05-11T02:14:00+00:00

Am I allowed to add whatever attributes I want to HTML tags such that

  • 0

Am I allowed to add whatever attributes I want to HTML tags such that I can retrieve their value later on using javascript? For example:

<a href='something.html' hastooltip='yes' tipcolour='yellow'>...</a> 

If that’s not going to work, how would you store arbitrary pieces of information like this?

Edit: Since it appears that making up HTML attributes isn’t technically valid, I’ve rephrased the second part of this question into its own question here: How to store arbitrary data for some HTML tags

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T02:14:01+00:00Added an answer on May 11, 2026 at 2:14 am

    In HTML5, yes. You just have to prefix them with data-. See the spec.

    Of course, this implies you should be using the HTML5 doctype (<!doctype html>), even though browsers don’t care.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently I'm allowed users to add application/x-shockwave-flash objects to their profiles in my website.
For declaration perspective the following is allowed IList<string> list= new string[3]; list.Add(Apple); list.Add(Manago); list.Add(Grapes);
I alloc my NSMutableArray , and add objects that were alloced as well. Will
I have problems sending using a Dll procedure with parameters, im not allowed to
I followed the instructions in Railscasts #197 http://railscasts.com/episodes/197-nested-model-form-part-2 about how to add links that
So im building a table in which the client is allowed to add more
I need to add some functionality where the user is allowed to pick ranges
Users are allowed to add explicit specializations to the std namespace. However, there are
A long time ago, I saw something that allowed you to chain a series
Is a C compiler allowed to add functions to standard headers and still conform

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.