You can embed HTML in PHP conditionals during page generation as follows:
<p>Some html goes here</p>
<?php if(CONDITION) { ?>
<p>Unlimited html goes here</p>
<?php } else { ?>
<p>However much html you want to handle the false-case goes here</p>
<?php } ?>
If you want to perform conditionals after the page has been generated, you will need a client-side scripting language: JavaScript.