Step 1: Understanding the Question:
Part one asks for the purpose of the
style attribute. Part two asks for one line of code that makes a paragraph red.
Step 2: Purpose:
The
style attribute is used to apply CSS rules directly to one HTML element. This is called inline CSS. It changes how that element looks, such as its colour, size or font.
Step 3: Build the code:
A paragraph uses the
<p> tag. Inside it we add
style="color:red;". The CSS property
color sets the text colour and
red is the value.
Step 4: Write the statement:
<p style="color:red;">This is a paragraph.</p>
Final Answer:
The style attribute gives inline CSS to one element, and color:red; makes the text red.
\[ \boxed{\text{style attribute; color:red;}} \]