Question about the pre-existing code

Why does the style.css start with
I’ve never seen that before.

html is how you put words on your website i will try to invite a moderator to help you answer this

I know what html is, I’ve just never seen “html” followed by a comma in a css file before.

hope a moderator replies then i invited stetim but he may not be on right now

You’ll find many different selectors within a CSS sheet.

from * { }
div > ul > li > a:hover { }

html enables you to control the document as a whole.

Consider this, an HTML document is made of parents, children, grand-children…


That should give you an idea of where html stands within the CSS sheet, and what it can do.

If html has a comma, it must be accompanied by at least one other selector.
What was it, in this case? and what does it do?

1 Like

thanks for answering this question

i was indeed not online.

well, html can used as a css selector. To set a background image/color for the entire page.

the comma does indeed indicate multiple elements specified:

html, body {
   margin: 0;

this will ensure no margin on the edge of the page (which is present by default)