CSS Syntax | An Intro to CSS for Front End Developer

CSS Syntax

CSS, Cascading style sheet use to give style to raw HTML. CSS Plays the most important role in front end and in this part we will cover the basics of CSS Syntax, CSS full course, css for front end, css basic,Get access to full free css course for front end developer



Why CSS

  • CSS gives style to raw HTML
  • Used to give style, effects to our web page
  • To make responsive website
  • CSS takes the responsibility of design
  • Gives a modern look to a web page

CSS Syntax

To understand the syntax of CSS, first we understand the meaning of some common naming.

Selector : Here selector selects HTML elements based on the element name like Id and Classes.

Property : It is like a pre defined variables to which we assign some task or values. Check the list of CSS Properties.

Value : What ever task that we assign to property is called as value.

Selector {
Property1 : Value1;
Property2 : Value2;
}

game {
  background-color: black;
  color: orange;
  border: 5px solid orange;
  margin: 20px;
  padding: 35px;
}

Group of selector : Here we can also take more then one Id or selector with a single declaration box.

/* Group of selector*/
Id_1, Id_2, Id_3{
  background-color: black;
  color: orange;
  border: 5px solid orange;
  margin: 20px;
  padding: 35px;
}

Comments in CSS

we can define CSS in .html file also or in separate .css file but the comment syntax should be different in each

/* Comment In .css File */
<!-- Comment in .html File -->

In next part we will cover the Inline, external, internal CSS the most important topic in front end. The Merits and Page speed also depends on the correct placement of CSS.

If you have not accessed our Free HTML course for front end then Go! Check it just 10 pages.


Leave a Comment

Your email address will not be published. Required fields are marked *

0

Tech Info