# Creating a scroll-spy with 2 lines of CSS

DevFeed: [Creating a scroll-spy with 2 lines of CSS](<https://devfeed.tech/articles/creating-a-scroll-spy-with-2-lines-of-css-28839.md>)

Original publisher: [Read original article](<https://una.im/scroll-target-group/>)

Published: 2025-07-29T00:00:00Z

Content type: tutorial

Language: en

Sources: [Una Kravets](<https://devfeed.tech/sources/una-kravets.md>)

Topics: [CSS](<https://devfeed.tech/topics/css.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [Web platform](<https://devfeed.tech/topics/web-platform.md>)

Tags: [blog-post](<https://devfeed.tech/tags/blog-post.md>), [css](<https://devfeed.tech/tags/css.md>), [explainer](<https://devfeed.tech/tags/explainer.md>)

## AI overview

A tutorial showing how the CSS scroll-target-group feature can create a scroll-spy table of contents with two lines of CSS and anchor links, without JavaScript.

## Source excerpt

scroll-target-group is a new CSS feature that lets you create scroll-spy table of contents with basically 2 lines of CSS.