- A Zapbuild Blog
- Creating a Mobile-First Responsive Web Design - HTML5 Rocks
- Table of Contents
- Setting The Viewport
Secondly, note that we have made use of the HTML5 semantic tags to imply meaning to the content we markup for viewing on the web:. Intel Open Source Technology Center's Rapid Interface Builder is a what-you-see-is-what-you-get UI tool, allowing you to create pages from a drag-and-drop interface and, when finished, to download the resulting code. Visit the Rapid Interface Builder note that you will need to use the Chrome browser to try it out:. Select some options from the top menu, drag to the screen, set text, or configure as needed, and voila: clicking the Export button at upper right offers you a well-formed template making use of jQuery Mobile's canned UI elements.
We didn't have to write any code here - the Rapid Interface Builder prototyping tool generated all of the code for us. As you dig through the code from our solution, note that we used theme "e" for all elements, giving the header, footer, and button a yellow color scheme - we'll dig deeper into themes later in this course. Note, too, that the Rapid Interface Builder gathers together all of the files we need for our mobile-optimized page into directories: source for the jQuery and jQuery Mobile libraries, etc.
Last, note that the version of jQuery Mobile used by the Rapid Interface Builder tool is a bit outdated. While the tool is a nice way to start playing with jQuery Mobile in a visual way, we won't be using it going forward: we'll code pages by hand from here on out. Luckily for us, support - especially for the features we'll focus on here - is especially strong among mobile browsers. HTML5 is in part an acceptance of the fact that browsers tolerate lots of bad code, that perhaps we need not be so strict with requiring end tags and case sensitivity, and that making obsolete some ten years' worth of existing web pages would be catastrophic.
This new flexibility could lead to a bit of chaos on your development team. Different HTML authors will take different approaches. Our recommendation is that you choose one approach and stick to it. In this course, for example, we use the following guidelines:. Of course, your choices here must also take into account your expected audience's use of older browsers - a self-closed div, for instance, won't work in Internet Explorer 7 and 8.
The table below shows the new elements that HTML5 has introduced. Note that we won't cover most of these in this course. Our mobile sites will need to accept user input - registration forms, comment forms, and the like to ask users to send us, via form fields, some information. Keep in mind that adoption for some of these new features is spotty at best; we'll cover the better implemented options.
The date type of input allows the user to enter a date with no time zone. Some smartphone browsers present a date picker when a field of type date receives focus.
A Zapbuild Blog
Fields of type email expect a valid email address. Many phones will show a contextually appropriate set of characters for input; the iPhone, for instance, displays the " " character:. Fields of type url are for entering full website address. Many phones will show a contextually appropriate set of characters for input; the iPhone, for instance, displays the ". The placeholder attribute is among the more useful new HTML5 field attributes: it allows us to specify an example value for the field, a value which disappears when the user begins to enter content in the field.
The required attribute is very useful - but, sadly, not well-supported among mobile browsers: the automatic client-side HTML5 form validation that works on desktop browsers is lacking on their mobile counterparts. We use a placeholder value for the first "name" field, and ask the user for information of type tel , email , url , and date. Among the new features offered as part of CSS3, media queries are easily the most useful to us as designers and developers of mobile sites. A way to apply CSS rules selectively based on both the type of media and the physical properties of the device browser, phone being used to access the page, each media query comprises a media type e.
We can test our user's device for screen width, device width, orientation "portrait" or "landscape" , and other features. Let's look at a simple example of media queries. When the browser is wider than pixels, the page renders with the two columns floated left and right.
Creating a Mobile-First Responsive Web Design - HTML5 Rocks
The red main column an article inside of a section occupies about two-thirds of the page, at left. The blue right sidebar column an aside sits to the right. The HTML page contains an article wrapped by a section ; an aside wraps the sidebar content.
Unlike our earlier example, we employ a CSS stylesheet in this example. The media query dictates that "for viewing on a screen and at a maximum browser width of pixels" the page should:. Sign In Search. Lesson Goals Learn what jQuery Mobile is, and isn't.
Learn about jQuery Mobile's support for various devices and browsers.
- Stay up to date!.
- Responsive Web Design Viewport.
- jQuery, CSS3, and HTML5 for Mobile and Desktop Devices: A Primer.
- La cita (Spanish Edition).
- What jQuery Is Not;
Learn how jQuery Mobile adopts the progressive enhancement strategy. Learn how jQuery Mobile offers support for accessibility. All widgets are optimized for optimal user experience on smart phones, tablets and PCs running different operating systems and browsers. All widgets are designed from ground-up and based on a powerful common core. The framework core provides fundamental capabilities like support for widget extensions and inheritance, widget settings, internal event handling and routing, property change notifications, device and browser compatibility detection and adjustments.
The framework automatically detects the device type, capabilities and browser version, and adjusts the internal behavior for optimal rendering and best user experience.
The product supports all major desktop and mobile web browsers - Internet Explorer 7. They are everything you need to build awesome-looking applications with consistent look and feel. To help you build new themes, we have developed a Theme Builder tool. Full Source code is available with most licenses. For more information about the licensing options, visit License.
Table of Contents
Rich functionality and great performance. Angular 7 Components. Onsen UI apps have shipped on over million mobile devices. See our sample apps here.
Setting The Viewport
Get updates on Onsen UI, Monaca and hybrid app development. No more than times a month. The most beautiful and efficient way to develop HTML5 hybrid and mobile web apps. Get started Download. Libraries for framework users. Native look and feel with lots of ready-to-use components and automatic styling A rich variety of UI components specially designed for mobile apps.
Easy to learn Onsen UI is easy to learn while being a powerful tool to create complex mobile apps. Giro D'Italia Official app for the famous bicycle race. Open Article.