简体   繁体   中英

span tag background color not working in swing application

I am displaying text in jlist using html. The background color is not changing for the span tag. Is there any way I can try to change background color? I also want to know if there is any tool/online site where we can validate html for Swing applications.

<span 'background-color=green'> <b>Name : </b> </span>

Thanks

background-color is a CSS style, you can add it to an HTML element with style attribute:

<span style="background-color:green"> <b>Name : </b> </span>

You can validate HTML using W3C Markup Validation Service: http://validator.w3.org/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM