2.3.2: Inspecting the ID and Class attributes

Опубликовано: 31 Декабрь 2025
на канале: saasbook
2,355
7

CSS uses selector notations such as div#name to indicate a div element whose id is name and div.name to indicate a div element with class name. Only one element in an HTML document can have a given id, whereas many elements (even of different tag types) can share the same class. All three aspects of an element---its tag type, its id (if it has one), and its class attributes (if it has any)---can be used to identify an element as a candidate for visual formatting.