OP's stuff:
html = "<div style=\"text-align: center;\">
This is <span style=\"font-size: 21px;\">
<i>an example</i></span> of a <u>
<font face=\"Georgia\" style=\"font-size: 19px;\">text \
cell</font></u> with
<font color=\"#c14dff\" style=\"\">complex styles</font> \
applied.</div>";
Simon Woods color converter:
hexToRGB = RGBColor @@ (IntegerDigits[ ToExpression@StringReplace[#, "#" -> "16^^"], 256, 3]/255.) &
Auxiliary functions, you have to extend them for proper interpretation of all rules...
lhs[name_String] := Switch[name,
"face", FontFamily,
"font-size", FontSize,
"color", FontColor,
"text-align", TextAlignment,
"center", Center,
_, name
];
rhs[string_String] := Composition[ToExpression, lhs,
StringReplace[#, {"px" -> "", color : ("#" ~~ __) :> ToString[hexToRGB[color]]}] &, StringTrim][string];
style[opt : {__}] := (style /@ opt);
style[{} | ""] := {};
style["style" -> (dir_)] := style[dir];
style[(l_) -> (r_)] := lhs[l] -> rhs[r];
style[s_String] := Sequence @@ (lhs[#] -> rhs[#2] & @@@ Partition[StringSplit[s, ";" | ":"], 2]);
Procedure:
xml = ImportString[html, "XML"];
Block[{XMLElement},
XMLElement["div", opt_, content_] := Cell[BoxData@RowBox@content, style@opt];
XMLElement["i", opt_, content_] := StyleBox[RowBox@content, Italic];
XMLElement["u", opt_, content_] := StyleBox[RowBox@content, Underlined];
XMLElement[tag_, opt_, content_] := StyleBox[RowBox[Riffle[content, " "]], style@opt];
CellPrint@xml[[2]]]
Block[{XMLElement, f}, XMLElement[tag_, opt_, content_] := Tooltip[Row[content, " "], f[opt]]; xml[[2]] ]
$\endgroup$