Skip to main content
Learn CSS For Beginner Web Design

Learn CSS For Beginner Web Design

The appearance of the website was still very basic when it was first introduced, and we occasionally required design services. Of course, because programmers are still writing code in newly developed languages, there aren’t as many interesting features as there are now. However, as web programming languages have evolved, web coding has become associated with creativity. Of course, thanks to the development of the CSS web design programming language. This time, we’ll learn CSS for web design and talk about how to make CSS coding fun.

It’s a good idea to familiarize yourself with this programming language before you begin. Because, as the saying goes, if you don’t know it and don’t love it, you won’t be able to code with CSS.

What Is CSS?

CSS is an abbreviation for Cascading Style Sheets, which was first released on December 17, 1996 by the World Wide Web Consortium (W3C). As a result of an idea proposal from Håkon Wium Lie, several developers agreed on the concept. CSS was created at the time because the formatting style in HTML was deemed too long. When HTML 3.2 was released, with the addition of tags like <font>, it became a programmer’s worst nightmare. Large web programmers find it difficult because font types and font colors must be added to each web page, lengthening the work process and necessitating additional costs.

Benefits of Using CSS

CSS is used to design the appearance of web pages. CSS coding allows us to color fonts, document layouts, add tables, and change background colors, among other things.

Content and web design will be easily distinguished using CSS. So it is possible to repeat certain views on a web, making it easier to create many web pages, which can reduce the time required to create a web.

CSS Code Example
CSS Code Example

Different Types of CSS

When we code with CSS, we can apply it to HTML files in three ways: inline, internal, and external.

Inline CSS

<!DOCTYPE html>
<html>
    <head>
        <title>Learn CSS (Cascading Style Sheets)</title>
    </head>
    <body>
        <h1 style="color: darkblue; text-align: center;">Heading 1</h1>
        <p style="color: grey;">This is a paragraph.</ps>
    </body>
</html>

Inline techniques are typically applied only to elements that are subject to that style. This technique is not recommended for long-term web development because it is inefficient.

Internal CSS

<!DOCTYPE html>
<html>
    <head>
        <title>Learn CSS (Cascading Style Sheets)</title>
        <style>
            body {
                background-color: lightcyan;
            }
      
            h1 {
                color: darkblue;
                text-align: center;
            }

            p {
                color: blue;
            }
        </style>
    </head>
    <body>
        <h1>Heading 1</h1>
        <p>This is a paragraph.</ps>
    </body>
</html>

This method can be used as a CSS coding option for friends. This technique is similar to inline in that we code the CSS directly in the HTML file, but it is more commonly written in the <head> tag. However, this technique is also not recommended because using a lot of styles results in more lines of code that cannot be reused for other web pages.

External CSS

Here are the most popular and widely used CSS coding techniques. Aside from saving time and simplifying writing, this technique can also be reused on other web pages.

This method differs from the previous two in that the CSS to be used is written in a separate file. To use it, simply insert the file address into the HTML document to which you want to apply a style.

style.css

body {
    background-color: lightcyan;
}

h1 {
    color: darkblue;
    text-align: center;
}

p {
    color: blue;
}

CSS files are written in separate files.

index.html

<!DOCTYPE html>
<html>
    <head>
        <title>Learn CSS (Cascading Style Sheets)</title>
        <link rel="stylesheet" href="style.css">
    </head>
    <body>
        <h1>Heading 1</h1>
        <p>This is a paragraph.</ps>
    </body>
</html>

In the header section, CSS files are simply called.

Properties in CSS

Properties are used to specify what type of style will be applied to the class, tag, or id that has been selected in the selector, and there can be multiple properties in a single selector. There are many CSS properties that can be used, but if we code with CSS, we don’t need to memorize all of them at once; that would be a headache, friends. Simply comprehend the function of the property in question.

CSS properties include the following:

  • Background
  • Border
  • Box model
  • Layouting
  • Font & text, etc.

Conclusion

We’ve learned about CSS, which makes the website look more appealing. Beginning with an understanding of CSS, the benefits of CSS, and the various types and properties in CSS. Furthermore, practice using CSS on a regular basis to improve the overall appearance of the website.

Also check out other interesting articles that will be able to add to our new knowledge, including the following:

That’s all the article about learning CSS for web design. If you have any questions, please leave them in the comments section. Thank you very much.

Share this

Shafy Gunawan

I’m a web developer. I spend my whole day, practically every day, experimenting with HTML, CSS, JavaScript, and PHP; dabbling with Python programming language; and share the knowledge that I learned.

Leave a Reply

Your email address will not be published. Required fields are marked *