I am working with the following HTML code snippet:
<font color="#ff0000">מתחנת חוף הכרמל</font>
My goal is to verify if it includes the color
style and, if so, add a label
to it. The approach I attempted was unsuccessful:
if ($("font").css('color') == '#ff0000' ) {
$("font").attr('role':'heading');
} else {
console.log('not working');
}
Any suggestions or advice on how to achieve this? If there is a way to accomplish this using only pure JavaScript, that would be even better.