CSS .class Selector

You are Here:

CSS .class Selector

Example

HTML Online Editor
<!DOCTYPE html> <html lang="en-US"> <head> <style> .point{ color: red; } </style> </head> <body> <h1>CSS .class Selector</h1> <p>This is paragraph.</p> <p class="point">This is paragraph with className 'point'.</p> <div class="point">This is div with className 'point'.</div> </body> </html>

Syntax

Using CSS

.point { color: red; }

More Examples

Example

HTML Online Editor
<!DOCTYPE html> <html lang="en-US"> <head> <style> p.point{ color: red; } </style> </head> <body> <h1>CSS .class Selector</h1> <p>This is paragraph.</p> <p class="point">This is paragraph with className 'point'.</p> <div class="point">This is div with className 'point'.</div> </body> </html>

Example

HTML Online Editor
<!DOCTYPE html> <html lang="en-US"> <head> <style> .point{ color: red; } </style> </head> <body> <h1>CSS .class Selector</h1> <p>This is paragraph.</p> <p class="point myPara">This is paragraph with className 'point'.</p> <div class="point myPara">This is div with className 'point'.</div> </body> </html>

Reminder

Hi Developers, we almost covered 98.7% of CSS Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in CSS.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author