Curriculum
Course: HTML Basic
Login

Curriculum

HTML Basic

HTML Introduction

0/1

HTML Editors

0/1

HTML Attributes

0/1

HTML Paragraphs

0/1

HTML Formatting

0/1

HTML Comments

0/1

HTML Favicon

0/1

HTML Page Title

0/1

HTML Iframes

0/1

HTML Java Script

0/1

HTML File Paths

0/1

HTML Symbols

0/1
Text lesson

Multiple Classes

HTML elements have the ability to be associated with multiple classes.

To designate multiple classes, delineate the class names with spaces, for instance, <div class=”city main”>. Consequently, the element will be styled according to the rules defined in all specified classes.

In the given example, the initial <h2> element is assigned both the city and main classes, thus inheriting CSS styles from both classes.

Example

<h2 class=”city main”>London</h2>
<h2 class=”city”>Paris</h2>
<h2 class=”city”>Tokyo</h2>