Web Development HTML Beginner
Q How should custom data be stored on an HTML element for use by JavaScript?
  • A With data-* attributes, such as data-station-id="42", read through element.dataset.stationId
  • B In the class name only
  • C With any made-up attribute, such as station="42"
  • D Inside HTML comments
Leave a Comment