---
title: "How many ways we can insert CSS in our code projects? And also explain  the types and advantages of CSS."  
description: "How many ways we can insert CSS in our code projects? And also explain  the types and advantages of CSS."  
author: "Gurmeet Kaur"  
published: 2018-11-18  
canonical: https://answers.mindstick.com/qa/51736/how-many-ways-we-can-insert-css-in-our-code-projects-and-also-explain-the-types-and-advantages-of-css  
category: "programming"  
tags: ["css", "advantages", "types"]  
reading_time: 2 minutes  

---

# How many ways we can insert CSS in our code projects? And also explain  the types and advantages of CSS.

How many ways we can [insert](https://www.mindstick.com/articles/81/insert-update-delete-records-in-csharp-dot-net) [CSS](https://www.mindstick.com/forum/514/background-gradient-ie7-css-problem) in our [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) [projects](https://www.mindstick.com/articles/105927/how-to-excel-at-managing-multiple-projects)? And also [explain](https://yourviews.mindstick.com/view/86025/content-created-for-humans-not-for-bots-explain-this-statement) the types and [advantages](https://www.mindstick.com/articles/44063/the-individual-advantages-of-short-online-courses) of CSS.

## Answers

### Answer by Arti Mishra

## "CSS"

CSS stands for **“Cascading Style Sheet”.** CSS is used to **separate the design and structural part of a website** so that it is **easily modified and reused.** CSS is **developed by W3C** and it is a recommendation to use for the web-based application.

\

**Advantage of CSS**

- It provides the **separation from structure and presentation** of the website, which is easy for the web-designing.
- It also provides new different properties for designing, which is not present in HTML.
- CSS **provides the reusability of code** **without writing again & again.**
- When we design the website with the help of CSS then it is easy and fast to design.

\
**Type of CSS**\
There are three types of CSS -

- Tag based (tag)
- Id based (#)
- Class based (.)

\
**Syntax :-** Name /Selector { Properties:value; ................................ ................................ }\
\
**Different ways to insert CSS****\**![How many ways we can insert CSS in our code projects? And also explain  the types and advantages of CSS.](https://answers.mindstick.com/questionanswer/e8dff408-5bf9-46e4-afe5-3fa00d2975db/images/eb756d0b-7012-48d7-b94f-3c4d4b81a691.jpeg)**\** There are mainly three ways to insert CSS in our code projects-

- Inline CSS ----> work as Private.
- Internal CSS -----> work as Protected.
- External CSS---> work as Public.

\

**Note:- If we move bottom to top then security will increase & when we move top to bottom then visibility will be increased.**\
**Inline CSS :**eg :- <p style = “property1:value1; property2:value2; .......”>\
**Internal CSS :**eg :- id /class/tag name{property :value;..............................................................}\
**External CSS:**eg :- <link rel=“stylesheet” type=“text/CSS” href=“myStyle.css”> \
\
\
**"Thanks!!! for Reading"**


---

Original Source: https://answers.mindstick.com/qa/51736/how-many-ways-we-can-insert-css-in-our-code-projects-and-also-explain-the-types-and-advantages-of-css

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
