Blog

CSS - what is it and why should you learn it?

CSS | What is it? How does it work? What can you do with it? And why should you learn it? Read the article and get answers to all your questions.
Written by
upon
August 2, 2020

HTML plays an important role on the internet, but without CSS, the web will lack style. In our previous blogs, we talked about the usefulness of JavaScript and HTML. In this article, we're going to tell you what CSS is and why you should learn it.

What is CSS?

CSS stands for Cascading Style Sheets. It is responsible for the layout of a page and adds style and color. When we talk about style, we're talking about things like font sizes, fonts, text colors, and background. When covering HTML in the previous blog, we used a human metaphor to better understand it. Then we compared HTML to a human skeleton, which gives structure to the body. CSS can be seen as the personal attributes. This includes the color of your skin and hair, the size of your body and even the clothes you wear. It's simply the look and style that visitors to a webpage see.

CSS styles — Inline, Internal & External

CSS therefore determines the style and look of a web page. However, this can be done in three different ways. A brief explanation of how they are used is given below.

Inline

Inline CSS refers to a specific page element in the HTML page. This is what you call Inline styles. The HTML page then provides all the information for the layout itself. It is possible to imagine that an HTML page is difficult to maintain when style information is added to each element. In addition, it often happens that many elements have the same layout characteristics. Then having to change that layout in all those places is almost impossible. In addition, it provides an unclear code. Inline CSS is therefore primarily used when a unique style needs to be applied to a specific element.
It is more common for many elements within an HTML page to have the same formatting attributes. That's why using Internal and External styles is better for this.

Internally

Internal styling is done when different HTML pages all need to have their own style. The style layout code is then included in <head>that specific HTML page. This is useful because all your styles are then centrally defined on the various HTML pages. On the other hand, it can become unclear because the code of these pages becomes unclear. Fortunately, there is the option to collapse this Internal HTML segment, which is offered by various editors.</head>

Externally

This last way of styling HTML is very useful when there are many styles, or there are multiple pages with the same style. This creates a separate CSS file (external style sheet). This is a text file that is saved with the .css addition. This includes the styles you want applied to your web pages. The difference with the previous styles is that they do not need to include tags. This is because everything in this file is interpreted by the web page as styling info. You tell the HTML page which CSS file to load into it by <head>usually <link rel="stylesheet" href="/WincAcademy.css">adding:. WincAcademy.css is then the name of the CSS file</head>.

Within programming, there are no specific rules for using Inline, Internal or External styling. In the programming world, however, there are unwritten rules that you try to style externally as much as possible. This is because it is simply more organized, can be updated separately from the HTML page, and you can style all your HTML pages at once. If specific adjustments are required for a particular HTML page or HTML element, Internal and Inline styles can be used.

Why you need to learn CSS!

As you've noticed, CSS plays an important role in web pages, allowing companies to be different, unique and stand out from others with their websites. Without CSS, we would look at boring pages that read black and white texts, unappealing. Like HTML, CSS is a popular skill in today's online world. Just look at various job sites, type in the keyword CSS, and see that people with this skill are wanted. By learning CSS, you're not just working on your own skills, you're learning the skills of the future!

Learn the basics of CSS with Winc

Want to get started with CSS and learn its basics? Then sign up for our course Web development and learn about HTML and other web development skills in addition to CSS. Have you become so enthusiastic that you want to learn everything about Front-end development? Then sign up for our training to become Front-end developer!

More Blogs

Cookie Preferences
close

We may use and track cookies, local storage, your IP address and similar technologies to improve the user experience of this site and to understand how it is used. Read more in our privacy policy.