stack twitter tryhackme rss linkedin cross

Wilco van Esch

Skip to main content

Search results

    Inspecting input field placeholder CSS in DevTools

    Placeholder text is not shown in the standard DOM. To find it through DevTools's element inspection, you have to enable the Shadow DOM.

    To do so:

    Chrome & Safari

    1. Open DevTools
    2. Click the Settings icon (at time of writing: a cog icon in the top right)
    3. On the Preferences tab (at time of writing this is open by default), scroll to Elements
    4. Check the User agent shadow DOM checkbox
    5. Close the settings pane
    6. Inspect the input field
    7. Expand the input field and expand the #shadow-root node below it
    8. Click the pseudo-attribute inside it

    Firefox

    1. Open DevTools
    2. Click the Settings icon (at time of writing: triple dots in the top right)
    3. Click Settings
    4. Under Inspector, check the checkbox for Show Browser Shadow DOM
    5. Inspect the input field
    6. Expand the input field and expand the #shadow-root node below it
    7. Click the pseudo-attribute inside it