Chrome DevTools Tips: Target Recent Elements in Console

VideoZoran Jambor

A Chrome Developer Tools quick tip outlining how to easily target recently selected elements from the Elements Panel in the Console.

To target the currently selected element in the Elements Panel, you can use the $0 selector in the Console.

To target the previously selected element, you can use the $1 selector — and you can target the history of selected elements with $2, $3, and $4.

CSS Weekly YouTube Channel

CSS Weekly YouTube Channel

Weekly hands-on tutorials, tips, tools, news, and more — everything related to CSS and front-end development, created by Zoran Jambor.

Subscribe Today »
CSS Stickers

CSS Stickers

A set of beautiful, cute, and funny CSS stickers to showcase your love for CSS.

Get Your Set Today »