Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
ID and Class Attribute | Advanced Concepts
Introduction to HTML
course content

Conteúdo do Curso

Introduction to HTML

Introduction to HTML

1. Basics Introduction
2. Basic Elements
3. Metadata and the Head Element
4. Advanced Text Formatting Elements
5. Advanced Concepts

bookID and Class Attribute

The id and class attributes in HTML are used to identify specific elements on a web page and apply styles to them using CSS.

html

index

css

index

js

index

copy

Let's apply styles to this element using CSS.

html

index

css

index

js

index

copy

The class attribute is used to identify multiple elements that share the same class name. An element can have multiple classes, and a class can be used on multiple elements. You can use the class attribute to apply styles to a group of elements with the same class name.

html

index

css

index

js

index

copy

Let's add some CSS style.

html

index

css

index

js

index

copy

You can also combine the id and class attributes to apply styles to specific elements or groups of elements.

html

index

css

index

js

index

copy

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 5. Capítulo 2
We're sorry to hear that something went wrong. What happened?
some-alt