Next-Gen App & Browser Testing Cloud
Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

To inspect elements, open your browser's developer tools by right-clicking any part of a web page and choosing Inspect (or Inspect Element), or by pressing Ctrl+Shift+I on Windows and Linux or Cmd+Option+I on macOS. The Elements panel then shows the page's live HTML and CSS, which you can read and edit locally without affecting the real website.
Inspecting web elements helps you modify a website's layout and debug issues. It lets developers, testers, and designers manipulate CSS properties like fonts, sizes, colors, and spacing to preview how a change will look before shipping it. Every major browser, including Chrome, Firefox, Edge, and Safari, ships built-in developer tools for this purpose.
Inspecting an element means opening the browser's developer tools (DevTools) to view the underlying code that renders a web page. The Elements (or Inspector) panel exposes the Document Object Model (DOM), the styles applied to each node, box-model dimensions, and event listeners. Because the browser paints the page from this code, editing it in DevTools instantly re-renders the page in front of you.
Crucially, these edits are local and temporary. Nothing you change is saved to the server or seen by other visitors, and a simple page refresh restores the original state. That makes inspect element a safe sandbox for experimenting with layouts, reproducing bugs, and grabbing selectors for automation testing.
Chrome DevTools is the most widely used inspector. There are three ways to open it:
The Elements panel opens with the DOM tree on the left and the Styles pane on the right. Use the element-picker icon (top-left of DevTools, or Ctrl+Shift+C) to hover over the page and highlight the exact node you want. To test a device viewport, click the Device toolbar (toggle-device) icon and pick an Android or iOS profile.

Once the device toolbar is on, select any Android or iOS device from the dropdown and start inspecting elements at that resolution.

The workflow is nearly identical across browsers, with small differences in the menu path:
Because rendering differs subtly between engines (Blink, Gecko, and WebKit), it is good practice to inspect the same page across multiple browsers during cross browser testing rather than trusting a single browser.
The real power of inspect element is live editing. Double-click any text node to change its content, or right-click a node and choose Edit as HTML to rewrite entire blocks. In the Styles pane you can toggle, edit, or add CSS declarations and watch the page reflow instantly. For example, adding this rule to a selected button node changes it on the spot:
.cta-button {
background-color: #2f66f4;
color: #ffffff;
padding: 12px 24px;
border-radius: 6px;
}Beyond the Elements panel, the Console lets you run JavaScript against the page. A quick way to grab a node programmatically is:
// Select the first matching element and log it
const el = document.querySelector('.cta-button');
console.log(el.getBoundingClientRect());Inspecting elements is a core step in writing reliable automated tests. Right-click a node in the Elements panel, choose Copy, then Copy selector or Copy XPath to obtain a locator you can drop straight into a Selenium, Playwright, or Cypress script. For instance, a copied CSS selector can be used in a Selenium automation test like this:
WebElement loginBtn = driver.findElement(By.cssSelector("#login-form button.submit"));
loginBtn.click();Prefer stable attributes such as id or data-testid over long, auto-generated XPaths, which break easily when the DOM changes. If you are new to element location strategies, the guide on locating elements on a web page is a useful companion.
Inspecting elements is one of the most practical skills for anyone working with the web. With a right-click or a quick keyboard shortcut you can read a page's HTML and CSS, edit it live, debug JavaScript, and copy selectors for automation, all safely and locally. Master the workflow in Chrome first, then apply the same steps in Firefox, Edge, and Safari, and validate what you find across real browsers and devices to catch issues emulation would miss.
Press Ctrl+Shift+I on Windows or Linux, and Cmd+Option+I on macOS, to open developer tools in Chrome, Edge, and Firefox. F12 also works on Windows. To jump straight to element-picker mode, use Ctrl+Shift+C or Cmd+Option+C.
Yes. Use the device toolbar in Chrome or Edge DevTools to emulate mobile viewports, or enable remote debugging over USB. For true accuracy, inspect elements on real Android and iOS devices in a cloud like TestMu AI instead of relying on emulation alone.
Yes. Inspect element only edits the page locally in your own browser. Changes are temporary and disappear on refresh, so they never modify the live website or reach the server. It is a safe, standard tool for developers, testers, and designers.
Safari hides developer features by default. Open Safari > Settings > Advanced and enable Show features for web developers (Show Develop menu). The Develop menu and Inspect Element option then appear when you right-click a page.
You can read and edit HTML and CSS live, test copy and layout changes, copy element selectors and XPath for automation, debug JavaScript in the Console, monitor network requests, and audit performance and accessibility, all without changing the real site.
In the Elements panel, right-click the highlighted node, choose Copy, then select Copy selector or Copy XPath. This gives you a locator you can reuse in Selenium, Playwright, or Cypress scripts to reliably target that element.
KaneAI - Testing Assistant
World’s first AI-Native E2E testing agent.

TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance