HTML & CSS

The following are some useful references. You can go through it to refresh your HTML & CSS knowledge.

Try it out!

1. Create a responsive layout where there are three columns on large screens, but on smaller screens, the columns stack vertically. Each column must have equal width and contain dynamic content.

<!DOCTYPE html>
<html>
<head>
   <title>Sample Page </title>
   <style>
      .container{ 
         display:flex
      }

      .column{
         flex: 1;
         padding: 10px;
         background-color: #d3d3d3;
         margin: 5px
      }
   </style>
</head>
<body>
   <div class="container">
      <div class="column">Column 1</div>
      <div class="column">Column 2</div>
      <div class="column">Column 3</div>
   </div>
</body>
</html>

Ideas to Explore:

  • What are semantic tags? Why are they used?
  • What are data attributes in HTML, and how can they be used in JS?
  • What are the differences between different position values?
  • What are pseudo-classes and pseudo-elements in CSS? Read about different ones of those.