DevTools Tips

Copy an elements styles

Categories: Supported by:

You can extract all the styles of an element in one go by using the Copy styles feature.

No need to go through all CSS rules and properties that apply to the element in the Styles pane, and manually build the resulting list. With this feature, you can get the whole list at once, with all of the needed styles:

  1. Select the element you want to extract the styles from by right-clicking on it and choosing Inspect.
  2. In the Elements tool, right-click the selected element.
  3. Click Copy > Copy styles.
  4. Paste the result in a text editor and use however you want.

Screenshot of the Edge DevTools Elements panel, showing the context menu on an element and the Copy styles menu item. The screenshot also shows what the result of copying styles is: a flat list of CSS properties and values.