html - CSS:Is it legal to place the style=""? -


<div style="margin-bottom:1em;">     <input type="submit" value="guest access" name="guest_login" class="buttonhmpg" style="width:115px;" style=""> </div> 

we have "guest access" button on page, based on configuration displaying button, mean in configuration file if yes, display buttton, if no hide button using css style style=\"visibility:hidden\". if remove style="" empty style tag, configuration of displaying , hiding not work. if remove style="", displayed always.

my question is legal place style=""? beacause of style="", guest access button displayed , hidden?

no. 1 instance of given html attribute may appear on element.

browsers required ignore attributes if 1 of matching name exists on element.

when user agent leaves attribute name state (and before emitting tag token, if appropriate), complete attribute's name must compared other attributes on same token; if there attribute on token exact same name, parse error , new attribute must dropped, along value gets associated (if any).

http://www.w3.org/tr/html5/syntax.html#attribute-name-state

you can use single style attribute rules separated semi-colons (as in other rule-set), should moving away style attributes , using classes allow element matched stylesheet.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -