What is CSS? Introduction to CSS

CSS helps a lot when writing a website in HTML.

What is CSS?

CSS stands for Cascading Style Sheets, a simple design language that partly handles the look and feel of a website. CSS describes how HTML elements appear on screens and other media.

Using CSS, you can control text color, font size, font style, spacing between paragraphs, size of elements on the web page, background color, layout design, and how the web page appears on the screen. screens of different sizes as well as a variety of other effects.

CSS is very useful and convenient. It can control all the pages on a website.

External stylesheets are stored as .CSS files. CSS is combined with the HTML or XHTML markup language.

CSS example - an HTML page with various styles

Below is an example of an HTML page displayed with 4 different stylesheets.

 

HTML page when using 4 stylesheets

What is CSS? Introduction to CSS Picture 5
An HTML page without a stylesheet

Why should you use CSS?

CSS is used to define the style of your website's pages, including design, layout, and how they display differently on different devices and screen sizes.

CSS helps solve the big problem of HTML

HTML has no elements to format a web page. HTML is only used to create content for the page. When elements like and color attributes were added to HTML 3.2, web developers' nightmare began. Developing a large website that adds font or color information to each page requires a lot of time.

To solve this problem, the World Wide Web Consortium (W3C) created CSS, which eliminates stylistic formatting from HTML pages. Style-related definitions are included in the .css file and thanks to the external stylesheet file, you can change the entire website with just a single file.

Save time

You can write CSS once and reuse them on multiple HTML pages. It is possible to style each HTMLM element and apply that style to as many web pages as you want.

Load pages faster

With CSS, you don't need to declare properties for each HTML tag each time you use that tag. Just write the tag's property in CSS and it will be applied every time the tag appears on the web page. Thanks to that, the amount of code that needs to be written will be less, and the page load time will be faster.

Easy maintenance

To make changes across the entire page, simply change the styles in the CSS file and all elements on the web page will be updated automatically.

There are more styles than HTML

CSS has a wide range of properties, much more than HTML. Thanks to that, you can make the website display better than just using HTML.

Compatibility with many devices

CSS allows content to be optimized across a variety of devices. By using the same HTML document, it can display well on PCs, phones, handheld devices or when printed.

Global web standards

HTML attributes are no longer used, you are advised to use CSS to be able to create cross-browser compatible websites in the future.

Next lesson: Syntax and Selectors in CSS

5 ★ | 1 Vote

May be interested

  • 10 best free Udemy courses10 best free Udemy courses
    how do you choose the best udemy classes for free when there are more than 80,000 online courses to choose from? here are a few steps to take, if you are only interested in free courses
  • What Chromebooks have and can't do?What Chromebooks have and can't do?
    chromebooks are officially shipped and distributed around the world, but is this really a solution that works for customers.
  • How to Become a Web DeveloperHow to Become a Web Developer
    web development is a field that is expanding with the introduction of new technologies, such as apps on smartphones and tablets. the demand for people who are familiar with creating new apps and programs is very high.http://www.entrepren...
  • Introduction to Email technologyIntroduction to Email technology
    you depend on email and can't work without it. however, most users (except it professionals) still feel about email as something confusing and sometimes miraculous. you just need to write a message on
  • Panasonic is about to launch the world's lightest computerPanasonic is about to launch the world's lightest computer
    the weight of the device dropped to 1.88kg while the 15.6-inch screen computers currently on the market averaged 2.8 kg.
  • Top 100 free apps for Mac OS XTop 100 free apps for Mac OS X
    in the following article, tipsmake.com will share with you the list of top 100 most popular free apps for mac os x ...
  • PKI Tutorial - Part 2: DesignPKI Tutorial - Part 2: Design
    in the first part of this pki tutorial series, we have an overview of how to prepare and plan your pki. in this second part, we will continue the introduction with a little more technique. ch & uac
  • Introduction to HTMLIntroduction to HTML
    a few basic things to know about html before starting to learn this language.
  • Surf the web more safely with the BufferZone Pro applicationSurf the web more safely with the BufferZone Pro application
    for most computer users, there are still many mistakes in how to use and work every day. they think that if you don't access unhealthy websites, don't click strange, unclear links, or banner ads ... they won't be affected by malware.
  • Introduction to Dual Channel (Part 2)Introduction to Dual Channel (Part 2)
    this tutorial will introduce you to some of the issues of dual channel technology: how it works, how to set it up, and how to calculate transfer speeds, etc.