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 -

c# - How do I get the Nth largest element from a list with duplicates, using LINQ? -

jsp - "Sending a redirect is forbidden after the response has been committed" in sendRedirect -