Introducing the button widget
The button widget is used to provide a consistent, fully-themed styling to a range of elements and input types. The widget can be created from several different elements and the resulting DOM of the widget, as well as the features that can be used, will vary slightly depending on which element is used.
A standard button widget, built from either a <button>
, <a>
, or <input>
element with a type of button
, submit
, or reset
will appear as follows:
Implementing the standard buttons
As the button can be built from several different elements, there are some minor variations of the underlying code that we can use. When creating buttons using the <a>
, <button>
, or <span>
element will be created automatically by the widget and nested within the underlying element. This new <span>
will contain the text label of the button.
To create a link button, use the following code:
<!DOCTYPE html> <html> <head> <meta charset...