Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Classes and Ids | Getting Acquainted with HTML
Web Scraping with Python

Classes and IdsClasses and Ids

The number of HTML tags is relatively limited. There may come a time when you need to distinguish between certain elements. Let's say you want to apply different text styles to various paragraphs (i.e., different <p> elements). To address this issue, you can utilize class and id attributes.

The class attribute assigns a class to a specific HTML element. Multiple elements can share the same classes.

The id attribute assigns a unique identifier to a specific HTML element. Unlike the class attribute, each element must have a unique id value.

question-icon

Choose the correct statements.

Виберіть кілька правильних відповідей

Все було зрозуміло?

Секція 1. Розділ 6
course content

Зміст курсу

Web Scraping with Python

Classes and IdsClasses and Ids

The number of HTML tags is relatively limited. There may come a time when you need to distinguish between certain elements. Let's say you want to apply different text styles to various paragraphs (i.e., different <p> elements). To address this issue, you can utilize class and id attributes.

The class attribute assigns a class to a specific HTML element. Multiple elements can share the same classes.

The id attribute assigns a unique identifier to a specific HTML element. Unlike the class attribute, each element must have a unique id value.

question-icon

Choose the correct statements.

Виберіть кілька правильних відповідей

Все було зрозуміло?

Секція 1. Розділ 6
some-alt