The snip of code below comes from a very large document with all types of tags. I can extract and change things to what I want including working with checkboxes. What I can't seem to do is change and add styles to anything. It does pickup any styles found in the style tags originally submitted. When I go through the elements I can replace the button value with the word "Service" as shown below but I cannot change the font to 10pts or change the color. For the textbox listed in the HTML code I cannot change the vertical alignment to top. I guess I really just can't seem to change the styles from what was assigned originally or add a style if it does not exist. I tried to post the original HTML code but it did not appear correct on here... Please help if you can... I just need the JSoup way to add or replace a style on a single tag as shown below ... Thanks...
for(Element element : elements){
sFieldName = element.attr("name");
if (element.attr("name").equals("scode")) {
element.replaceWith(new TextNode("Service", sFieldName));
}