{"id":13543,"date":"2019-04-03T10:03:49","date_gmt":"2019-04-03T10:03:49","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=13543"},"modified":"2019-04-03T10:03:49","modified_gmt":"2019-04-03T10:03:49","slug":"html5-mobile-web-development","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/03\/html5-mobile-web-development\/","title":{"rendered":"HTML5 Mobile Web Development"},"content":{"rendered":"<h1 class=\"post-title\">Installing Netbeans and Java JDK in Ubuntu and Setting Up a Basic HTML5 Project<\/h1>\n<p>In this 4-article mobile web development series, we will walk you through setting up\u00a0<strong>Netbeans<\/strong>\u00a0as an\u00a0<strong>IDE<\/strong>\u00a0(also known as\u00a0<strong>Integrated Development Environment<\/strong>) in\u00a0<strong>Ubuntu 14.04.2 LTS Trusty Tahr<\/strong>\u00a0to start developing mobile-friendly and responsive HTML5 web applications.<\/p>\n<div id=\"attachment_14463\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/HTML5-Mobile-Web-Development.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14463\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/HTML5-Mobile-Web-Development-620x297.jpg\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/HTML5-Mobile-Web-Development-620x297.jpg 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/HTML5-Mobile-Web-Development.jpg 720w\" alt=\"HTML5 Mobile Web Development\" width=\"620\" height=\"297\" aria-describedby=\"caption-attachment-14463\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14463\" class=\"wp-caption-text\">HTML5 Mobile Web Development \u2013 Part 1<\/p>\n<\/div>\n<p>Following are the 4-article series about\u00a0<strong>HTML5 Mobile Web Development<\/strong>:<\/p>\n<div id=\"exam_announcement\"><b>Part 1<\/b>:\u00a0<b>Installing Netbeans and Java JDK in Ubuntu 14.04 and Setting Up a Basic HTML5 Project<\/b><\/div>\n<div id=\"exam_announcement\"><b>Part 2<\/b>:\u00a0<a href=\"https:\/\/www.tecmint.com\/create-mobile-friendly-responsive-web-application-using-jquery\/\" target=\"_blank\" rel=\"noopener\">Adding jQuery and Bootstrap Components to Make HTML5 Application Responsive and Mobile-Friendly<\/a><\/div>\n<div id=\"exam_announcement\"><b>Part 3<\/b>:\u00a0<a href=\"https:\/\/www.tecmint.com\/create-html5-application-and-deploying-on-remote-web-server-using-ftp\/\" target=\"_blank\" rel=\"noopener\">Making HTML5 Application Dynamic and Deploying on a LAMP Server Using Filezilla<\/a><\/div>\n<div id=\"exam_announcement\"><b>Part 4<\/b>:\u00a0<a href=\"https:\/\/www.tecmint.com\/tuning-dynamic-html5-web-apps-using-open-source-online-tools\/\" target=\"_blank\" rel=\"noopener\">Tuning Dynamic HTML5 Web Apps Using Open Source Utilities<\/a><\/div>\n<p>A well-polished work environment (as we will later see), autocompletion for supported languages, and its seamless integration with web browsers are, in our opinion, some of Netbeans, most distinguishing features.<\/p>\n<p>Let us also remember that the\u00a0<strong>HTML 5<\/strong>\u00a0specification brought many advantages for developers \u2013 to name a few examples: cleaner code thanks to many new elements), built-in video and audio playback capabilities (which replaces the need for Flash), cross-compatibility with major browsers, and optimization for mobile devices.<\/p>\n<p>Although we will initially test our applications on our local development machine, we will eventually move our web site to a\u00a0<strong>LAMP<\/strong>\u00a0server and turn it into a dynamic tool.<\/p>\n<p>Along the way we will make use of\u00a0<strong>jQuery<\/strong>\u00a0(a well-known cross-platform Javascript library that greatly simplifies client-side scripting), and of\u00a0<strong>Bootstrap<\/strong>\u00a0(the popular HTML, CSS, and JavaScript framework for developing responsive websites). You will see in coming articles how easy it is to set up a mobile-friendly application using these HTML 5 tools.<\/p>\n<p>After you go through this brief series, you will be able to:<\/p>\n<ol>\n<li>use the tools described herein to create basic HTML5 dynamic applications, and<\/li>\n<li>go on to learn more advanced web development skills.<\/li>\n<\/ol>\n<p>However, please note that even though we will be using\u00a0<strong>Ubuntu<\/strong>\u00a0for this series, the instructions and procedures are perfectly valid for other desktop distributions as well (<strong>Linux Mint<\/strong>,\u00a0<strong>Debian<\/strong>,\u00a0<strong>CentOS<\/strong>,\u00a0<strong>Fedora<\/strong>, you name it).<\/p>\n<p>To that end, we have chosen to install the necessary software (<strong>Netbeans<\/strong>\u00a0and the\u00a0<strong>Java JDK<\/strong>, as you will see in a minute) using a generic tarball (<strong>.tar.gz<\/strong>) as installation method.<\/p>\n<p>That being said \u2013 let\u2019s get started with\u00a0<strong>Part 1<\/strong>.<\/p>\n<h3>Installing Java JDK and NetBeans<\/h3>\n<p>This tutorial assumes that you already have an\u00a0<strong>Ubuntu 14.04.2 LTS Trusty Tahr<\/strong>\u00a0desktop installation in place. If you don\u2019t, please refer to\u00a0<a href=\"https:\/\/www.tecmint.com\/ubuntu-14-04-installation-guide\/\">Ubuntu 14.04 Desktop Installation<\/a>\u00a0article, written by our colleague\u00a0<a href=\"https:\/\/www.tecmint.com\/author\/cezarmatei\/\" target=\"_blank\" rel=\"noopener\">Matei Cezar<\/a>\u00a0before proceeding further.<\/p>\n<p>Since the\u00a0<strong>Netbeans<\/strong>\u00a0version that is available for download from the Ubuntu official repositories (<strong>7.0.1<\/strong>) is a little outdated, we will download the package from the Oracle website to get a newer version (<strong>8.0.2<\/strong>).<\/p>\n<p>To do this, you have two choices:<\/p>\n<ol>\n<li><b>Choice 1<\/b>: download\u00a0<a href=\"http:\/\/www.oracle.com\/technetwork\/articles\/javase\/jdk-netbeans-jsp-142931.html\" target=\"_blank\" rel=\"nofollow noopener\">the bundle<\/a>\u00a0that includes Netbeans + JDK, or<\/li>\n<li><b>Choice 2<\/b>: install both utilities separately.<\/li>\n<\/ol>\n<p>In this article we will\u00a0<strong>choose #2<\/strong>\u00a0because that not only means a download that is a bit smaller (as we will only install Netbeans with support for HTML5 and PHP), but also will allow us to have a standalone JDK installer should we need it for another setting that does not require Netbeans nor involve web development (mostly related to other Oracle products).<\/p>\n<p>To download\u00a0<strong>JDK 8u45<\/strong>, go to the\u00a0<a href=\"http:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/index.html\" target=\"_blank\" rel=\"noopener\">Oracle Technology Network<\/a>\u00a0site and navigate to the\u00a0<strong>Java<\/strong>\u00a0\u2192\u00a0<strong>Java SE<\/strong>\u00a0\u2192\u00a0<strong>Downloads<\/strong>\u00a0section.<\/p>\n<p>When you click on the image highlighted below, you will be asked to accept the license agreement and then you will be able to download the necessary\u00a0<strong>JDK<\/strong>\u00a0version (which in our case is the tarball for\u00a0<strong>64-bit<\/strong>\u00a0machines). When prompted by your web browser, choose to save the file instead of opening it.<\/p>\n<div id=\"attachment_14442\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Download-Java.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14442\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Download-Java.jpg\" alt=\"Download Java JDK\" width=\"474\" height=\"435\" aria-describedby=\"caption-attachment-14442\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14442\" class=\"wp-caption-text\">Download Java JDK<\/p>\n<\/div>\n<p>When the download is complete, go to\u00a0<strong>~\/Downloads<\/strong>\u00a0and extract the tarball to\u00a0<code>\/usr\/local\/bin<\/code>:<\/p>\n<pre>$ sudo tar xf jdk-8u45-linux-x64.tar.gz -C \/usr\/local\/bin\r\n<\/pre>\n<div id=\"attachment_14443\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Extract-Java.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14443\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Extract-Java-620x139.jpg\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Extract-Java-620x139.jpg 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Extract-Java.jpg 725w\" alt=\"Extract Java\" width=\"620\" height=\"139\" aria-describedby=\"caption-attachment-14443\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14443\" class=\"wp-caption-text\">Extract Java<\/p>\n<\/div>\n<p>To install\u00a0<strong>Netbeans<\/strong>\u00a0with support for\u00a0<strong>HTML5<\/strong>\u00a0and\u00a0<strong>PHP<\/strong>, go to\u00a0<a href=\"https:\/\/netbeans.org\/downloads\/\" target=\"_blank\" rel=\"noopener\">https:\/\/netbeans.org\/downloads\/<\/a>\u00a0and click\u00a0<strong>Download<\/strong>\u00a0as indicated in the following image:<\/p>\n<div id=\"attachment_14444\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Download-NetBeans.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14444\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Download-NetBeans-620x273.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Download-NetBeans-620x273.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Download-NetBeans.png 729w\" alt=\"Download NetBeans\" width=\"620\" height=\"273\" aria-describedby=\"caption-attachment-14444\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14444\" class=\"wp-caption-text\">Download NetBeans<\/p>\n<\/div>\n<p>This will cause your browser to either open the installation shell script or save it to your computer. Choose\u00a0<strong>Save File<\/strong>, then\u00a0<strong>OK<\/strong>:<\/p>\n<div id=\"attachment_14445\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Save-NetBeans-File.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14445\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Save-NetBeans-File.png\" alt=\"Save NetBeans Shell Script\" width=\"415\" height=\"280\" aria-describedby=\"caption-attachment-14445\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14445\" class=\"wp-caption-text\">Save NetBeans Shell Script<\/p>\n<\/div>\n<p>Once done, turn the\u00a0<code>.sh<\/code>\u00a0into an executable file and then run the shell script with administrative privileges:<\/p>\n<pre>$ cd ~\/Downloads\r\n$ chmod 755 netbeans-8.0.2-php-linux.sh\r\n$ sudo .\/netbeans-8.0.2-php-linux.sh --javahome \/usr\/local\/bin\/jdk1.8.0_45\r\n<\/pre>\n<p>From then on, follow the on-screen instructions to complete the installation leaving the default values:<\/p>\n<div id=\"attachment_14446\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/NetBeans-IDE-Installation.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14446\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/NetBeans-IDE-Installation.png\" alt=\"NetBeans IDE Installation\" width=\"465\" height=\"381\" aria-describedby=\"caption-attachment-14446\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14446\" class=\"wp-caption-text\">NetBeans IDE Installation<\/p>\n<\/div>\n<p>and wait for the installation to complete.<\/p>\n<article class=\"post-14441 post type-post status-publish format-standard has-post-thumbnail hentry category-web-design tag-html5 tag-java-2 tag-netbeans\">\n<div class=\"post-inner group\">\n<div class=\"entry share\">\n<div class=\"entry-inner\">\n<h3>Launching NetBeans and Creating a Basic HTML5 Project<\/h3>\n<p>To open\u00a0<strong>Netbeans<\/strong>, select it from the\u00a0<strong>Dash menu<\/strong>:<\/p>\n<div id=\"attachment_14447\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Start-NetBeans.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14447\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Start-NetBeans.png\" alt=\"Start NetBeans\" width=\"229\" height=\"171\" aria-describedby=\"caption-attachment-14447\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14447\" class=\"wp-caption-text\">Start NetBeans<\/p>\n<\/div>\n<p>To create a new HTML5 project using the basic template provided by Netbeans, go to\u00a0<strong>File<\/strong>\u00a0\u2192\u00a0<strong>New project<\/strong>\u00a0\u2192\u00a0<strong>HTML5<\/strong>\u00a0\u2192\u00a0<strong>HTML5 Application<\/strong>. Choose a descriptive name for your project and finally click\u00a0<strong>Finish<\/strong>\u00a0(do not include an external site template or javascript libraries at this time):<\/p>\n<div id=\"attachment_14448\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Create-New-Project.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14448\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Create-New-Project.png\" alt=\"Create New Project in Netbeans\" width=\"494\" height=\"385\" aria-describedby=\"caption-attachment-14448\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14448\" class=\"wp-caption-text\">Create New Project in Netbeans<\/p>\n<\/div>\n<p>We will then be taken to the\u00a0<strong>Netbeans UI<\/strong>, where we can add folders and files to our\u00a0<strong>Site Root<\/strong>\u00a0as needed. In our case, this will mean adding folders for fonts, images, Javascript files (scripts) and cascading style sheets (styles) to help us better organize our content in coming articles.<\/p>\n<p>To add a folder or a file, right-click on\u00a0<strong>Site Root<\/strong>\u00a0and then choose\u00a0<strong>New<\/strong>\u00a0\u2192\u00a0<strong>Folder<\/strong>\u00a0or\u00a0<strong>HTML<\/strong>\u00a0file.<\/p>\n<div id=\"attachment_14449\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Create-HTML5-Project.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14449\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Create-HTML5-Project-620x251.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Create-HTML5-Project-620x251.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Create-HTML5-Project.png 733w\" alt=\"Create HTML5 Project\" width=\"620\" height=\"251\" aria-describedby=\"caption-attachment-14449\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14449\" class=\"wp-caption-text\">Create HTML5 Project<\/p>\n<\/div>\n<p>Now let\u2019s introduce some new\u00a0<strong>HTML5<\/strong>\u00a0elements and modify the page body:<\/p>\n<ol>\n<li><strong>&lt;header&gt;<\/strong>\u00a0and\u00a0<strong>&lt;footer&gt;<\/strong>\u00a0define a header or a footer, respectively, for a document or a section.<\/li>\n<li><strong>&lt;main&gt;<\/strong>\u00a0represents the main content of a document, where the central topic or functionality is shown.<\/li>\n<li><strong>&lt;figure&gt;<\/strong>\u00a0is used for self-contained material, such as images or code, to name a few examples..<\/li>\n<li><strong>&lt;figcaption&gt;<\/strong>\u00a0shows a caption for a\u00a0<strong>&lt;figure&gt;<\/strong>\u00a0element, and thus it must be placed within the\u00a0<strong>&lt;figure&gt;<\/strong>\u00a0tags.<\/li>\n<li><strong>&lt;aside&gt;<\/strong>\u00a0is reserved for contents related somehow to the page content, usually related to it. It can be placed as a sidebar with help from CSS (more on this in coming articles).<\/li>\n<\/ol>\n<p>.<br \/>\nNow copy the following code snippet to your\u00a0<code>index.html<\/code>\u00a0file in Netbeans.<\/p>\n<p><strong>TIP<\/strong>: Don\u2019t just copy and paste from this window to your development environment, but take the time to type in each tag in order to visualize the auto-completion features of Netbeans, which will come in handy later on.<\/p>\n<pre>!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n\t&lt;head&gt;\r\n    \t&lt;title&gt;TODO supply a title&lt;\/title&gt;\r\n    \t&lt;meta charset=\"UTF-8\"&gt;\r\n    \t&lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\r\n\t&lt;\/head&gt;\r\n\t&lt;body&gt;\r\n    \t&lt;header style=\"background-color: #6699CC\"&gt;THIS IS A HEADER&lt;\/header&gt;\r\n    \t&lt;main&gt;\r\n        \t&lt;article&gt;\r\n            \t&lt;p&gt;This is some sample text.&lt;\/p&gt;\r\n            \t&lt;p&gt;Another line of sample text for this HTML 5 article&lt;\/p&gt;\r\n                \t&lt;aside&gt;\r\n                    \t&lt;figure&gt;\r\n                        \t&lt;img src=\"https:\/\/www.w3.org\/html\/logo\/downloads\/HTML5_Logo_256.png\" alt=\"HTML 5 logo\" \/&gt;\r\n                        \t&lt;figcaption&gt;Figure 1: The HTML 5 logo&lt;\/figcaption&gt;\r\n                    \t&lt;\/figure&gt;\r\n                        \t&lt;h2&gt;Web development basics series at Tecmint.com&lt;\/h2&gt;\r\n                        \t&lt;h3&gt;&lt;a href=\"http:\/\/dev.w3.org\/html5\/html-author\/\"&gt;This is HTML 5!&lt;\/a&gt;&lt;\/h3&gt;\r\n                        \t&lt;p&gt;Some text here&lt;\/p&gt;\r\n                \t&lt;\/aside&gt;\r\n        \t&lt;\/article&gt;\r\n    \t&lt;\/main&gt;\r\n    \t&lt;footer style=\"background-color: #CC6699\"&gt;THIS IS A FOOTER&lt;\/footer&gt;\r\n\t&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>You can view the page by selecting a web browser (preferably\u00a0<strong>Firefox<\/strong>, as in the below image) and clicking the\u00a0<strong>Play<\/strong>\u00a0icon:<\/p>\n<div id=\"attachment_14450\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Open-HTML5-Page-in-Browser.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14450\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Open-HTML5-Page-in-Browser.png\" alt=\"Open HTML5 Page in Firefox\" width=\"262\" height=\"282\" aria-describedby=\"caption-attachment-14450\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14450\" class=\"wp-caption-text\">Open HTML5 Page in Firefox<\/p>\n<\/div>\n<p>You can now view the progress of your development so far:<\/p>\n<div id=\"attachment_14462\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/HTML5-Page.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14462\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/HTML5-Page-480x450.png\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/HTML5-Page-480x450.png 480w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/HTML5-Page.png 656w\" alt=\"HTML5 Development Page\" width=\"480\" height=\"450\" aria-describedby=\"caption-attachment-14462\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14462\" class=\"wp-caption-text\">HTML5 Development Page<\/p>\n<\/div>\n<h3>Summary<\/h3>\n<p>In this article we have reviewed some of the advantages of writing your web applications using\u00a0<strong>HTML 5<\/strong>\u00a0and set up a development environment with\u00a0<strong>Netbeans<\/strong>\u00a0in\u00a0<strong>Ubuntu 14.04.2<\/strong>.<\/p>\n<p>We learned that this specification of the language introduced new elements and thus provided us with the possibility of writing cleaner code and replace resource-hungry components such as Flash movies with built-in controls.<\/p>\n<p>In coming articles we will introduce\u00a0<strong>jQuery<\/strong>\u00a0and\u00a0<strong>Bootstrap<\/strong>\u00a0so that you can not only use these controls and watch your pages load faster, but also make them mobile-friendly.<\/p>\n<p>In the meanwhile, feel free to experiment with other controls in\u00a0<strong>Netbeans<\/strong>, and let us know if you have any questions or comments using the form below.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/article>\n<div class=\"wp-pagenavi\" role=\"navigation\">\n<h1 class=\"post-title\">Adding jQuery and Bootstrap to Write a Mobile-Friendly and Responsive Web Application<\/h1>\n<p>In\u00a0<a href=\"https:\/\/www.tecmint.com\/html5-mobile-web-development-using-netbeans-and-java\/\" target=\"_blank\" rel=\"noopener\">Part 1<\/a>\u00a0of this series, we set up a basic HTML 5 project using Netbeans as our IDE, and we also presented a few elements that have been added in this new specification of the language.<\/p>\n<div id=\"attachment_14531\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Create-Mobile-Friendly-Responsive-Web-Application.jpeg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14531\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Create-Mobile-Friendly-Responsive-Web-Application-620x297.jpeg\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Create-Mobile-Friendly-Responsive-Web-Application-620x297.jpeg 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Create-Mobile-Friendly-Responsive-Web-Application.jpeg 720w\" alt=\"Create Mobile-Friendly Responsive Websites\" width=\"620\" height=\"297\" aria-describedby=\"caption-attachment-14531\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14531\" class=\"wp-caption-text\">Create Mobile-Friendly Responsive Websites \u2013 Part 2<\/p>\n<\/div>\n<p>In few words, you can think of\u00a0<strong>jQuery<\/strong>\u00a0as a cross-browser and cross-platform Javascript library that can greatly simplify client-side scripting in HTML pages. On the other hand, Bootstrap can be described as a complete framework that integrates HTML, CSS, and Javascript tools to create mobile-friendly and responsive web pages.<\/p>\n<p>In this article we will introduce you to\u00a0<strong>jQuery<\/strong>\u00a0and\u00a0<strong>Bootstrap<\/strong>, two priceless utilities to write HTML 5 code more easily. Both jQuery and Bootstrap are licensed under the MIT and Apache 2.0 licenses, which are compatible with the GPL and are thus free software.<\/p>\n<p>Please note that basic HTML, CSS, and Javascript concepts are not covered in any article of this series. If you feel you need to get up to speed with this topics first before proceeding, I highly recommend the\u00a0<a href=\"https:\/\/www.w3schools.com\/html\/html5_intro.asp\" target=\"_blank\" rel=\"noopener\">HTML 5 tutorial<\/a>in W3Schools.<\/p>\n<h3>Incorporating jQuery and Bootstrap into Our Project<\/h3>\n<p>To download jQuery, go to the project\u2019s web site at\u00a0<a href=\"https:\/\/jquery.com\/\" target=\"_blank\" rel=\"noopener\">http:\/\/jquery.com<\/a>\u00a0and click on the button that displays the notice for the latest stable version.<\/p>\n<p>At the time of this writing it\u2019s\u00a0<strong>v1.11.3<\/strong>\u00a0for full-browser compatibility (including Internet Explorer versions 6, 7, and 8) or\u00a0<strong>v2.1.4<\/strong>\u00a0if you\u2019re sure that your visitors will not be using those versions of IE.<\/p>\n<p>We will go with this second option in this guide.\u00a0<strong>DO NOT<\/strong>\u00a0click on the download link yet (the following illustration is only meant to indicate which is the right option).<\/p>\n<div id=\"attachment_14524\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Download-JQuery.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14524\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Download-JQuery.png\" alt=\"Download JQuery\" width=\"384\" height=\"273\" aria-describedby=\"caption-attachment-14524\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14524\" class=\"wp-caption-text\">Download JQuery<\/p>\n<\/div>\n<p>You will notice that you can download either a compressed\u00a0<code>.min.js<\/code>\u00a0or an uncompressed\u00a0<code>.js<\/code>\u00a0version of jQuery. The first is meant specially for websites and helps reduce the load time of pages (and thus Google will rank your site better), while the second is targeted mostly at coders for development purposes.<\/p>\n<p>For the sake of brevity and easiness of use, we will download the compressed (also known as\u00a0<strong>minified<\/strong>) version to the scripts folder inside our site structure.<\/p>\n<p>Right click on the link for the compressed, production version and choose\u00a0<strong>Save Link As<\/strong>\u2026, and then navigate to the indicated directory (you may want to refer to the path indicated where we chose to save our project in\u00a0<strong>Part 1<\/strong>).<\/p>\n<p>Finally, click\u00a0<strong>Save<\/strong>\u00a0on the bottom of the current dialog:<\/p>\n<div id=\"attachment_14525\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Save-jQuery.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14525\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Save-jQuery-620x150.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Save-jQuery-620x150.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Save-jQuery.png 683w\" alt=\"Save jQuery\" width=\"620\" height=\"150\" aria-describedby=\"caption-attachment-14525\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14525\" class=\"wp-caption-text\">Save jQuery<\/p>\n<\/div>\n<p>Now it\u2019s time to add\u00a0<strong>Bootstrap<\/strong>\u00a0to our project. Go to\u00a0<a href=\"https:\/\/getbootstrap.com\/\" target=\"_blank\" rel=\"noopener\">http:\/\/getbootstrap.com<\/a>\u00a0and click on Download Bootstrap. On the next page, click on the highlighted option as indicated below to download the minified components, ready to use, in a zip file:<\/p>\n<div id=\"attachment_14526\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Download-Bootstrap.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14526\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Download-Bootstrap.png\" alt=\"Download Bootstrap\" width=\"566\" height=\"164\" aria-describedby=\"caption-attachment-14526\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14526\" class=\"wp-caption-text\">Download Bootstrap<\/p>\n<\/div>\n<p>When the download completes, go to your\u00a0<strong>Downloads<\/strong>\u00a0folder, unzip the file, and copy the highlighted files to the indicated directories inside your project:<\/p>\n<pre># cd ~\/Downloads\r\n# unzip -a bootstrap-3.3.5-dist.zip\r\n# cd bootstrap-3.3.5-dist\r\n<\/pre>\n<div id=\"attachment_14527\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Install-Bootstrap.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14527\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Install-Bootstrap-620x217.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Install-Bootstrap-620x217.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Install-Bootstrap.png 625w\" alt=\"Install Bootstrap\" width=\"620\" height=\"217\" aria-describedby=\"caption-attachment-14527\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14527\" class=\"wp-caption-text\">Install Bootstrap<\/p>\n<\/div>\n<pre># cp css\/bootstrap.min.css \/home\/gabriel\/NetBeansProjects\/TecmintTest\/public_html\/styles\r\n# cp fonts\/* \/home\/gabriel\/NetBeansProjects\/TecmintTest\/public_html\/fonts\r\n# cp js\/bootstrap.min.js \/home\/gabriel\/NetBeansProjects\/TecmintTest\/public_html\/scripts\r\n<\/pre>\n<p>If you now expand the structure of your site in Netbeans, it should look as follows:<\/p>\n<div id=\"attachment_14528\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Site-Structure-in-Netbeans.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14528\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Site-Structure-in-Netbeans.png\" alt=\"Site Structure in Netbeans\" width=\"342\" height=\"313\" aria-describedby=\"caption-attachment-14528\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14528\" class=\"wp-caption-text\">Site Structure in Netbeans<\/p>\n<\/div>\n<\/div>\n<h3>Adding References<\/h3>\n<p>That sure looks good, but we still haven\u2019t told our\u00a0<code>index.html<\/code>\u00a0file to use any of those files. For the sake of simplicity, we will replace the contents of that file with a barebones html file first:<\/p>\n<pre>&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n\t&lt;meta charset=\"utf-8\"&gt;\r\n\t&lt;title&gt;jQuery and Bootstrap&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n \r\n   &lt;!-- \/\/ Your code will appear here. --&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>Then, just drag and drop each file from the project navigator section to the code, inside the\u00a0<code>&lt;\/head&gt;<\/code>\u00a0tags, as you can see in the following screencast. Make sure that the reference to jQuery appears before the reference to Bootstrap because the latter depends on the former:<\/p>\n<div class=\"post-format\">\n<div class=\"video-container\"><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/amwFBEBTqgY\" width=\"640\" height=\"405\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/div>\n<\/div>\n<p>That\u2019s it \u2013 you have added the references to both jQuery and Bootstrap, and can now start writing code.<\/p>\n<h3>Writing Your First Responsive Code<\/h3>\n<p>Let\u2019s now add a navigation bar and place it at the top of our page. Feel free to include\u00a0<strong>4-5<\/strong>\u00a0links with dummy text and don\u2019t link it to any document for the time being \u2013 just insert the following code snippet inside the body of the document.<\/p>\n<p>Don\u2019t forget to spend some time become acquainted with the auto-completion feature in Netbeans, which will show you the classes made available by Bootstrap as you start typing.<\/p>\n<p>At the heart of the code snippet below is the Bootstrap\u00a0<strong>container<\/strong>\u00a0class, which is used to place content inside of a horizontal container which will automatically resize depending on the size of the screen where it is being viewed. Not less important is the container-fluid class, which will ensure that the content within will occupy the entire width of the screen.<\/p>\n<pre>&lt;div class=\"container\"&gt;\r\n  \t&lt;nav class=\"navbar navbar-default\"&gt;\r\n    \t&lt;div class=\"container-fluid\"&gt;\r\n      \t&lt;div class=\"navbar-header\"&gt;\r\n        \t&lt;button type=\"button\" class=\"navbar-toggle collapsed\" data-toggle=\"collapse\" data-target=\"#navbar\" aria-expanded=\"false\" aria-controls=\"navbar\"&gt;\r\n          \t&lt;span class=\"sr-only\"&gt;Toggle navigation&lt;\/span&gt;\r\n          \t&lt;span class=\"icon-bar\"&gt;&lt;\/span&gt;\r\n          \t&lt;span class=\"icon-bar\"&gt;&lt;\/span&gt;\r\n          \t&lt;span class=\"icon-bar\"&gt;&lt;\/span&gt;\r\n        \t&lt;\/button&gt;\r\n        \t&lt;a class=\"navbar-brand\" href=\"#\"&gt;Project name&lt;\/a&gt;\r\n      \t&lt;\/div&gt;\r\n      \t&lt;div id=\"navbar\" class=\"navbar-collapse collapse\"&gt;\r\n        \t&lt;ul class=\"nav navbar-nav\"&gt;\r\n          \t&lt;li class=\"active\"&gt;&lt;a href=\"#\"&gt;Home&lt;\/a&gt;&lt;\/li&gt;\r\n          \t&lt;li&gt;&lt;a href=\"#\"&gt;About&lt;\/a&gt;&lt;\/li&gt;\r\n          \t&lt;li&gt;&lt;a href=\"#\"&gt;Contact&lt;\/a&gt;&lt;\/li&gt;\r\n          \t&lt;li class=\"dropdown\"&gt;\r\n            \t&lt;a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" role=\"button\" aria-haspopup=\"true\" aria-expanded=\"false\"&gt;Dropdown &lt;span class=\"caret\"&gt;&lt;\/span&gt;&lt;\/a&gt;\r\n            \t&lt;ul class=\"dropdown-menu\"&gt;\r\n              \t&lt;li&gt;&lt;a href=\"#\"&gt;Action&lt;\/a&gt;&lt;\/li&gt;\r\n              \t&lt;li&gt;&lt;a href=\"#\"&gt;Another action&lt;\/a&gt;&lt;\/li&gt;\r\n              \t&lt;li&gt;&lt;a href=\"#\"&gt;Something else here&lt;\/a&gt;&lt;\/li&gt;\r\n              \t&lt;li role=\"separator\" class=\"divider\"&gt;&lt;\/li&gt;\r\n              \t&lt;li class=\"dropdown-header\"&gt;Nav header&lt;\/li&gt;\r\n              \t&lt;li&gt;&lt;a href=\"#\"&gt;Separated link&lt;\/a&gt;&lt;\/li&gt;\r\n              \t&lt;li&gt;&lt;a href=\"#\"&gt;One more separated link&lt;\/a&gt;&lt;\/li&gt;\r\n            \t&lt;\/ul&gt;\r\n          \t&lt;\/li&gt;\r\n        \t&lt;\/ul&gt;\r\n      \t&lt;\/div&gt;&lt;!--\/.nav-collapse --&gt;\r\n    \t&lt;\/div&gt;&lt;!--\/.container-fluid --&gt;\r\n  \t&lt;\/nav&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>Another distinguishing feature of Bootstrap is that it eliminates the need for tables in HTML code. Instead, it uses a grid system to layout content and make it look properly both on large and small devices (from phones all the way to big desktop or laptop screens).<\/p>\n<p>In Bootstrap\u2019s grid system, the screen layout is divided in 12 columns:<\/p>\n<div id=\"attachment_14529\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Bootstrap-Grid-Layout.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14529\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Bootstrap-Grid-Layout-620x36.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Bootstrap-Grid-Layout-620x36.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Bootstrap-Grid-Layout.png 726w\" alt=\"Bootstrap Grid Layout\" width=\"620\" height=\"36\" aria-describedby=\"caption-attachment-14529\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14529\" class=\"wp-caption-text\">Bootstrap Grid Layout<\/p>\n<\/div>\n<p>A typical setup consists of using the\u00a0<strong>12-column<\/strong>\u00a0layout divided into 3 groups of 4 columns each, as follows:<\/p>\n<div id=\"attachment_14530\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Bootstrap-Column-Layout.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14530\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Bootstrap-Column-Layout-620x36.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Bootstrap-Column-Layout-620x36.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Bootstrap-Column-Layout.png 726w\" alt=\"Bootstrap Column Layout\" width=\"620\" height=\"36\" aria-describedby=\"caption-attachment-14530\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14530\" class=\"wp-caption-text\">Bootstrap Column Layout<\/p>\n<\/div>\n<p>To indicate this fact in code, and in order to have it displayed that way starting in medium-size devices (such as laptops) and above, add the following code below the closing\u00a0<code>&lt;\/nav&gt;<\/code>\u00a0tag:<\/p>\n<pre>...\r\n    &lt;\/nav&gt;\r\n   \t &lt;div class=\"row\"&gt;\r\n   \t \t&lt;div class=\"col-md-4\"&gt;This is the text in GROUP 1&lt;\/div&gt;\r\n   \t \t&lt;div class=\"col-md-4\"&gt;This is the text in GROUP 2&lt;\/div&gt;\r\n   \t \t&lt;div class=\"col-md-4\"&gt;This is the text in GROUP 3&lt;\/div&gt;\r\n   \t &lt;\/div&gt;\r\n&lt;\/div&gt; &lt;!--Closing tag of the container class --&gt;\r\n<\/pre>\n<p>You must have probably noticed that the column classes in the Bootstrap grid indicate the starting layout for a specific device size and above, as\u00a0<strong>md<\/strong>\u00a0in this example stands for medium (which also covers\u00a0<strong>lg<\/strong>, or large devices).<\/p>\n<p>For smaller devices (<strong>sm<\/strong>\u00a0and\u00a0<strong>xs<\/strong>), the content\u00a0<strong>divs<\/strong>\u00a0gets stacked and appears one above the next.<\/p>\n<p>In the following screencast you can see how your page should look by now. Note that you can resize your browser\u2019s window to simulate different screen sizes after launching the project using the Run project button as we learned in\u00a0<strong>Part 1<\/strong>.<\/p>\n<div class=\"post-format\">\n<div class=\"video-container\"><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/im91ONxdqiw\" width=\"640\" height=\"405\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/div>\n<\/div>\n<h3>Summary<\/h3>\n<p><strong>Congratulations!<\/strong>\u00a0You must have written a simple, yet functional, responsive page by now. Don\u2019t forget to check the Bootstrap website in order to become more familiar with the almost-limitless functionality of this framework.<\/p>\n<p>As always, in case you have a question or comment, feel free to contact us using the form below.<\/p>\n<h1 class=\"post-title\">Creating a Dynamic HTML5 Web Application and Deploying on Remote Web Server Using Filezilla<\/h1>\n<p>In the previous two articles of this series, we explained how to set up\u00a0<strong>Netbeans<\/strong>\u00a0in a Linux desktop distribution as an IDE to develop web applications. We then proceeded to add two core components,\u00a0<strong>jQuery<\/strong>\u00a0and\u00a0<strong>Bootstrap<\/strong>, in order to make your pages mobile-friendly and responsive.<\/p>\n<div id=\"attachment_14675\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Create-HTML5-Applications-and-Deploy-to-Web-Server.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14675\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Create-HTML5-Applications-and-Deploy-to-Web-Server-620x297.jpg\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Create-HTML5-Applications-and-Deploy-to-Web-Server-620x297.jpg 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Create-HTML5-Applications-and-Deploy-to-Web-Server.jpg 720w\" alt=\"Create HTML5 Applications and Deploy to Web Server\" width=\"620\" height=\"297\" aria-describedby=\"caption-attachment-14675\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14675\" class=\"wp-caption-text\">Create HTML5 Applications and Deploy to Web Server \u2013 Part 3<\/p>\n<\/div>\n<ol>\n<li><a href=\"https:\/\/www.tecmint.com\/html5-mobile-web-development-using-netbeans-and-java\/\" target=\"_blank\" rel=\"noopener\">Install Netbeans and Java to Create a Basic HTML5 Application \u2013 Part 1<\/a><\/li>\n<li><a href=\"https:\/\/www.tecmint.com\/create-mobile-friendly-responsive-web-application-using-jquery\/\" target=\"_blank\" rel=\"noopener\">Creating Mobile-Friendly and Responsive Web Application Using jQuery and Bootstrap \u2013 Part 2<\/a><\/li>\n<\/ol>\n<p>As you will seldom deal with static content as a developer, we will now add dynamic functionality to the basic page that we set up in\u00a0<strong>Part 2<\/strong>. To begin, let us list the prerequisites and address them before moving forward.<\/p>\n<h4>Prerequisites<\/h4>\n<p>In order to test a dynamic application in our development machine before deploying it to a LAMP server, we will need to install some packages. Since we are using a\u00a0<strong>Ubuntu 14.04<\/strong>\u00a0desktop to write this series, we assume that your user account has already been added to the\u00a0<strong>sudoers<\/strong>\u00a0file and granted the necessary permissions.<\/p>\n<h3>Installing Packages and Configuring Access to the DB Server<\/h3>\n<p>Please note that during the installation you may be prompted to enter a password for the MySQL root user. Make sure you choose a strong password and then continue.<\/p>\n<p><strong>Ubuntu<\/strong>\u00a0and derivatives (also for other\u00a0<strong>Debian-based<\/strong>\u00a0distributions):<\/p>\n<pre>$ sudo aptitude update &amp;&amp; sudo aptitude install apache2 php5 php5-common php5-myqsql mysql mysql-server filezilla\r\n<\/pre>\n<p><strong>Fedora<\/strong>\u00a0\/\u00a0<strong>CentOS<\/strong>\u00a0\/\u00a0<strong>RHEL<\/strong>:<\/p>\n<pre>$ sudo yum update &amp;&amp; sudo yum install httpd php php-common php-mysql mysql mysql-server filezilla\r\n<\/pre>\n<p>When the installation is complete, it is strongly recommended that you run\u00a0<code>mysql_secure_installation<\/code>\u00a0to, not surprisingly, secure your database server. You will be prompted for the following information:<\/p>\n<ol>\n<li><strong>Change the root password? [Y\/n]<\/strong>. If you already set a password for the MySQL root user, you can skip this step.<\/li>\n<li><strong>Remove anonymous users?<\/strong>\u00a0[Y\/n]\u00a0<strong>y<\/strong>.<\/li>\n<li><strong>Disallow root login remotely?<\/strong>\u00a0[Y\/n]\u00a0<strong>y<\/strong>\u00a0(Since this is your local development environment, you will not need to connect to your DB server remotely).<\/li>\n<li><strong>Remove test database and access to it?<\/strong>\u00a0[Y\/n]\u00a0<strong>y<\/strong><\/li>\n<li><strong>Reload privilege tables now?<\/strong>\u00a0[Y\/n]\u00a0<strong>y<\/strong>.<\/li>\n<\/ol>\n<h3>Creating a sample Database and Loading test Data<\/h3>\n<p>To create a sample database and load some test data, log on to your DB server:<\/p>\n<pre>$ sudo mysql -u root -p\r\n<\/pre>\n<p>You will be be prompted to enter the password for the MySQL root user.<\/p>\n<p>At the MySQL prompt, type<\/p>\n<pre>CREATE DATABASE tecmint_db;\r\n<\/pre>\n<p>and press\u00a0<strong>Enter<\/strong>:<\/p>\n<div id=\"attachment_14664\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Create-MySQL-Database.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14664\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Create-MySQL-Database.png\" alt=\"Create MySQL Database\" width=\"328\" height=\"45\" aria-describedby=\"caption-attachment-14664\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14664\" class=\"wp-caption-text\">Create MySQL Database<\/p>\n<\/div>\n<p>Now let\u2019s create a table:<\/p>\n<pre>USE tecmint_db;\r\nCREATE TABLE articles_tbl(\r\n   Id INT NOT NULL AUTO_INCREMENT,\r\n   Title VARCHAR(100) NOT NULL,\r\n   Author VARCHAR(40) NOT NULL,\r\n   SubmissionDate TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\r\n   PRIMARY KEY ( Id )\r\n);\r\n<\/pre>\n<div id=\"attachment_14665\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Create-Database-TAble.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14665\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Create-Database-TAble.png\" alt=\"Create Database Table\" width=\"559\" height=\"184\" aria-describedby=\"caption-attachment-14665\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14665\" class=\"wp-caption-text\">Create Database Table<\/p>\n<\/div>\n<p>and populate it with sample data:<\/p>\n<pre>INSERT INTO articles_tbl (Title, Author) VALUES ('Installing Filezilla in CentOS 7', 'Gabriel Canepa'), ('How to set up a LAMP server in Debian', 'Dave Null'), ('Enabling EPEL repository in CentOS 6', 'John Doe');\r\n<\/pre>\n<div id=\"attachment_14666\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Populate-Database-Table.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14666\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Populate-Database-Table-620x213.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Populate-Database-Table-620x213.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Populate-Database-Table.png 778w\" alt=\"Populate Database Table\" width=\"620\" height=\"213\" aria-describedby=\"caption-attachment-14666\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14666\" class=\"wp-caption-text\">Populate Database Table<\/p>\n<\/div>\n<h3>Adding symbolic links in the Web Server directory<\/h3>\n<p>Since\u00a0<strong>Netbeans<\/strong>, by default, stores projects in the current user\u2019s home directory, you will need to add symbolic links that point to that location. For example,<\/p>\n<pre>$ sudo ln -s \/home\/gabriel\/NetBeansProjects\/TecmintTest\/public_html \/var\/www\/html\/TecmintTest\r\n<\/pre>\n<p>will add a soft link called\u00a0<strong>TecmintTest<\/strong>\u00a0that points to\u00a0<strong>\/home\/gabriel\/NetBeansProjects\/TecmintTest\/public_html<\/strong>.<\/p>\n<p>For that reason, when you point your browser to\u00a0<strong>http:\/\/localhost\/TecmintTest\/<\/strong>, you will actually see the application that we set up in\u00a0<strong>Part 2<\/strong>:<\/p>\n<div id=\"attachment_14667\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/HTML5-Application.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14667\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/HTML5-Application.png\" alt=\"HTML5 Application\" width=\"483\" height=\"387\" aria-describedby=\"caption-attachment-14667\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14667\" class=\"wp-caption-text\">HTML5 Application<\/p>\n<\/div>\n<h3>Setting up a remote FTP and Web server<\/h3>\n<p>Since you can easily set up a\u00a0<strong>FTP<\/strong>\u00a0and\u00a0<strong>Web server<\/strong>\u00a0with the instructions provided in\u00a0<a href=\"https:\/\/www.tecmint.com\/rhcsa-series-install-and-secure-apache-web-server-and-ftp-in-rhel\/\" target=\"_blank\" rel=\"noopener\">Part 9 \u2013 Install and Configure Secure FTP and Web Server<\/a>\u00a0of the RHCSA series in Tecmint, we will not repeat them here. Please refer to that guide before proceeding further.<\/p>\n<h3>Turning our application into a Dynamic One<\/h3>\n<p>You will probably think that we can\u2019t do much with the sample data that we added to our database earlier, and you are right, but it will be enough to learn the basics of embedding PHP code and the results of queries to a MySQL DB in your HTML5 pages.<\/p>\n<p>First off, we will need to change the extension of the main document of our application to\u00a0<code>.php<\/code>\u00a0instead of\u00a0<strong>html<\/strong>:<\/p>\n<pre># mv \/var\/www\/html\/TecmintTest\/index.html \/var\/www\/html\/TecmintTest\/index.php\r\n<\/pre>\n<p>Then let\u2019s open the project in Netbeans and start doing some modifications.<\/p>\n<p><strong>1.<\/strong>\u00a0Add a folder to the project named\u00a0<strong>includes<\/strong>\u00a0where we will store backend php applications.<\/p>\n<p><strong>2.<\/strong>\u00a0Create a file named\u00a0<code>dbconnection.php<\/code>\u00a0inside\u00a0<strong>includes<\/strong>\u00a0and insert with the following code:<\/p>\n<pre>&lt;?php\r\n    $host = \"<strong>localhost<\/strong>\";\r\n    $username = \"<strong>root<\/strong>\";\r\n    $password = \"<strong>MyFancyP4ssw0rd<\/strong>\";\r\n    $database = \"<strong>tecmint_db<\/strong>\";\r\n\r\n    \/\/Establish a connection with MySQL server\r\n    $mysqli = new mysqli($host, $username, $password,$database);\r\n\r\n    \/* Check connection status. Exit in case of errors. *\/\r\n    if (mysqli_connect_errno()) {\r\n        printf(\"Connect failed: %s\\n\", mysqli_connect_error());\r\n        exit();\r\n    }\r\n    $mysqli -&gt; query(\"SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'\");\r\n\r\n    $records = array();\r\n    $query = \"SELECT Title, Author, SubmissionDate FROM articles_tbl;\";\r\n    $result = $mysqli-&gt;query($query) or die($mysqli-&gt;error);\r\n    $data = array();\r\n\r\n    while ( $row = $result-&gt;fetch_assoc() ){\r\n        $data[] = json_encode($row);\r\n    }\r\n    echo json_encode( $data );\r\n?&gt;\r\n<\/pre>\n<p>as indicated in the following image:<\/p>\n<div id=\"attachment_14669\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Create-Database-Configuration-File.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14669\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Create-Database-Configuration-File-620x256.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Create-Database-Configuration-File-620x256.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Create-Database-Configuration-File.png 992w\" alt=\"Create Database Configuration FileCreate Database Configuration File\" width=\"620\" height=\"256\" aria-describedby=\"caption-attachment-14669\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14669\" class=\"wp-caption-text\">Create Database Configuration File<\/p>\n<\/div>\n<p>This file will be used to connect to the database server, to query it, and to return the results of that query in a JSON-like string to be consumed by the frontend application with a slight modification.<\/p>\n<p>Note that typically you would use separate files to perform each of these operations, but we chose to include all of that functionality in one file for sake of simplicity.<\/p>\n<p><strong>3.<\/strong>\u00a0In\u00a0<code>index.php<\/code>, add the following snippet just beneath the opening\u00a0<strong>body<\/strong>\u00a0tag. That is the jQuery way of calling an external PHP app when the web\u00a0<strong>document<\/strong>\u00a0is\u00a0<strong>ready<\/strong>, or in other words, each time it loads:<\/p>\n<pre>&lt;script&gt;\r\n    $(document).ready(function(){\r\n        $.ajax({\r\n            url: 'includes\/dbconnection.php',\r\n            datatype: 'json',\r\n            type: 'POST',\r\n            success: function(data){\r\n                var output = $.parseJSON(data);\r\n                for(var i =0;i &lt; output.length;i++)\r\n                {\r\n                  var item = output[i];\r\n                  $(\"#title\").append(\"&lt;br&gt;\"+item.Title);\r\n                  $(\"#author\").append(\"&lt;br&gt;\"+item.Author);\r\n                  $(\"#submissiondate\").append(\"&lt;br&gt;\"+item.SubmissionDate);\r\n                }\r\n            }}\r\n        );\r\n    });\r\n&lt;\/script&gt;\r\n<\/pre>\n<div id=\"attachment_14670\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Add-jQuery-Script.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14670\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Add-jQuery-Script-620x237.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Add-jQuery-Script-620x237.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Add-jQuery-Script-1024x391.png 1024w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Add-jQuery-Script.png 1043w\" alt=\"Add jQuery Script\" width=\"620\" height=\"237\" aria-describedby=\"caption-attachment-14670\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14670\" class=\"wp-caption-text\">Add jQuery Script<\/p>\n<\/div>\n<p><strong>4.<\/strong>\u00a0Now, add an unique id (same as inside the for loop above) to each line in the\u00a0<strong>div<\/strong>\u00a0with class\u00a0<strong>row<\/strong>\u00a0at the bottom of\u00a0<strong>index.php<\/strong>:<\/p>\n<pre>&lt;div class=\"row\"&gt;\r\n    &lt;div class=\"col-md-4\" id=\"title\" style=\"text-align: center\"&gt;&lt;strong&gt;Titles&lt;\/strong&gt;&lt;\/div&gt;\r\n    &lt;div class=\"col-md-4\" id=\"author\" style=\"text-align: center\"&gt;&lt;strong&gt;Authors&lt;\/strong&gt;&lt;\/div&gt;\r\n    &lt;div class=\"col-md-4\" id=\"submissiondate\" style=\"text-align: center\"&gt;&lt;strong&gt;Published on:&lt;\/strong&gt;&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>If you now click\u00a0<strong>Run Project<\/strong>, you should see this:<\/p>\n<div id=\"attachment_14671\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Working-Web-Application.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14671\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Working-Web-Application-620x131.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Working-Web-Application-620x131.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Working-Web-Application-1024x217.png 1024w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Working-Web-Application.png 1128w\" alt=\"Working Web Application Preview\" width=\"620\" height=\"131\" aria-describedby=\"caption-attachment-14671\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14671\" class=\"wp-caption-text\">Working Web Application Preview<\/p>\n<\/div>\n<p>Which is essentially the same as the information returned when we ran the query from our MySQL client prompt earlier.<\/p>\n<h3>Deploying to a LAMP server using Filezilla<\/h3>\n<p>Launch\u00a0<strong>Filezilla<\/strong>\u00a0from the\u00a0<strong>Dash<\/strong>\u00a0menu and enter the\u00a0<strong>IP<\/strong>\u00a0of the remote FTP server and your credentials. Then click\u00a0<strong>Quickconnect<\/strong>\u00a0to connect to the\u00a0<strong>FTP<\/strong>\u00a0server:<\/p>\n<div id=\"attachment_14672\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Upload-Files-To-FTP-Server.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14672\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Upload-Files-To-FTP-Server-620x418.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Upload-Files-To-FTP-Server-620x418.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Upload-Files-To-FTP-Server.png 822w\" alt=\"Upload Files To FTP Server\" width=\"620\" height=\"418\" aria-describedby=\"caption-attachment-14672\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14672\" class=\"wp-caption-text\">Deploying Application on Web Server<\/p>\n<\/div>\n<p>Navigate to\u00a0<strong>\/home\/gabriel\/NetBeansProjects\/TecmintTest\/public_html\/<\/strong>, select its contents, right click on them and select\u00a0<strong>Upload<\/strong>.<\/p>\n<p>This, of course, assumes that the remote user indicated in\u00a0<strong>Username<\/strong>\u00a0has write permissions on the remote directory. When the upload is complete, point your browser to the desired location and you should see the same page as before (please note that we have not set up the local MySQL database to the remote host, but you can easily do so following the steps from the beginning of this tutorial).<\/p>\n<div id=\"attachment_14673\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Web-Application-Preview.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14673\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Web-Application-Preview-620x123.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Web-Application-Preview-620x123.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Web-Application-Preview-1024x204.png 1024w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Web-Application-Preview.png 1117w\" alt=\"Web Application Preview\" width=\"620\" height=\"123\" aria-describedby=\"caption-attachment-14673\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14673\" class=\"wp-caption-text\">Web Application Preview<\/p>\n<\/div>\n<h3>Summary<\/h3>\n<p>In this article we have added dynamic functionality to our web application using\u00a0<strong>jQuery<\/strong>\u00a0and a little\u00a0<strong>JavaScript<\/strong>. You can refer to the official\u00a0<a href=\"https:\/\/api.jquery.com\/\" target=\"_blank\" rel=\"noopener\">jQuery docs<\/a>\u00a0for more information, which will be very helpful if you decide to write more complex applications. Wrapping up, we have also deployed our application to a remote\u00a0<strong>LAMP<\/strong>\u00a0server using a\u00a0<strong>FTP<\/strong>\u00a0client.<\/p>\n<p>We are excited to hear your opinion about this article \u2013 feel free to contact us using the form below.<\/p>\n<h1 class=\"post-title\">Tuning Dynamic HTML5 Web Apps Using Open Source Online Tools<\/h1>\n<p>As I begin the last article in this series, it is my hope that you have been able to grasp the importance of HTML 5 and mobile-friendly \/ responsive web development. Regardless of your desktop distribution of choice,\u00a0<strong>Netbeans<\/strong>is a powerful IDE and when used together with basic Linux command-line skills and the tools discussed in\u00a0<a href=\"https:\/\/www.tecmint.com\/create-html5-application-and-deploying-on-remote-web-server-using-ftp\/\" target=\"_blank\" rel=\"noopener\">Part 3<\/a>, can help you to create outstanding applications without much hassle.<\/p>\n<div id=\"attachment_14746\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Tuning-Dynamic-HTML5-Web-Apps.jpeg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14746\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Tuning-Dynamic-HTML5-Web-Apps-620x297.jpeg\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Tuning-Dynamic-HTML5-Web-Apps-620x297.jpeg 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Tuning-Dynamic-HTML5-Web-Apps.jpeg 720w\" alt=\"Tuning Dynamic HTML5 Web Apps\" width=\"620\" height=\"297\" aria-describedby=\"caption-attachment-14746\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14746\" class=\"wp-caption-text\">Tuning Dynamic HTML5 Web Apps \u2013 Part 4<\/p>\n<\/div>\n<p>However, please note that we have only covered the basics of HTML 5 and web development in this series and assumed that you are somewhat familiar with HTML, but the\u00a0<strong>WWW<\/strong>\u00a0is full of great resources \u2013 some of them are FOSS \u2013 to expand on what we\u2019ve shared here.<\/p>\n<p>In this last guide we will talk about some of those tools and show you how to use them to add to the existing page we have been working on Beautifying our UI (user interface).<\/p>\n<p>You will recall from\u00a0<strong>Part 2<\/strong>\u00a0of this series (\u201c<a href=\"https:\/\/www.tecmint.com\/create-mobile-friendly-responsive-web-application-using-jquery\/\" target=\"_blank\" rel=\"noopener\">Adding jQuery and Bootstrap to Write a HTML5 Web Application<\/a>\u201c) that the Bootstrap zip file comes with a directory named fonts. We saved its contents into a folder with the same name inside our project\u2019s\u00a0<strong>SiteRoot<\/strong>:<\/p>\n<div id=\"attachment_14739\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Bootstrap-Fonts.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14739\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Bootstrap-Fonts.png\" alt=\"Bootstrap Fonts\" width=\"350\" height=\"189\" aria-describedby=\"caption-attachment-14739\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14739\" class=\"wp-caption-text\">Bootstrap Fonts<\/p>\n<\/div>\n<p>As you probably can tell from the above image, Bootstrap includes a set of elements called\u00a0<strong>glyphicons<\/strong>, which are no more and no less the built-in components that provide nice-looking icons for buttons and menus in your applications. The complete list of\u00a0<strong>glyphicons<\/strong>\u00a0included in Bootstrap is available at\u00a0<a href=\"https:\/\/getbootstrap.com\/components\/\" target=\"_blank\" rel=\"nofollow noopener\">http:\/\/getbootstrap.com\/components\/<\/a>.<\/p>\n<p>To illustrate the use of\u00a0<strong>glyphicons<\/strong>, let\u2019s add some to the navigation bar in our main page. Modify the navigation bar menus as follows. Please note the space between each closing\u00a0<strong>span<\/strong>\u00a0tag and the menu text:<\/p>\n<pre>&lt;li class=\"active\"&gt;&lt;a href=\"#\"&gt;&lt;span class=\"glyphicon glyphicon-home\" aria-hidden=\"true\"&gt;&lt;\/span&gt; Home&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a href=\"#\"&gt;&lt;span class=\"glyphicon glyphicon-info-sign\" aria-hidden=\"true\"&gt;&lt;\/span&gt; About&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a href=\"#\"&gt;&lt;span class=\"glyphicon glyphicon-envelope\" aria-hidden=\"true\"&gt;&lt;\/span&gt; Contact&lt;\/a&gt;&lt;\/li&gt;\r\n<\/pre>\n<p>(by the way, the\u00a0<code>span<\/code>\u00a0tags are used here to prevent the icons from getting mixed with other components).<\/p>\n<p>And here\u2019s the result:<\/p>\n<div id=\"attachment_14740\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Add-Navigation-Menu.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14740\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Add-Navigation-Menu.png\" alt=\"Add Navigation Menu\" width=\"582\" height=\"223\" aria-describedby=\"caption-attachment-14740\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14740\" class=\"wp-caption-text\">Add Navigation Menu<\/p>\n<\/div>\n<p><strong>Glyphicons<\/strong>, though useful, are also limited. And here\u2019s where\u00a0<strong>Font Awesome<\/strong>\u00a0enters the scene. Font Awesome is an icon \/ font \/ css complete toolkit that has the potential to seamlessly integrate with Bootstrap.<\/p>\n<p>Not only you can add a whole lot of other icons to your pages, but can also resize them, cast shadows, change color, and a many other options using CSS. However, since dealing with CSS is out of the scope of this series, we will only deal with the default-sized icons but encourage you at the same time to \u201c<strong>dig a little deeper<\/strong>\u201d to discover how far this tool can take you.<\/p>\n<p>To download\u00a0<strong>Font Awesome<\/strong>\u00a0and incorporate it into your project, execute the following commands (or feel free to go directly to the project\u2019s web site and download the zip file through your browser and decompress it using GUI tools):<\/p>\n<pre># wget http:\/\/fortawesome.github.io\/Font-Awesome\/assets\/font-awesome-4.3.0.zip\r\n<\/pre>\n<p>(yes, the domain name is actually\u00a0<strong>FortAwesome<\/strong>, with an\u00a0<strong>R<\/strong>, so that is not a typo).<\/p>\n<pre># unzip font-awesome-4.3.0.zip\r\n# cp font-awesome-4.3.0\/css\/font-awesome.min.css \/home\/gabriel\/NetBeansProjects\/TecmintTest\/public_html\/styles\r\n# cp font-awesome-4.3.0\/fonts\/* \/home\/gabriel\/NetBeansProjects\/TecmintTest\/public_html\/fonts\r\n<\/pre>\n<p>And add the\u00a0<code>.css<\/code>\u00a0file to the references list at the top of our page, just like we did with\u00a0<strong>jQuery<\/strong>\u00a0and\u00a0<strong>Bootstrap<\/strong>earlier (remember that you don\u2019t have to type everything \u2013 just drag the file from the\u00a0<strong>Projects<\/strong>\u00a0tab into the code window):<\/p>\n<div id=\"attachment_14742\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Add-Font-Awesome.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14742\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Add-Font-Awesome-620x170.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Add-Font-Awesome-620x170.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Add-Font-Awesome.png 741w\" alt=\"Add Font Awesome\" width=\"620\" height=\"170\" aria-describedby=\"caption-attachment-14742\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14742\" class=\"wp-caption-text\">Add Font Awesome<\/p>\n<\/div>\n<p>Let\u2019s take the\u00a0<strong>dropdown<\/strong>\u00a0list in our navigation bar, for example:<\/p>\n<div id=\"attachment_14743\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Dropdown-List.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14743\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Dropdown-List-620x234.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Dropdown-List-620x234.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/Dropdown-List.png 624w\" alt=\"Dropdown List\" width=\"620\" height=\"234\" aria-describedby=\"caption-attachment-14743\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14743\" class=\"wp-caption-text\">Dropdown List<\/p>\n<\/div>\n<p>Nice, right? All it takes is replacing the contents of the existing\u00a0<code>ul class<\/code>\u00a0named\u00a0<strong>dropdown-menu<\/strong>\u00a0at the bottom of\u00a0<strong>index.php<\/strong>\u00a0with:<\/p>\n<pre>&lt;li&gt;&lt;a href=\"#\"&gt;&lt;i class=\"fa fa-pencil fa-fw\"&gt;&lt;\/i&gt; Edit&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a href=\"#\"&gt;&lt;i class=\"fa fa-trash-o fa-fw\"&gt;&lt;\/i&gt; Delete&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a href=\"#\"&gt;&lt;i class=\"fa fa-ban fa-fw\"&gt;&lt;\/i&gt; Ban&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;li class=\"divider\"&gt;&lt;\/li&gt;\r\n&lt;li&gt;&lt;a href=\"#\"&gt;&lt;i class=\"i\"&gt;&lt;\/i&gt; Make admin&lt;\/a&gt;&lt;\/li&gt;\r\n<\/pre>\n<p>Believe me \u2013 investing your time in learning how to use these tools will be a very rewarding experience.<\/p>\n<h4>Where to Ask for Help<\/h4>\n<p>As an\u00a0<strong>IT<\/strong>\u00a0person, you must be well acquainted with the many resources for help the Internet has made available. Since doing web development is not an exception, here are a few resources that we\u2019re sure you will find useful while tuning your applications.<\/p>\n<p>When dealing with Javascript code (for example, when working with jQuery as we did in\u00a0<strong>Part 2<\/strong>), you will want to use\u00a0<strong>JSHint<\/strong>, an online Javascript quality code checker that aims at helping developers to detect errors and potential problems. When those pitfalls are found,\u00a0<strong>JSHint<\/strong>\u00a0indicates the line number where they are located and gives you hints to fix them:<\/p>\n<div id=\"attachment_14744\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/JSHint-tool.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14744\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/JSHint-tool-620x191.png\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/JSHint-tool-620x191.png 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2015\/07\/JSHint-tool.png 939w\" alt=\"JSHint Tool to Detect Errors\" width=\"620\" height=\"191\" aria-describedby=\"caption-attachment-14744\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-14744\" class=\"wp-caption-text\">JSHint Tool to Detect Errors<\/p>\n<\/div>\n<p>That surely looks great, but even with this great automated tool, there will be times when you will need someone else to take a look at your code and tell you how to fix it or otherwise improve it, which implies sharing it somehow.<\/p>\n<p><strong>JSFiddle<\/strong>\u00a0(an online Javascript \/ CSS \/ HTML code tester) and\u00a0<strong>Bootply<\/strong>\u00a0(same as\u00a0<strong>JSFiddle<\/strong>\u00a0but specialized in Bootstrap code) let you save code snippets (also known as\u00a0<strong>fiddles<\/strong>) and provide you a link to share them very easily over the Internet (either via email with your friends, using your social network profiles, or in forums).<\/p>\n<h3>Summary<\/h3>\n<p>In this article we have provided you with a few tips to tune your web applications and shared some resources that will come in handy if you get stuck or want another pair of eyes (and not just one, but many) to take a look at your code to see how it can be improved. Chances are that you may know of other resources as well. We hope that this series have given you a glimpse of the vast possibilities of mobile-friendly and responsive web development.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/html5-mobile-web-development-using-netbeans-and-java\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Installing Netbeans and Java JDK in Ubuntu and Setting Up a Basic HTML5 Project In this 4-article mobile web development series, we will walk you through setting up\u00a0Netbeans\u00a0as an\u00a0IDE\u00a0(also known as\u00a0Integrated Development Environment) in\u00a0Ubuntu 14.04.2 LTS Trusty Tahr\u00a0to start developing mobile-friendly and responsive HTML5 web applications. HTML5 Mobile Web Development \u2013 Part 1 Following are &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/03\/html5-mobile-web-development\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;HTML5 Mobile Web Development&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-13543","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13543","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=13543"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13543\/revisions"}],"predecessor-version":[{"id":13544,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13543\/revisions\/13544"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=13543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=13543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=13543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}