DEV Community

loading...
Cover image for Types of CSS

Types of CSS

Hrushikesh41
I am Hrushikesh Kokardekar. One who loves to write code. Keen to learn new Things
・2 min read

Styling is an important aspect for designing your Website. Website should look attractive and eye-catching to the users.

CSS - Cascading Style Sheet is used to style HTML webpages. CSS has many such properties that makes webpage more elegant.

1. Inline CSS:

Inline CSS is used when we need to design a particular tag of
our page. The style attribute is used within the tag which is
need to be styled.

Code:-
Alt Text

Output:
Alt Text

2. Internal CSS:

Internal CSS is mostly used to design a single webpage. The style tag is used within the head section to apply CSS properties. Inside the style tag the element/class/id which is to be styled is written an style is applied on it.

Code:-
Alt Text

Output:
Alt Text

3. External CSS:

In this method an external stylesheet is created. Now the question is how to link it with the html page on which styling is applied. The solution is link tag. The link tag is placed just below the title tag .

Code:-
Alt Text

style.css:
Alt Text

Output:
Alt Text

That's it for Today. Meet you soon with next post.

Discussion (0)