Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General

Notices


 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 09-28-2014, 10:27 PM   #1
Bates John
Registered User
 
Join Date: Sep 2014
Posts: 15
What are selectors in CSS?

Selectors help to select an element to which you want to apply a style. For example below is a simple style called as ‘intro” which applies red color to background of a HTML element.
Collapse | Copy Code

<style>
.intro
{
background-color:red;
}
</style>

To apply the above “intro” style to div we can use the “class” selector as shown in the below figure.
Collapse | Copy Code

<div class="intro">
<p>My name is Shivprasad koirala.</p>
<p>I write interview questions.</p>
</div>
__________________
John Bates


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bates John is offline   Reply With Quote

 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:33 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.