References

Collection of references for web development.

HTML class attribute

Description

Specifies multiple classnames for an element, often used for styling the element with CSS.

Values

Value
string

Example

<p class="myclassname">Hello World</p>

Example #2

<style>
.custom {
	background-color:yellow;
}
.custom2 {
	font-weight:bold;
}
</style>
<p class="custom custom2">Hello World</p>