Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
Selects all elements with class="mydemo" with CSS
To select all elements with class=”mydemo”, you can try to run the following code. Use the .class CSS selector to achieve this,
Example
<!DOCTYPE html>
<html>
<head>
<style>
.demo {
border: 2px dashed orange;
}
</style>
</head>
<body>
<h1 class = "demo">Heading 1</h1>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
</body>
</html> Advertisements
