Edit Content
LaminApp Blog
Learning CSS
Learning CSS

Guide to designing web pages with CSS

You will read about:

Cascading Style Sheets (CSS) is the programming language that controls the design and layout of web pages. Using CSS, you can make detailed design changes to every element of a web page, from font size and color to the position and spacing of layout elements. CSS was first introduced in 1996 and has since become an essential skill for web designers and developers.

CSS works in conjunction with HTML (which was introduced earlier). HTML defines the basic building blocks of a web page, such as headings, paragraphs, and images, while CSS is responsible for the visual styling and layout of these elements.

CSS is flexible and adaptable, allowing designers to create complex and customized layouts that work well on a variety of devices and screen sizes. In addition, CSS can be used to create animations and other dynamic effects that make a web page more engaging and user-friendly.

To do the exercises in this tutorial, you need to use an advanced code editor. So refer to this post and download and install a code editor suitable for your operating system (we recommend VS Code).

 

CSS Frameworks

There are several popular CSS frameworks that make it easier to build responsive and visually appealing web pages. Some of the most widely used frameworks include Bootstrap, Foundation, Materialize and …

Bootstrap, developed by Twitter, is one of the most popular CSS frameworks. It includes pre-designed templates and components that can be customized to suit the needs of your project. Bootstrap also includes extensive documentation and support, making it a reliable choice for designers and developers.

Foundation is another popular framework that offers a comprehensive set of customizable design elements. It is highly flexible and can be easily integrated with other web development technologies.

Materialize is a newer framework that is based on Google’s Material Design principles. It includes a range of design components and templates that make it easy to create modern, responsive designs.

 

CSS Training Codes

If you’re new to CSS, there are several sample codes that can help you get started with the basics. Here are a few examples:

  • To set the font size of a paragraph of text:

p {
font-size: 16px;
}

  • To change the background color of an HTML element:

div {
background-color: #F0F0F0;
}

  • To change the color of a hyperlink:

a {
color: blue;
}

 

Full HTML and CSS Code for training

Here is an example of full HTML and CSS code for a training page that includes a header, footer, and body content:

  • HTML Code:

<!DOCTYPE html>
   <html>
      <head>
         <title>Training Page</title>
         <link rel="stylesheet" type="text/css" href="style.css">
      </head>
      <body>
         <!-- Header -->
         <header>
            <h1>Training Page</h1>
            <nav>
               <ul>
                  <li><a href="#">Home</a></li>
                  <li><a href="#">About Us</a></li>
                  <li><a href="#">Contact Us</a></li>
               </ul>
            </nav>
         </header>

         <!-- Main Content -->
            <section>
               <h2>Introduction to CSS</h2>
               <p>CSS is a coding language that controls the visual design and layout of web pages. It works in conjunction with HTML to create dynamic and engaging web experiences.</p>
              <h2>Popular CSS Frameworks</h2>
              <ul>
                  <li>Bootstrap</li>
                  <li>Foundation</li>
                  <li>Materialize</li>
              </ul>
            </section>

         <!-- Footer -->
            <footer>
               <p>&copy; 2023 Training Page</p>
            </footer>
         </body>
      </html>

  • CSS Code:

header {
background-color: #333;
color: #FFF;
padding: 10px;
text-align: center;
}

nav ul {
list-style: none;
margin: 0;
padding: 0;
}

nav li {
display: inline-block;
margin: 0 10px;
}

nav a {
color: #FFF;
text-decoration: none;
}

section {
margin: 20px;
}

h2 {
font-size: 24px;
margin-top: 40px;
}

ul {
list-style: disc;
}

footer {
background-color: #EEE;
padding: 10px;
text-align: center;
}

* Tips: To do this exercise, you should save the HTML file as index.html and the CSS file as style.css in a folder.

Source on GitHub

At the end

CSS is an essential part of modern web design and development. It offers extensive customization and flexibility, allowing designers to create engaging and visually appealing web experiences. Also, one of the most important visual features of web apps is the user interface similar to native apps and their responsiveness; With popular frameworks like Bootstrap, Foundation, and Materialize, it is easier than ever to build responsive and dynamic web pages. By integrating CSS with HTML, designers can create truly engaging and user-friendly web experiences.

To complete the CSS training course, you can refer to W3SchoolsCodecademy and MDN. We have used these three sources as educational references.


Have you any questions? Ask it on our Reddit.

One Response

Leave a Reply

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