php - Why does this style effect all the tags even though I closed it, when I use printf -


i'm studing php , tried color <h1> tag. previous style influenced <h1> tag.

this code:

<?php echo "<span style='color:#$lets'>hello world!</span";  echo "<br /> <br />";   printf("<h1 stlye='color:#%x%x%x'>hello world! again.</h1>",200,250,100);  ?> 

you haven't closed span tag , have typo, should style instead of stlye.

<?php echo "<span style='color:#$lets'>hello world!</span>";  echo "<br /> <br />";   printf("<h1 style='color:#%x%x%x'>hello world! again.</h1>",200,250,100);  ?> 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -