course content

Course Content

Web Scraping with Python

Classes and IdsClasses and Ids

The number of HTML tags is relatively small. There will likely be a situation when you must differ some elements. Assume you will need to use different text styles for different paragraphs (i.e., for different <p> elements). To solve this problem, you can use class and id attributes.

The class attribute sets a class for a certain HTML element. Multiple elements can have the same classes.

The id attribute sets a unique id for a certain HTML element. Unlike the class attribute, the id value must be unique for each element.

question-icon

Choose the correct statements.

Select a few correct answers

Section 1.

Chapter 6