give an example to implement inline CSS in an HTML document
Answers
Answered by
0
Answer:
Inline CSS allows you to apply a unique style to one HTML element at a time. You assign CSS to a specific HTML element by using the style attribute with any CSS properties defined within it.
In the following example, you can see how to describe CSS style properties for an HTML <p> element in the same line of code.
We use a style attribute to assign CSS styling properties. In this particular case, color and value (blue) apply to the HTML <p> element.
Example Copy
<p style="color: blue;">This is a paragraph.</p>
Inline styles in CSS could be useful for previewing changes instantly or adding CSS rules to only one or two elements. When you don't have access to your .css file, knowing how inline style CSS works can be convenient.
Similar questions