Join Our Social Family:

random posts

Introduction To CSS - Created By World Wide Web Consortium

What is CSS?

What is CSS?

  • CSS is a cascading style sheet.

What is the role of CSS?

  • CSS defines how to display HTML elements.

Who developed CSS?

  • The worldwide web consortium (W3C) created CSS.
Current version:
  •  Currently, we are using CSS 3.
Where to write CSS?
  • We can easily write CSS in a separate file and then link it to our HTML file or embedded CSS in the HTML file itself.
  • External style sheet
  •  Internal style sheet
  •  Inline style 
 CSS syntax: 

Element selector: 
Element selector
{
PropertyName:PropertyValue;
PropertyName:PropertyValue;
PropertyName:PropertyValue;
....
}

Element selector:
  • Actually, an Element selector is used to specifying an HTML element or group of HTML elements on which properties are applied.
  • Mostly, There are three ways to specify an element selector
  1. Tag name
  2. ID value 
  3. Class value
PropertyName:PropertyValue:
  • PropertyName is the name of the CSS property name followed by colon(:) and then Property value.
  • Basically, we can write one or more property declaration in the block.

Selector: 

 
Tag name:
  • This is tag name used in HTML this causes selection of all elements with the specified tag name.
ID value:
  • The ID value is unique for HTML elements so it is used to select a specific element. 
  • The id value is prefixed with has(#) symbol when mentioning in the selector.
Class Value:
  • Class value can be common to heterogeneous HTML elements which causes selection of more than one HTML element.

 Regards,
Hints 4 You.
Thank you for giving me your precious time.
We will meet again via the next post.

*Feature:

*Give your Reaction:

*Share this Post:

Post a Comment

0 Comments