CSS Exercises

CSS Exercises

  1. Basic Styling:

    • Create a CSS file and link it to your HTML document. Add the following styles:

      body {
          font-family: Arial, sans-serif;
          line-height: 1.6;
          margin: 0;
          padding: 0;
          background-color: #f9f9f9;
      }
      header {
          background: #333;
          color: #fff;
          padding: 20px 0;
          text-align: center;
      }
      
  2. Box Model:

    • Add styles to demonstrate the box model:

      p {
          padding: 10px;
          border: 1px solid #ccc;
          margin: 20px;
      }
      

Help us improve the content 🤩

You can leave comments here.

Last updated