HTML CSS examples for CSS Widget:UL Element
Apply CSS to li with group attribute
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #divul ul>li[group="opt1"] { color:Chartreuse; } </style> <!--from w ww . ja v a 2s . c om--> </head> <body> <div id="divul"> <ul> <li group="opt1">Wake up</li> <li>Go to sleep</li> </ul> </div> </body> </html>