Welcome To My Online earning Tutarial And Artical Based Web Portal

Wellcome to My Online Earning Tutorial and Article Based Web Portal

Web design Tutorials Lesson 3.( Part 4)

How to use CUSS Class and ID Selectors

 You have seen a way to got wind of a mode sheet. And you recognize that if you got wind of a HTML selector, then all the HTML tags can have their values reset with the new values you given for instance if you had this:

Style Sheet Example

Then all the H1 headings you used between the 2 BODY tags would have the text between the 2  tags colored red.

In alternative words, to use your new HTML selector, you do not need to add anything to your HTML code. simply use the tag within the traditional method.

However, category and ID


 selectors Ar slightly totally different.


Using category Selectors

To set up a category Selector, the code was this:

.Class Selector

First, you A period (period). Then you sort the name of your category Selector



(which will be something you want)The Property and worth Ar then as traditional. associate example is this:

An embedded sheet example

The .Font One is that the category Selector a reputation we tend to created up ourselves. In between the curled brackets, we're then spoken language 'Every time this Rule is applied, the color of the text are red".

You can use this new Rule within a traditional HTML tag. Like this:

No comments:

Post a Comment