3

Although the Google Chrome developer tools show the properties of a selected element, it doesn't list the attributes.

Am I missing something?

Randomblue
  • 112,777
  • 145
  • 353
  • 547

3 Answers3

4

Under properties, click the top expandable menu. It should have all the attributes.

mowwwalker
  • 16,634
  • 25
  • 104
  • 157
  • Aha. So the set of attributes is a property! Is that correct? – Randomblue Sep 28 '11 at 19:57
  • 1
    Not exactly. There have been a few questions and discussions about this today though. http://stackoverflow.com/questions/7588846/when-to-access-the-attribute-vs-the-property and http://stackoverflow.com/questions/5874652/prop-vs-attr – mowwwalker Sep 28 '11 at 21:06
1

Just right click on the element you want to inspect and choose "Inspect element". In the bottom panel select Elements tab. It will show the DOM element with the attribures in the form of HTML.

mateusz.fiolka
  • 3,032
  • 2
  • 23
  • 24
0
  • Open Inspect Element by right clicking on the element or any other way you want.
  • Find the element you want to add the attribute in.
  • Right click on the attribute in Inspect Element. Click Add Attribute

enter image description here

Muhammad Umar
  • 1,291
  • 7
  • 13