Hey I figured it out!
For anyone else wanting to the same things… here’s what I got:
$page_id = 284; //the id of the page you're checking to see if it's published
$page_data = get_page($page_id);
if($page_data->post_status == 'publish'){ ?>
<!-- Put the HTML here that you want to display if the page is published -->
<?php }else{} ?>