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.
More Related Contents:
- Dynamic page load can’t load Java with page
- Why I have to put all the script to index.html in jquery mobile
- Replacing css file on the fly (and apply the new style to the page)
- THREE.js Ray Intersect fails by adding div
- How to include multiple js files using jQuery $.getScript() method
- Prevent Page Load on Jquery Form Submit with None Display Button
- Performance of MutationObserver to detect nodes in entire DOM
- Benefits of loading JS at the bottom as opposed to the top of the document
- HTML5 Audio Looping
- jquery submit form and then show results in an existing div
- Programmatically play video with sound on Safari and Mobile Chrome
- time delayed redirect?
- open url in new tab or reuse existing one whenever possible
- HTML – how can I show tooltip ONLY when ellipsis is activated
- HTML Table with vertical rows
- ES6 module Import giving “Uncaught SyntaxError: Unexpected identifier”
- Getting selected text position
- Is it the last `script` element the currently running script?
- getElementByClass().setAttribute doesn’t work
- Number with leading zeroes gets changed in JavaScript
- how to make getUserMedia() work on all browsers
- Change Button color onClick
- What are the possible ways to hide an element via CSS [closed]
- search data from html input in mysql
- How to store objects in HTML5 localStorage/sessionStorage
- Waiting for dynamically loaded script
- Styling Vuetify selectors
- How to get CSS class property in Javascript?
- How to parse html to React component?
- HTML5 File api, reading in an xml/text file and displaying it on the page?