HTML TUTORIALS-
HTML class Attribute Tag β
Introduction-
The class attribute in HTML is used to assign one or more class names to an HTML element. These class names can be used to apply CSS styles or interact with JavaScript..
β Example 1: Styling with CSS: -π
<!DOCTYPE html>
<html>
<head>
<style>
.highlight {
background-color: yellow;
font-weight: bold;
}
</style>
</head>
<body>
<p class="highlight">This paragraph is highlighted using a CSS class.</p>
</body>
</html>