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
Post a Comment