Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.

Get Started Now!

CSS Box Model

The CSS box model is a concept that describes how elements are laid out on a web page using rectangular boxes. Each box consists of four main components: content, padding, border, and margin. These components determine the size and position of an element within its container.

There are four Boxes-

  1. Content Box
  2. Paddig Box
  3. Boarder Box
  4. Margin Box

How to create content Box?

<!DOCTYPE html>
<html lang="en">
<head>
    
    <title>CSS Box Model</title>
    <style>

        #one{
            color: red;
            background-color: yellow;
            width: 5px;

        }
        #Two{
            color: white;
            background-color: blue;
        }
    </style>
</head>
<body>
    
    <div id="one">CSS Box</div>
    <div id="two">CSS Box</div>
</body>
</html>

Related Posts

What is css and How css Works & Architecture?

What is css ? CSS stands for Cascading Style Sheets. It is a language used to style web pages. CSS can be used to control the appearance Read More

Read More

CSS Boarding Style:

We have eight style in CSS 2. dotted: This style creates a dotted line around the element. 3. dashed: This style creates a dashed line around the Read More

Read More

Online Job Application Form Using Html and CSS

In this job application form we are using html and css. Output:–

Read More

CSS Selector and Its Types

What is CSS Selector Selector means choosing an html tag for applying the styles. CSS selectors can be based on the 1. CSS Element Selector: The element Read More

Read More

CSS Properties and its types

What is CSS Background CSS background property is used to set the background color, image, or other properties for an HTML element. Syntax: There are 5 CSS Read More

Read More

What is CSS and how many types of CSS?

CSS stand for cascading style sheets. By using CSS we can apply style to the html document. It provides an additional feature to HTML. It is generally Read More

Read More
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x