25th July 2026 at 12:37am
Several attributes control how the button looks and which element it renders:
tagrenders a different HTML element in place ofbuttonclassadds one or more CSS classesstylesets a full CSS style stringdisabledset toyesdisables the button
Reach for class first and keep the rules in a stylesheet. One class restyles every button that uses it, follows the colour palette and stays under the user's control. A hardcoded style overrides the theme and has to be repeated at every button, so use it only when no class can do the job.
style sets the whole style attribute and replaces anything a style.* attribute wrote before it, so do not mix the two.
| title | Output |