html - What STYLES are allowed inside SPAN? -
the "style" of span applies until /span.
but not apply attributes (e.g., background-color).
which attributes don't work?
- is quality looking called "deprecate"?
- is background-color?
- is there substitute "background-color" work?
thank you!
ps - found complete (?) index of attributes (it not have "background-color" - although has "bgcolor" (which "deprecates")).
<p>gdh2 no style</p> <p style="background-color:red; color:white; font-size:140%; font-family:verdana; text-align:center"> gdh2 p style = bg color, font color, verdana, centered</p> </span> <span style="color:red; "> <p>gdh2 - inside span font color red = works</p> </span> <span style="font-size:140%; "> <p>gdh2 - inside span font size 140% = works</p> </span> <span style="font-family:verdana; "> <p>gdh2 - inside span verdana = works</p> </span> <span style="text-align:center; "> <p>gdh2 - inside span verdana = works</p> </span> <span style="background-color:blue; "> <p>gdh2 - inside span of bg color blue = <b>fail</b></p>
`
the html p
(paragraph) won't inherit background-color
property inline
parent (which is, btw wrong html in many lvls). make parent span not inline
, may have color in span... (not in paragraph)
Comments
Post a Comment