How-to guide

How to check element sizes and spacing in Chrome

Press Ctrl+Shift+C (⌘+Option+C on a Mac) for Chrome’s inspect tooltip. For more, press ⌘K with TabCmdr, type :rl and hover any element to see its size and spacing.

Quick answer

Measure an element in three steps

  1. ⌘K

    Step 1

    Open the palette

    Ctrl+K on Windows and Linux, on the page to measure.

  2. :rl

    Step 2

    Type :rl

    The ruler opens straight away.

  3. Esc

    Step 3

    Hover, then press Esc

    Read the size and spacing, then close the ruler.

Chrome's way

Chrome’s inspect mode

Chrome’s developer tools can show an element’s size when you point at it:

  1. Press Ctrl+Shift+C on Windows, Linux and ChromeOS, or ⌘+Option+C on a Mac. DevTools opens the Elements panel in inspect mode.
  2. Hover an element on the page.

The tooltip lists the element’s dimensions in pixels, its selectors, its background and text colors, its font, and its padding and margin.

Source: Google’s DevTools inspect mode page, checked in October 2026.

TabCmdr's way

Measure with TabCmdr’s ruler

TabCmdr is a keyboard launcher that lives in your browser. Its ruler puts rulers along the edges of the page and measures whatever you point at, including the gap between two elements.

Before you start: add TabCmdr from the Chrome Web Store. It has a 7-day free trial and needs no account.

Step 1: Open the ruler

Press ⌘+K on a Mac or Ctrl+K on Windows and Linux and type :rl. The ruler opens as soon as you finish typing. You can also type ruler and press Enter on the Ruler tool.

TabCmdr palette with ruler typed, showing the Ruler tool with the :rl shortcut
The Ruler tool, with its :rl shortcut.

Rulers appear along the top and left edges, and a bar at the bottom lists the keys you can press.

Step 2: Hover an element

Point at anything on the page. TabCmdr outlines it in blue and shows:

  • its width and height, such as 112 × 48, and its tag and class, such as a.btn.primary,
  • its padding and margin on each side, in pixels,
  • a panel with its position, size and styles: font size, weight, font, line height, colors, background and corner radius.

Lines from the cursor to the rulers mark your exact position on the page.

TabCmdr ruler hovering a Start free button, labelled 112 × 48 and a.btn.primary, with padding values and a styles panel showing bg #4F46E5 and radius 10px
Hovering the button shows its size, its padding and its styles.

Step 3: Select one element and hover another

Click an element to select it. It turns red. Then hover a second element and TabCmdr shows the distance between the two in pixels.

Two cards measured with the TabCmdr ruler: the selected card outlined in red, the hovered card in blue, and a 20px gap between them
With the first card selected, hovering the second shows the 20px gap between them.

Click the selected element again, or press Delete, to deselect it. Press Esc to close the ruler.

Keys you can use with the ruler

KeyWhat it does
ETurn the element selector on or off
MMeasure between any two points. Drag, or click twice. Hold Shift to keep the line horizontal or vertical, and press X to clear
BShow or hide the padding and margin
SShow or hide the styles panel
GShow or hide guides
RShow or hide the rulers
CCopy the size of the selected element, such as 304 × 184
DeleteDeselect the element
EscClose the ruler. In measure mode, the first press leaves measure mode

To line things up, press on the top ruler and drag down to place a horizontal guide, or drag from the left ruler for a vertical one. Drag a guide back into the ruler, or double-click it, to remove it.

A selected element also gets a camera button. Click it to copy a picture of just that element. If a message reads To capture, open TabCmdr from its toolbar icon or browser shortcut, open the palette that way and try again.

The ruler feature page covers the rest.

Try it on your own tabs

Works in Chrome, Edge, Brave, Arc, Vivaldi and Opera.

Install for Chrome

FAQ

Questions about measuring elements

More in the documentation.

How do I see the size of an element on a web page?

In Chrome, press Ctrl+Shift+C (⌘+Option+C on a Mac) and hover the element. The tooltip shows its size in pixels. With TabCmdr, press ⌘K or Ctrl+K, type :rl and hover the element to see its width and height on a label.

How do I measure the space between two elements?

Open the ruler with :rl, click the first element to select it, then hover the second. TabCmdr draws the distance between them in pixels.

How do I see an element's padding and margin?

Hover the element with the ruler open. Its padding and margin are shaded around it, with the size of each side in pixels. Press B to turn this box model view on or off.

Can I copy the size?

Yes. Select an element and press C to copy its size, such as 304 × 184. The camera button above a selected element copies a picture of that element instead.

Does the ruler change the page?

No. It draws on a layer above the page. Press Esc and the page is exactly as it was.

One shortcut for your whole browser. Stop hunting for tabs.

Free for 7 days Then $3.99 / y No account