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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:15:32+00:00 2026-05-22T01:15:32+00:00

I have a small set of structured data items that I would like embedded

  • 0

I have a small set of structured data items that I would like embedded in an HTML document. The data is used by some JavaScript for interacting with the page, but is otherwise hidden.

I have considered using HTML5 data attributes, but I am unsure which element is most suitable for affixing stray data. I thought of using div elements, like so:

<div data-make="Ford"  data-model="Fusion"  data-year="2005"></div>
<div data-make="Chevy" data-model="Volt"    data-year="2010"></div>
<div data-make="Honda" data-model="Insight" data-year="2010"></div>

This is a kludge, since the content model of the div element is flow content, which recommends at least one descendent. I also considered using an unordered list, but this is also a kludge for the same reason, since the content model of the li element is also flow content.

I have searched for best practices regarding HTML5 data attributes, but since these attributes are relatively new and not yet in common use, little information is available.

Any other recommendations for a placeholder element to which to affix stray data attributes? Or am I going about this all wrong? Using something like JSON seems heavy handed for my needs…

  • 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-05-22T01:15:33+00:00Added an answer on May 22, 2026 at 1:15 am

    i believe you tend to interpret the html5 spec too strictly. quoted from fc:

    This requirement is not a hard requirement

    so you might cling to attributing div elements. if you add a unique class css-attributed with 'display:none' to your dummy elements, they will not be rendered thus making the intricacies of flow content kind of moot.
    if you feel more comfortable with phrasing content (pc), use empty span elements instead.

    alternatively, the meta-tag might be an option:

    <meta itemprop="data" content="dummy" data="..."/>
    

    note that meta-tags are allowed in the body of a html5 doc (meta). while the itemprop attribute (ip) is necessary for the use as a generic data container, according to the specs, a content attribute ist not strictly necessary – however, you could always resort to some dummy string.

    hope this helps,

    best regards, carsten

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

Sidebar

Related Questions

I have a small (500kb) swing applet that displays very simple/limited set of small
I have a small JS function that does Ajax for me and another like
I have a small ajax application built with php. Using phpMyAdmin I have set
I have a small utility that I use to download an MP3 file from
I have a small VB.NET application that I'm working on using the full version
I have a small question, when we set the memory_limit for PHP I understand
I have a small bash script that greps/awk paragraph by using a keyword. But
I have a small application which is much like a clock. It has been
I have a script that appends some rows to a table. One of the
I have some large data sets (numeric and textual) and as I'm studying and

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.