Horje

How to Use of the class attribute in an HTML document -

Note that this is an important paragraph. :)
index.html
Example: HTML
<!DOCTYPE html>
<html>
<head>
<style>
h1.intro {
  color: blue;
}

p.important {
  color: green;
}
</style>
</head>
<body>

<h1 class="intro">Header 1</h1>
<p>A paragraph.</p>
<p class="important">Note that this is an important paragraph. :)</p>

</body>
</html>

Output should be:

How to Use of the class attribute in an HTML document -



Single Articles
How to Use of the class attribute in an HTML document - HTML Global Attributes
How to add Add multiple classes to one HTML elementHTML Global Attributes
How to use JavaScript to add a yellow background color to the first element with class="example" (index 0)HTML Global Attributes
How to use JavaScript to add the "mystyle" class to an element with id="myDIV"HTML Global Attributes


Related Articles
What is HTML accesskey Attribute HTML Global Attributes
What is HTML class Attribute HTML Global Attributes
What is HTML contenteditable Attribute HTML Global Attributes
What is HTML data-* Attributes HTML Global Attributes
What is HTML dir Attribute HTML Global Attributes
What is HTML draggable Attribute HTML Global Attributes
What is HTML enterkeyhint Attribute HTML Global Attributes
What is HTML hidden Attribute HTML Global Attributes
What is HTML id Attribute HTML Global Attributes
What is HTML inert Attribute HTML Global Attributes
What is HTML inputmode Attribute HTML Global Attributes
What is HTML lang Attribute HTML Global Attributes
What is HTML popover Attribute HTML Global Attributes
What is HTML spellcheck Attribute HTML Global Attributes
What is HTML style Attribute HTML Global Attributes
What is HTML tabindex Attribute HTML Global Attributes
What is HTML title Attribute HTML Global Attributes
What is HTML translate Attribute HTML Global Attributes
What are the HTML Global Attributes HTML Global Attributes

Type:
Html
Category:
Web Tutorial
Sub Category:
HTML Global Attributes
Uploaded by:
Admin