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
{
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
- Tag name
- ID value
- 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:
Introduction to CSS , what is css3 ? , CSS tutorials , cascading style sheets , how to build websites ? , CSS introduction for beginners , CSS tutorials for beginners
0 Comments
Please do not enter any spam Link in the comment box. If you have any queries, Let me know!