DEV Community

Cover image for Start CSS with CSS Selector: CSS Basic
Vivek Singh
Vivek Singh

Posted on • Originally published at Medium

Start CSS with CSS Selector: CSS Basic

This article is very essential for your CSS skill, you know why?

because CSS is all about targeting an element from a webpage and styling it. and in this article, we will learn various ways to target/select an element.

hope you are excited enough to read this article now,

The Pre-req of this article is you know the basics of HTML. if you don’t know anything about HTML go through the below article first

Start Web Dev With Basic Html

before we begin let’s see where to write CSS.

CSS can be added to HTML documents in 3 ways:

  • Inline — by using the style attribute inside HTML elements

A Blue Heading



A red paragraph.

  • Internal — by using a element in the <head> section</li></ul><pre>&lt;!DOCTYPE html&gt;<br><html><br><head><br><style><br>body {background-color: powderblue;}<br>h1 {color: blue;}<br>p {color: red;}<br>

    This is a heading

    This is a paragraph.

Top comments (0)