What is CSS Cascading Style Sheet 🔥

The full name of CSS is cascading style sheet. It is a designing language that can be read easily. To teach this, PCs require code / text editor software, and a browser that makes it possible to display / open HTML pages.

What is Cascading Style Sheet?

CSS is used to make a web page beautiful. With its help, you can apply different styles to different materials. Such as heading, paragraph, list etc. and can use it on the web site with any color, shape.

With CSS, you can set the text color, font family, background, margin, padding, and webpage size. The use of CSS gives the webpage an attractive design. HTML and CSS are always used together. HTML You can use HTML without CSS, but CSS cannot

Because after writing HTML file you can write CSS on HTML tag, if you have not created HTML file then you cannot write CSS.

What is CSS Cascading Style Sheet 🔥

The CSS rule has two parts, the element property of the selector and the selector.

  • Selector - In this you select an HTML tag and apply a stack style. The selector is the name of the tag to which you want to apply CSS.
  • Element Property - In this you select an HTML tag and implement the design of the selected HTML tag by writing the element property inside a curly bracket and giving it a value.

There are 3 ways you can design HTML tags with a cascading style sheet.

1 Inline- In this method you define CSS in the HTML tag itself. for example

The color of apple is red.

<p style = "color: red"> The apple is in red color. </p>

2 Internal- In this method you define CSS in HTML file itself with the help of style script tag. for example

<p class = "yourchoice"> The apple is colored red. </p>

3 External CSS File Code
. yourchoice {color: red;}
External Cascading Style Sheet - Most people use this method. Because in this you create a separate CSS file, instead of writing a style on each HTML page and tag, you can select that HTML tag and write it to an external CSS file. For this, you should always place this CSS file link in the HTML file inside the head tag.

Some tags used in HTML such as

<h1> </h1> to <h6> </h6>
<p> paragraph tag </p>
<b> bold tag </b>

Note - CSS has the advantage when we create an external CSS file and insert its link into the HTML file.

What is Benefit of using CSS?

Using CSS saves you time. You can create a CSS external file and list it on multiple HTML pages, and apply the same CSS style to as many HTML tags as you want.

Loads quickly in the browser - when you decorate a webpage with each of the HTML tag attributes, you must define a separate attribute and value for each element. Doing this causes a lot of code and pages to load slowly. But when you use CSS, you only define styles for all tags used in that webpage. Doing this causes less writing of code, and your pages load faster.

Easy to maintain - Web pages are very easy to maintain via CSS. For example, if you want to change the color of the headers, just go to the CSS file to change the style of the headers. After this it will be implemented on all web pages.

Post a Comment

Thanks for any suggestions or questions! We will reply to your message soon.

Previous Post Next Post