ABSTRACT

Mobile computing devices, smartphones and tablets in particular, experienced explosive growth since the early 2000s and the trend is predicted to continue. This chapter explores how to apply standard technologies Hypertext Markup Language (HTML) 5, Cascading style sheets (CSS) 3, PHP, and JavaScript to make websites mobile friendly and approaches to deliver them to the mobile Web. The beauty of HTML5 and CSS has always been the separation of document structure and presentation. While multiple media-query controlled style sheets can deliver the same webpages to different devices, it is always possible to specialize pages for delivery to different types of devices. To detect the user’s browser and device, either on the server side using PHP or on the client side with JavaScript, the userAgent string is usually the key. On a touch-screen device, especially a smartphone, users are familiar with finger swiping to scroll pages and pictures.