Lesson 1: An introduction to css

Css selectors are an extremely useful tool when scraping as they provide an easy and convenient way for you to navigate a html document without having to perform text extraction in the usual way (such as by regex for example). The following lessons will explore the practical usage of css selectors and will push you further along in yout scraping journey. The first lesson that you will learn, is that every element can be matched by its name.

Go ahead and try writing a selector that matches all three rows, it is as simple as using the name of the nodes:

Exercise 1: Matching elements
Task Text
match <a href="link"></a> To be completed
match <a id="id" /> To be completed
match <a href="link">Text</a> To be completed

Dark Mode: Toggle