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 9220609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:23:26+00:00 2026-06-18T03:23:26+00:00

I would like to insert a special element inside of a container div to

  • 0

I would like to insert a special element inside of a container div to store some information about an image that is located inside of the container. I know I can store the data in the container div data attributes itself or the image but I find it easier and cleaner when coming back later to projects to put them in their own DOM element. The data attributes are mainly for UI user actions like updating an element with jquery when a thumbnail is dragged into a droppable handle.

EXAMPLE:

<div class="container">
   <img class="thumbnail" src="/path/to/thumbnail" />
   <div data-imagefull="path/to/fullsize/image" data-imageid="179"></div>
</div>

In that example I would like to replace the div containing the data attr. with a different tag that is compliant with ie7 through to html5.

UPDATE :
Let me rephrase a bit. I like, and will continue to use the data attributes. I’ts the “div” tag alone that I would like to replace. There has to be a better tag than div since div is meant to display and I am not displaying anything. Just storing information.

  • 1 1 Answer
  • 0 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. Editorial Team
    Editorial Team
    2026-06-18T03:23:27+00:00Added an answer on June 18, 2026 at 3:23 am

    You can use hidden attribute on your div tag:

    <div class="container">
       <img class="thumbnail" src="/path/to/thumbnail" />
       <div data-imagefull="path/to/fullsize/image" data-imageid="179" hidden></div>
    </div>
    

    As stated in spec:

    User agents should not render elements that have the hidden attribute specified.

    hidden attribute is HTML5’s feature,so for supporting older browsers, you need this CSS also:

    *[hidden] {
       display:none;
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a part of my website I would like to insert some images and
I have a JPA project and I would like to insert some initial data
I have a Datatable in my C# program that I would like to INSERT
I would like to implement a functionality that insert a word-breaking TAG if a
I have a QGraphicsScene on which I would like to draw some special curves.
I would like to insert some value into a table, which has an auto-incrementing
I would like to insert in a table some pieces of code. For example:
I would like to insert the current Subversion revision number (as reported by svnversion
I would like to insert dates in an emacs buffer like I do in
I would like to insert notes on the fixes to be done in specific

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.