CSS

To refresh your memory - or introduce the concept - I am going to explain what CSS is and it’s importance. Then we will take a look at a simple example that will help you understand the concept better
css

What is CSS?

CSS or Cascading Style Sheets is a cascading style sheet language and is used to stylize elements written in a markup language such as HTML. CSS separates the content from the visual representation of the site. Before you begin, you must be clear about a key concept: a web page is essentially a text document. In this document, HTML code is written, through which the content of a website is created. On the other hand, there is the CSS code, which, together with the HTML code, allows you to give shape, color, position (and other visual characteristics) to a page. In short, it is a language that web browsers like Chrome know and can understand. Our goal as web designers and programmers is precisely that: to learn the language. The acronym CSS (Cascading Style Sheets) means “Cascading Style Sheets” and starts from a simple but very powerful concept: applying styles (colors, shapes, margins, etc …) to one or more documents (generally HTML documents, web pages ) at scale. It is called cascading styles because they are applied from top to bottom (following a pattern called inheritance that we will discuss at a later time). If there is ambiguity, a series of rules are followed to resolve it. The idea of ​​CSS is to use the concept of separation of presentation and content,  HTML documents include only information and data, regarding the meaning of the information to be transmitted (the content), and all aspects related to style ( design, colors, shapes, etc …) are in a separate CSS document (the presentation).

How does CSS work?

CSS uses a simple English-based syntax with a set of rules that control it. As we mentioned earlier, HTML was not made with the intention of using style elements, but only for page markup. It was created simply to describe the content. For example: <p> is a paragraph. </p>. But how do you apply a style to the said paragraph? The CSS syntax structure is quite simple. It has a selector and a declaration block. First, you select an element and then you declare what you want to do with it. Pretty straightforward, right?

Let’s take a look at an example:

All <p> elements will appear in blue and bold.
  1. <style>
  2. p {
  3. color: blue;
  4. text-weight: bold;
  5. }
  6. <style>

Share this Post

Share on facebook
Share on linkedin
Share on twitter
Share on email
Share on whatsapp

Other Digital Terms

What should I do now?

If you have more questions and want to know how we work, contact us and one of our consultants will contact you for advice.

For further information on this subject and many more you can consult other articles in our blog where you will find references on this subject and many more.

If you liked this article you can share it on LinkedIn, Facebook or Twitter, I’m sure you have contacts who will like it as much as you do.

Free digital terms course

Sign up and get a new digital concept every week.

Want to boost your business?

Check out our digital services

small_c_popup.png

We are here to help

Discover how we have helped more than 40 SMEs and large companies to improve their digital strategy.