Open In App

Elements Tool in Microsoft Edge Browser

The Elements Tool provides the HTML and CSS code of the webpage. This code can be modified to check the changes live in the browser itself and you can also check the layout and colors used in the elements of the webpage. The elements in the webpage are the various nodes, text, attributes, and attributes that make up the DOM.

Benefits of Elements Tool:

The Elements tools are used to view and change the HTML and CSS code of the webpage. The various benefits it provides are:



How to Open Elements Tool:

The tools is a default tab in the DevTools and it is also the first tab which is displayed when you open the DevTools. To open DevTools press the shortcut keys “F12” or “Ctrl+Shift+I” or you can right-click the webpage and click Inspect.

Opening Elements Tool

How to use Elements Tool

The Elements Tool contains two main section one is the DOM section and the other is the Pane section which contains multiple panes to deal with CSS.



UI of Element Tool

DOM Section:

The section provides the HTML code in an expandable tree format, and the code is also color-coded to increase readability. You can edit the DOM directly here, and the changes will be reflected in the webpage instantly. You can add breakpoints, focus on particular elements, or force the state of that element in this section.

DOM Section

Various feature of DOM Section:

There are may features of the Elements Tool which can be used to inspects the elements of the webpage but lets us understand some of the commonly used features.

Inspecting Elements of the webpage

Searching for gfg text in the DOM

Modifying Elements of the webpage

Forcing hover state in an Element of the webpage

Adding Breakpoints on the Elements of the webpage

Panes Section

The section provides various panes to deal with the HTML and CSS code in the webpage. You can filter out CSS properties, check for layouts, modify the CSS, add DOM breakpoints and get the list of various event listeners or properties.

Styles Pane

Computed pane

Layout Pane

Event Listeners Pane

DOM Breakpoints

Properties pane

Accessibility pane

Conclusion

The Elements tool is great for inspecting the HTML and CSS code in the browser itself, which saves time switching between the code editor and the browser continuously to reflect the changes. The tool provides various CSS features, which help a lot with dealing with CSS, and the tool also allows you to edit the HTML code.


Article Tags :