Answer:
The first code does it
Step-by-step explanation:
Each of the attached code snippet is divide into two parts.
- The CSS part
- The html part
From the four code snippets, the first one answers it.
The syntax to format the paragraph of an html text using css is:
p#paragraph-id{
color:color-name
}
Analysing each element
p# -> This implies that a paragraph is to be formatted
paragraph-id -> This represents the id of the paragraph
{} -> The open and close curly braces house the properties to be formatted
color:color-name -> implies that the color of the element be changed to color-name (e.g. red or blue)
In the body tag of the html code, the first paragraph has an id of para1 and the second has para2 as its id.
i.e. <p id = "para1">......
So, the first paragraph will be formatted red while the second will be blue