<?php

    $a = '<h1 style="color:red;">1234567890</h1>';

    echo htmlentities($a,ENT_NOQUOTES,'utf-8');

?>