; for color style


#1


https://www.codecademy.com/en/courses/web-beginner-en-y2Yjd/2/1?curriculum_id=50579fb998b470000202dc8b


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;">


#2

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>

#3

Thank you that makes sense now.