{"id":92,"date":"2017-04-21T19:13:42","date_gmt":"2017-04-21T19:13:42","guid":{"rendered":"https:\/\/courses.lumenlearning.com\/suny-the-missing-link-an-introduction-to-web-development-and-programming\/chapter\/chapter-17-mobile-device-support\/"},"modified":"2019-06-13T16:16:33","modified_gmt":"2019-06-13T16:16:33","slug":"chapter-17-mobile-device-support","status":"publish","type":"chapter","link":"https:\/\/courses.lumenlearning.com\/suny-the-missing-link-an-introduction-to-web-development-and-programming\/chapter\/chapter-17-mobile-device-support\/","title":{"raw":"Chapter 17: Mobile Device Support","rendered":"Chapter 17: Mobile Device Support"},"content":{"raw":"<p class=\"ChapterNumber\">When you are creating your HTML pages and following the responsive design patterns that restrict tags to structural as much as possible, you have already laid the groundwork to support mobile devices.<\/p>\r\nWhen all of your page content is broken down into logical pieces, and those pieces have ID and\/or class attributes, we will be able to show, hide, or reposition those elements using CSS. When we determine the screen dimensions the user has on their device, we can decide what or how to show content from our regular page. The key to this, of course, are the ID and class tags. Anything that you may want or need to control (move, alter, edit, etc.) as a single piece by itself should have an ID tag. Elements that will share the same changes (for example, pictures, links, paragraphs, etc.) should have the same class or classes so they can be changed at the same time.\r\n\r\nA single element, say a paragraph in a group of paragraphs, can have both an ID and a class, and can receive style changes from CSS due to both. We will get to this in more depth in CSS, but keep it in mind as you build pages now so they are ready for you later.\r\n\r\nIf you are reading this chapter looking for examples on HTML5 support of things like <a href=\"https:\/\/courses.lumenlearning.com\/suny-the-missing-link-an-introduction-to-web-development-and-programming\/chapter\/chapter-35-javascript-examples\/#geolocation\"><span class=\"Hyperlink\">Geolocation<\/span><\/a>, these will be found in the <a href=\"https:\/\/courses.lumenlearning.com\/suny-the-missing-link-an-introduction-to-web-development-and-programming\/chapter\/chapter-34-javascript-syntax\/\"><span class=\"Hyperlink\">JavaScript<\/span><\/a> section as they require the use of a scripting language to function, and are not available through HTML markup.\r\n\r\nImportant considerations for mobile development go beyond styling changes and begin to include performance measures as well, since mobile devices often lack computing power that can match a desktop or laptop\u2019s capacity. Skipping some of your fancier animations or large background images to trim down your loading times is another responsive-style adjustment to your site alongside other CSS changes. See the resources below for some examples of methods that may help your site improve response times.\r\n<div class=\"textbox exercises\">\r\n<h3 class=\"learn-h\">Learn more<\/h3>\r\n<p class=\"learn-m\">Keywords, search terms: Mobile optimization, mobile performance<\/p>\r\n<p class=\"learn-m\">Optimization tips and tools <a href=\"http:\/\/www.html5rocks.com\/en\/mobile\/\"><span class=\"Hyperlink\">http:\/\/www.html5rocks.com\/en\/mobile<\/span><\/a><span class=\"Hyperlink\">\/<\/span><\/p>\r\n<p class=\"learn-m\">Compatibility Charting: <a href=\"http:\/\/mobilehtml5.org\/\"><span class=\"Hyperlink\">http:\/\/mobilehtml5.org<\/span><\/a><span class=\"Hyperlink\">\/<\/span><\/p>\r\n<p class=\"learn-m\">Test your browser(s): <a href=\"http:\/\/html5test.com\"><span class=\"Hyperlink\">http:\/\/html5test.com<\/span><\/a><\/p>\r\n<p class=\"learn-m\">Follow new developments: <a href=\"http:\/\/www.mobilexweb.com\/\"><span class=\"Hyperlink\">http:\/\/www.mobilexweb.com<\/span><\/a><span class=\"Hyperlink\">\/<\/span><\/p>\r\n\r\n<\/div>","rendered":"<p class=\"ChapterNumber\">When you are creating your HTML pages and following the responsive design patterns that restrict tags to structural as much as possible, you have already laid the groundwork to support mobile devices.<\/p>\n<p>When all of your page content is broken down into logical pieces, and those pieces have ID and\/or class attributes, we will be able to show, hide, or reposition those elements using CSS. When we determine the screen dimensions the user has on their device, we can decide what or how to show content from our regular page. The key to this, of course, are the ID and class tags. Anything that you may want or need to control (move, alter, edit, etc.) as a single piece by itself should have an ID tag. Elements that will share the same changes (for example, pictures, links, paragraphs, etc.) should have the same class or classes so they can be changed at the same time.<\/p>\n<p>A single element, say a paragraph in a group of paragraphs, can have both an ID and a class, and can receive style changes from CSS due to both. We will get to this in more depth in CSS, but keep it in mind as you build pages now so they are ready for you later.<\/p>\n<p>If you are reading this chapter looking for examples on HTML5 support of things like <a href=\"https:\/\/courses.lumenlearning.com\/suny-the-missing-link-an-introduction-to-web-development-and-programming\/chapter\/chapter-35-javascript-examples\/#geolocation\"><span class=\"Hyperlink\">Geolocation<\/span><\/a>, these will be found in the <a href=\"https:\/\/courses.lumenlearning.com\/suny-the-missing-link-an-introduction-to-web-development-and-programming\/chapter\/chapter-34-javascript-syntax\/\"><span class=\"Hyperlink\">JavaScript<\/span><\/a> section as they require the use of a scripting language to function, and are not available through HTML markup.<\/p>\n<p>Important considerations for mobile development go beyond styling changes and begin to include performance measures as well, since mobile devices often lack computing power that can match a desktop or laptop\u2019s capacity. Skipping some of your fancier animations or large background images to trim down your loading times is another responsive-style adjustment to your site alongside other CSS changes. See the resources below for some examples of methods that may help your site improve response times.<\/p>\n<div class=\"textbox exercises\">\n<h3 class=\"learn-h\">Learn more<\/h3>\n<p class=\"learn-m\">Keywords, search terms: Mobile optimization, mobile performance<\/p>\n<p class=\"learn-m\">Optimization tips and tools <a href=\"http:\/\/www.html5rocks.com\/en\/mobile\/\"><span class=\"Hyperlink\">http:\/\/www.html5rocks.com\/en\/mobile<\/span><\/a><span class=\"Hyperlink\">\/<\/span><\/p>\n<p class=\"learn-m\">Compatibility Charting: <a href=\"http:\/\/mobilehtml5.org\/\"><span class=\"Hyperlink\">http:\/\/mobilehtml5.org<\/span><\/a><span class=\"Hyperlink\">\/<\/span><\/p>\n<p class=\"learn-m\">Test your browser(s): <a href=\"http:\/\/html5test.com\"><span class=\"Hyperlink\">http:\/\/html5test.com<\/span><\/a><\/p>\n<p class=\"learn-m\">Follow new developments: <a href=\"http:\/\/www.mobilexweb.com\/\"><span class=\"Hyperlink\">http:\/\/www.mobilexweb.com<\/span><\/a><span class=\"Hyperlink\">\/<\/span><\/p>\n<\/div>\n\n\t\t\t <section class=\"citations-section\" role=\"contentinfo\">\n\t\t\t <h3>Candela Citations<\/h3>\n\t\t\t\t\t <div>\n\t\t\t\t\t\t <div id=\"citation-list-92\">\n\t\t\t\t\t\t\t <div class=\"licensing\"><div class=\"license-attribution-dropdown-subheading\">CC licensed content, Shared previously<\/div><ul class=\"citation-list\"><li>The Missing Link. <strong>Authored by<\/strong>: Michael Mendez. <strong>Provided by<\/strong>: Open SUNY Textbooks. <strong>Located at<\/strong>: <a target=\"_blank\" href=\"https:\/\/textbooks.opensuny.org\/the-missing-link-an-introduction-to-web-development-and-programming\/\">https:\/\/textbooks.opensuny.org\/the-missing-link-an-introduction-to-web-development-and-programming\/<\/a>. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by-nc-sa\/4.0\/\">CC BY-NC-SA: Attribution-NonCommercial-ShareAlike<\/a><\/em><\/li><\/ul><\/div>\n\t\t\t\t\t\t <\/div>\n\t\t\t\t\t <\/div>\n\t\t\t <\/section>","protected":false},"author":311,"menu_order":12,"template":"","meta":{"_candela_citation":"[{\"type\":\"cc\",\"description\":\"The Missing Link\",\"author\":\"Michael Mendez\",\"organization\":\"Open SUNY Textbooks\",\"url\":\"https:\/\/textbooks.opensuny.org\/the-missing-link-an-introduction-to-web-development-and-programming\/\",\"project\":\"\",\"license\":\"cc-by-nc-sa\",\"license_terms\":\"\"}]","CANDELA_OUTCOMES_GUID":"","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-92","chapter","type-chapter","status-publish","hentry"],"part":62,"_links":{"self":[{"href":"https:\/\/courses.lumenlearning.com\/suny-the-missing-link-an-introduction-to-web-development-and-programming\/wp-json\/pressbooks\/v2\/chapters\/92","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/courses.lumenlearning.com\/suny-the-missing-link-an-introduction-to-web-development-and-programming\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/courses.lumenlearning.com\/suny-the-missing-link-an-introduction-to-web-development-and-programming\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/suny-the-missing-link-an-introduction-to-web-development-and-programming\/wp-json\/wp\/v2\/users\/311"}],"version-history":[{"count":1,"href":"https:\/\/courses.lumenlearning.com\/suny-the-missing-link-an-introduction-to-web-development-and-programming\/wp-json\/pressbooks\/v2\/chapters\/92\/revisions"}],"predecessor-version":[{"id":231,"href":"https:\/\/courses.lumenlearning.com\/suny-the-missing-link-an-introduction-to-web-development-and-programming\/wp-json\/pressbooks\/v2\/chapters\/92\/revisions\/231"}],"part":[{"href":"https:\/\/courses.lumenlearning.com\/suny-the-missing-link-an-introduction-to-web-development-and-programming\/wp-json\/pressbooks\/v2\/parts\/62"}],"metadata":[{"href":"https:\/\/courses.lumenlearning.com\/suny-the-missing-link-an-introduction-to-web-development-and-programming\/wp-json\/pressbooks\/v2\/chapters\/92\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/courses.lumenlearning.com\/suny-the-missing-link-an-introduction-to-web-development-and-programming\/wp-json\/wp\/v2\/media?parent=92"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/suny-the-missing-link-an-introduction-to-web-development-and-programming\/wp-json\/pressbooks\/v2\/chapter-type?post=92"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/suny-the-missing-link-an-introduction-to-web-development-and-programming\/wp-json\/wp\/v2\/contributor?post=92"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/suny-the-missing-link-an-introduction-to-web-development-and-programming\/wp-json\/wp\/v2\/license?post=92"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}