
This is equivalent to clicking the disclosure arrow next to an element that’s expanded. In the tree view, collapse the current element. This is equivalent to holding the Alt key and clicking the disclosure triangle next to an element. In the tree view, expand the current element and all the elements underneath it. Open the split console and enter the console command “ inspect($0)” to inspect the currently selected element.Īssigns the currently selected node to a variable named temp0 (or temp1 if temp0 is already taken, and so on), then opens the split console, enabling you to interact with that node using the console’s command line.
#FIREFOX HTML INSPECTOR SHORTCUT FULL#
Pressing Ctrl + C (or Cmd + C on a Mac) also performs this action.Ĭopy a CSS selector that uniquely selects the element.Ĭopy a CSS selector that represents the full path to the element.Ĭopy image as a data:// URL, if the selected element is an image. These options only appear in certain contexts, for example the “Open File in Style-Editor” option only appears when you context-click over the top of a link to a CSS file.

The menu contains the following items - click on the links to find the description of each command in the Context menu reference: To activate this menu, context-click the element. You can perform certain common tasks on a specific node using a popup context menu. Whitespace nodes are represented with a dot: and you get an explanatory tooltip when you hover over them: Since Firefox 52, the Inspector displays these whitespace nodes, so you can see where the gaps in your markup come from. Then you will find strange gaps between elements, even if you haven’t set any margin or padding on them. If these auto generated text nodes are inline level, browsers will give them a non-zero width and height. This includes white space (which is after all a type of text). Usually this white space seems to have no effect and no visual output, but in fact, when a browser parses HTML it will automatically generate anonymous text nodes for elements not contained in a node. They use white space such as spaces, returns, or tabs between their HTML elements because it makes markup more readable.
#FIREFOX HTML INSPECTOR SHORTCUT CODE#
Web developers don’t write all their code in just one line of text. Clicking the marker switches to the line of JavaScript code in the Debugger where the custom element got defined.

Clicking the marker enables the flexbox highlighter. it has display: inline-flex or display: inline flex applied to it. The element is an inline flex container, i.e. Clicking the marker enables the grid highlighter. it has display: inline-grid or display: inline grid applied to it. The element is an inline grid container, i.e. In earlier versions it can be enabled using the preference is true. Note: The overflow badge is introduced in Firefox 83. The element is causing scrollable overflow in a scroll container (either the current node or a parent node-the affected nodewill display the scroll badge). If preference is true, toggling the scroll badge will highlight any elements causing the overflow, and these nodes will additionally display the overflow badge. it has either overflow: scroll applied, or overflow: auto and sufficient content to cause scrollable overflow. Clicking the marker opens a tooltip listing the event listeners and allows you for each listener to switch to the line of JavaScript code in the Debugger where the listener is defined. The element has one or several event listeners attached to it. The table below explains the meaning of each badge: Markers (“badges”) are displayed to the right of some nodes. Now children are indicated in the tree with this icon: There is an ellipsis shown between the opening and closing tag of an element when the node is collapsed if it has larger contents. This can happen for different reasons such as using display: none or that the element doesn’t have any dimensions. Nodes that are not visible are shown faded/desaturated. Moving the mouse over a node in the tree highlights that element in the page.


If you hold the Alt key while clicking the arrow, it expands the node and all the nodes underneath it. Just to the left of each node is an arrow: click the arrow to expand the node. The rest of the pane shows you the page’s HTML as a tree (this UI is also called the Markup View). Getting Set Up To Work On The Firefox Codebase.
