SitePoint
Reference
CSS
Selector Reference
Attribute Selector
CSS Live Demo: Attribute Selector
(this page)
See also:
All Live Demos
CSS Live Demo: Attribute Selector
Type your
CSS
here:
(any properties allowed except expression, behavior and @import)
input[type="submit"] { color:#f00; font-weight:bold; cursor:pointer; } label[for="email"] { color:#f00; }
Type your
HTML
here:
(any tags allowed except script, iframe, frame, object, img and embed)
<form action="#"> <fieldset> <label for="email"> <span>Email:</span> <input type="text" id="email" name="email" /> </label> </fieldset> <fieldset> <input type="reset" value="Reset" /> <input type="submit" value="Submit" /> </fieldset> </form>
Show me!
Your results appear here: