; for color style



I'm curious to know what the ; is for after brown in this code. It accepts the answer whether or not I add it so I want to know if it's just for semantics or if it serves a deeper purpose.

<body style="background-color: brown;">


The semi colon is used to separate when you have many attributes and values.

So in your case you don't need it as you have one attribute only.

Here you have one one attribute ie. background-color but if you were to have many example, color, font-family, background-color you will need semi colons to separate

Like so:

<p style="color:blue;font-size:13px;background: yellow"> Hello </p>


Thank you that makes sense now.