Help me in my Programming HTML CSS Test

tag color?

Please go through the following HTML snippet

<head>
  <link ref= “stylesheet”, type =”text/ess” href=”mystyle.css” I>
</head>

<head>
  <style type=”text/css”> p {color:sienna ;margin-left :20px;} </style>
</head>

<p style=”colonred;margin_left:l0Opx”>This is a text line.</p>

In what color will the <p> tag be rendered? And Why

1 Answers
theqryadmin Staff answered 1 year ago

There are 3 types of CSS style property applied to the paragraph

  1. External CSS
  2. Internal CSS
  3. Inline CSS

So according to priority style over each other-
 The inline style has the highest priority than the other two 
 So Inline style property applied to a paragraph

  And <p> tag color render are RED 
 
Also, check- Write a CSS class for all the paragraphs <p> in only that to appear in blue color and text-centered?