What is the standard sizing for width and Height in HTML?

I am looking to see if there is a good way to grasp the standards for HTML and sizing boxes or items to get a good looking website together. I have noticed that while i have been learning, i have been having issues with understanding sizing and how it fits into HTML. More specifically, how does one begin to understand a good size to make boxes or images while creating a website? or is it all just but trial and error to find the right size that fits the project i am working on?

I have included a link to the original source of the question Here.

Honestly it’s subjective to the content you’re creating. Learning the box model is like learning vanilla JavaScript in my opinion. It’s good to know how it works and it’s good building blocks to something better.

JavaScript has multiple libraries that make using it easier. CSS is very similar. The box model is there but there’s other methods like Grid and Flexbox that make design much more responsive and fluid.

I’d say continue learning the box model but keep in mind you’ll be learning other CSS methods soon.

2 Likes

Hi, there!

As Ty mentioned, further lessons will take you deeper into CSS methods.

However, I encourage you to become a box model expert and to take the time to understand the default values of elements before too many CSS properties are applied. Pretty soon in your lessons—if you have not already covered them—you will learn about max-width and min-width. With a good understanding of the box model, default values, and min/max width, you should be able to create websites that look good and work fluidly.

Mind you, your projects may seem simple if you apply just the basics. But by mastering the basics, you will avoid the mistakes many other designers and developers make when overcomplicating CSS.

2 Likes

So is there no limit to how big an element can be?

Technically, no. For example, block-level elements (as long as their width hasn’t been set) will always fill the width of their parent element. As the screen grows larger, the width of these elements will continue to grow to fill the space. And while you can make elements bigger than the screen they will be displayed on, I wouldn’t suggest doing so. Horizontal scrollbars are irksome. :sweat_smile:

2 Likes