How to make page bordless with html?

Hi! I’m trying to make a page, now only use HTML and no CSS.
When I open the live server the page doesn’t have full width.
It got borders and when I use background colors in the body or in a div it looks like a box.
Does any one know how to fix this, with html?

Solution: In add style=“width: fit-content; margin: 0;”.

hard to understand without a screenshot
Or even better, a link to the website you are talking about?

1 Like

Technically you can move all CSS into inline styles using the style attribute, but it is going to be much more complicated and fragile. Use CSS if you want to style anything.

1 Like

Our teacher want us to make a webpage but using only html for now.

1 Like

it looks good so far, what is the part that is bugging you?

1 Like

Our teacher want us to make a webpage but using only html for now.
This is what I got started

Well, If you notice the div where is “Stark Industries” logo . The div doesn’t start at the beginning of the page, or the sides of the browser. It´s like a floating box. The image don’t starts from the left, it has a gap between :confused:

i think that is because the browser always imposes some spacing (which usually you would override with some css code).

Are you allowed to use in-line styling? (by adding the style attribute to the div?)

1 Like

Yes I am. But I don’t know how. Just searching but don’t find anything

okay, so I’m not allowed to tell you the answer here.
But I can suggest that you look up “css margin” .
(also look up “css width”)

1 Like

It works!!! Thank you soo much i use margin: 0; and it fits perfectly

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.