Automatically converting documents not using CSS
Tidy can convert documents using tags to CSS automatically, just set the clean option to true

Input
<HTML><HEAD><TITLE><TITLE></HEAD>
<BODY>
	<FONT COLOR="red">Hello, World!</FONT><BR/>
	<B><FONT SIZE=4 COLOR=#c0c0c0>More Text...</FONT></B>
</BODY>
</HTML>
Converting to CSS
<?php
    $tidy 
tidy_parse_file("clean_ex1.html", array("clean" => true));
    
tidy_clean_repair($tidy);
    echo 
$tidy;        
?>
Result
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title></title>

<style type="text/css">
 b.c2 {color: #C0C0C0; font-size: 120%}
 span.c1 {color: red}
</style>
</head>
<body>
<span class="c1">Hello, World!</span><br>
<b class="c2">More Text...</b>
</body>
</html>