CSS Introduction


CSS Introduction

It stands for Cascading Style Sheet. CSS can be used to design HTML tags. HTML tags can be styled with the help of CSS which is used by web developers for web development. It is one of the most used languages on the web.

Syntax:

Selector {
//declaration block
property:value1;
property2:value2;

}
The selector is the element that needs to be styled. We can have multiple properties and values according to your requirements.

Why do you need to learn CSS?

CSS is a base technology of the World Wide Web, with HTML and JavaScript.

CSS is outlined to allow the division of presentation and content, including layout, colors, and fonts. That division can change content approachability, give more adaptability and control in the term of presentation features, allow multiple web pages to deal formatting by defining the appropriate CSS in a separate .css file. In addition, it lessens complexity and redundancy in the organic content and allows the .css file to be saved to enhance the page load speed among the pages that partake the file and its formatting.

  • The CSS saves a good amount of work. It can manage the design of various web pages all at a time.
  • The CSS specifies how HTML parts are presented on the screen, paper, or other media platforms.

The CSS is very useful for students and struggling professionals to become renowned Software Engineers, mainly when operating in a Web Development Domain. Here is the list of some of the key benefits of learning CSS:

  • Design Stunning Web site - The CSS manages the look and considers it part of a web page. With CSS, you can fit the appropriate color of the text, the style of fonts, the spacing between all paragraphs, how columns need to be sized and placed out, what background images or colors are applied, layout drawings, variations in exposure for various devices and screen sizes and variety of different effects.
  • Enhance a web designer - When you want to commence a career as an expert web designer, HTML and CSS designing is a must skill.
  • To Control web - The CSS is straightforward to learn and read, but it gives powerful command over the portrayal of an HTML document.
  • Study other languages - If you know the basics of HTML and CSS, then different technologies like javascript, PHP, or angular become simpler to learn.

Some of the Applications of CSS are:

As you know, CSS is one of the very popularly used style languages across the web. Its applications are:-

  • It saves a lot of time.
  • With the help of CSS, the page loads faster.
  • CSS has easy maintenance.
  • It offers several device compatibilities.
  • It gives excellent styles to HTML.
  • CSS maintains the global web standards.

Example No.1:

<html> <html lang="en-US"> <style> h1 { color: rgb(182, 24, 24); text-align: center; background-color: lightseagreen; } p { font-family: verdana; font-size: 20px; } </style> </head> <body> <h1>Knowledge2life</h1> <p>Learning website.</p> </body> </html>

OUTPUT:

Knowledge2life

Learning website

Example No.2:

<html> <html lang="en-US"> <style> h1 { color: color: rgb(177, 51, 114); } p { font-family: Time New Romen; font-size: 30px; } </style> </head> <body> <h1>Knowledge2life</h1> <p>Learning website.</p> </body> </html>

OUTPUT:

Knowledge2life

Learning website