Buttons markup and icons

There is, of course, only one way in which we are able to display a working button on a web page. However, there are a number of options we are allowed to apply to our buttons to further customize, change, or tweak their appearance and/or functioning.

Creating link buttons

These are the most straightforward buttons to create and place anywhere in a page.

Due to the nature of links though, they'd be better used exclusively for navigation purposes, whereas form buttons are better suited for, well, forms!

  1. In the main content block of a page, we first need to have an anchor link element we want to turn into a button:
    <a href="somewhere.html">Click me!</a>
  2. We can now add a data-role="button" attribute to the link: jQuery Mobile ...

Get jQuery Mobile First Look now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.