Using Font Awesome Icons in HTML5 Lists

First there is no difference as such in HTML4/5 lists as far as my knowledge goes. They render the same way so the title of this post is not misleading but I am just trying to stay up with the latest :) Anyway this post shows how to use Font Awesome in your Ordered or Unordered lists. The result will look like this First things first, if your browser does not support CSS pseudo classes then this approach will not work. You will be glad to hear that most of the latest browsers including Chrome, IE, Firefox supports them. If you have don't know what pseudo classes are then go look at this little tutorial Anyway lets get back on track and see how the above is done. I assume that you correctly have included bootstrap, font awesome files on your HTML5 page. The Markup [crayon-66912b5c7f431883768256/] above is really basic markup that is required. I've added more lines just so it looks nice in the end. Now lets take a look at our CSS The CSS Here is the CSS that is required to give us the required result. [crayon-66912b5c7f436000295440/] The most important bit in the above CSS is the use of psedo class :before and content that should go before each list item. Demo A near full list of content values is pro Font Awesome Content Values - Quick reference - Without icons though Here is the Content values of icon- fonts, To integrate check this page out icon-glass --> "\f000" icon-music --> "\f001" icon-search --> "\f002" icon-envelope --> "\f003" icon-heart --> "\f004" icon-star --> "\f005" icon-star-empty --> "\f006" icon-user --> "\f007" icon-film --> "\f008" icon-th-large --> "\f009" icon-th --> "\f00a" icon-th-list --> "\f00b" icon-ok --> "\f00c" icon-remove --> "\f00d" icon-zoom-in --> "\f00e" icon-zoom-out --> … [Read more...]