
Now whatever is written in this tag (content) will have the text color as red We selected the id and then changed the color property i.e text color to red. Used to target specific or unique element.The id attribute is used to select HTML element.We selected the heading tag and then changed the color property i.e text color to red. Used to select HTML elements by its name.The selector is used to target elements and apply CSS.This paragraph will be pink and center-alignedĬheck out this CSS Properties course to learn more about CSS. Implementation of all the three types of CSS:

The idea of separation of concerns is maintained.With the help of tag in the head tag, we can apply styles.But the idea of separation of concerns still lost.With the help of style tag, we can apply styles within the HTML file.The idea of separation of concerns was lost.Not an efficient way to write as it has a lot of redundancy.Before CSS this was the only way to apply styles.There are 3 ways to write CSS in our HTML file.
#Simple css website syntax how to#
Here is how to comment out multiple lines: * This represents the most/ least important line of the doc.
#Simple css website syntax code#

