About 368,000 results
Open links in new tab
  1. What is the difference between HTML tags and elements?

    Jan 20, 2012 · 30 HTML tags vs. elements vs. attributes HTML elements An element in HTML represents some kind of structure or semantics and generally consists of a start tag, content, and an …

  2. What is the difference between properties and attributes in HTML?

    When writing HTML source code, you can define attributes on your HTML elements. Then, once the browser parses your code, a corresponding DOM node will be created. This node is an object, and …

  3. How to iterate through all attributes in an HTML element?

    I need the JavaScript code to iterate through the filled attributes in an HTML element. This Element.attributes ref says I can access it via index, but does not specify whether it is well support...

  4. Get all Attributes from a HTML element with Javascript/jQuery

    Jan 12, 2010 · Element.attributes returns a NamedNodeMap object containing the assigned attributes of the corresponding HTML element. [].map() creates a new array with the results of calling a provided …

  5. html - How can I get the values of data attributes in JavaScript code ...

    Learn how to retrieve values of data attributes in JavaScript using various techniques and examples. Enhance your coding skills with this informative guide.

  6. html - Get list of data-* attributes using javascript / jQuery - Stack ...

    176 Given an arbitrary HTML element with zero or more data-* attributes, how can one retrieve a list of key-value pairs for the data. E.g. given this:

  7. Regular expression for extracting tag attributes - Stack Overflow

    This expression foresees unquoted / quoted, single / double quotes, escaped quotes inside attributes, spaces around equals signs, different number of attributes, check only for attributes inside tags, and …

  8. Difference between id and name attributes in HTML

    Sep 9, 2009 · 401 Use name attributes for form controls (such as <input> and <select>), as that's the identifier used in the POST or GET call that happens on form submission. Use id attributes whenever …

  9. How do I add attributes to existing HTML elements in TypeScript/JSX?

    9 I wanted to use glamor's replacement which adds a css prop to every element. To add to the accepted answer, module augmentation seems to do the trick but HTMLProps only worked for non-input …

  10. How to add/update an attribute to an HTML element using JavaScript?

    Apr 2, 2009 · I'm trying to find a way that will add / update attribute using JavaScript. I know I can do it with setAttribute() function but that doesn't work in IE.