I have the following code in my html:
hello world
>
I think there is no proper solution to this problem (without changing your markup). You could search and replace the style attribute's value:
var element = $('#foo');
element.attr('style', element.attr('style').replace(/font-size:[^;]+/g, '').replace(/font-family:[^;]+/g, ''))
By far the best solution would be to get rid of the inline styles and manage the styles by using classes.