{"id":3642,"date":"2022-10-07T23:05:54","date_gmt":"2022-10-07T18:05:54","guid":{"rendered":"https:\/\/www.edopedia.com\/blog\/?p=3642"},"modified":"2022-10-07T23:05:57","modified_gmt":"2022-10-07T18:05:57","slug":"make-a-currency-converter-app-using-html5-css3-javascript","status":"publish","type":"post","link":"https:\/\/www.edopedia.com\/blog\/make-a-currency-converter-app-using-html5-css3-javascript\/","title":{"rendered":"Make a Currency Converter App using HTML5, CSS3 &#038; JavaScript"},"content":{"rendered":"\n<p>In this tutorial, I will teach you\u00a0<strong>how to create a currency converter app<\/strong>\u00a0using HTML5, CSS3, and JavaScript. The complete source code of this JavaScript currency converter app is given below.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">JavaScript Currency Converter App Source Code<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">index.html<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">&lt;!DOCTYPE html&gt;\n&lt;html lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;\n  &lt;head&gt;\n    &lt;meta charset=&quot;utf-8&quot;&gt;\n    &lt;title&gt;Currency Converter App in JavaScript&lt;\/title&gt;\n    &lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot;&gt;\n    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;\n    &lt;!-- FontAweome CDN Link for Icons --&gt;\n    &lt;link rel=&quot;stylesheet&quot; href=&quot;https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/font-awesome\/5.15.3\/css\/all.min.css&quot;\/&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;div class=&quot;wrapper&quot;&gt;\n      &lt;header&gt;Currency Converter&lt;\/header&gt;\n      &lt;form action=&quot;#&quot;&gt;\n        &lt;div class=&quot;amount&quot;&gt;\n          &lt;p&gt;Enter Amount&lt;\/p&gt;\n          &lt;input type=&quot;text&quot; value=&quot;1&quot;&gt;\n        &lt;\/div&gt;\n        &lt;div class=&quot;drop-list&quot;&gt;\n          &lt;div class=&quot;from&quot;&gt;\n            &lt;p&gt;From&lt;\/p&gt;\n            &lt;div class=&quot;select-box&quot;&gt;\n              &lt;img src=&quot;https:\/\/flagcdn.com\/48x36\/us.png&quot; alt=&quot;flag&quot;&gt;\n              &lt;select&gt; &lt;!-- Options tag are inserted from JavaScript --&gt; &lt;\/select&gt;\n            &lt;\/div&gt;\n          &lt;\/div&gt;\n          &lt;div class=&quot;icon&quot;&gt;&lt;i class=&quot;fas fa-exchange-alt&quot;&gt;&lt;\/i&gt;&lt;\/div&gt;\n          &lt;div class=&quot;to&quot;&gt;\n            &lt;p&gt;To&lt;\/p&gt;\n            &lt;div class=&quot;select-box&quot;&gt;\n              &lt;img src=&quot;https:\/\/flagcdn.com\/48x36\/np.png&quot; alt=&quot;flag&quot;&gt;\n              &lt;select&gt; &lt;!-- Options tag are inserted from JavaScript --&gt; &lt;\/select&gt;\n            &lt;\/div&gt;\n          &lt;\/div&gt;\n        &lt;\/div&gt;\n        &lt;div class=&quot;exchange-rate&quot;&gt;Getting exchange rate...&lt;\/div&gt;\n        &lt;button&gt;Get Exchange Rate&lt;\/button&gt;\n      &lt;\/form&gt;\n    &lt;\/div&gt;\n\n    &lt;script src=&quot;js\/country-list.js&quot;&gt;&lt;\/script&gt;\n    &lt;script src=&quot;js\/script.js&quot;&gt;&lt;\/script&gt;\n\n  &lt;\/body&gt;\n&lt;\/html&gt;\n<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">style.css<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">\/* Import Google Font - Poppins *\/\n@import url('https:\/\/fonts.googleapis.com\/css2?family=Poppins:wght@400;500;600;700&amp;display=swap');\n*{\n  margin: 0;\n  padding: 0;\n  box-sizing: border-box;\n  font-family: 'Poppins', sans-serif;\n}\nbody{\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  min-height: 100vh;\n  padding: 0 10px;\n  background: #675AFE;\n}\n::selection{\n  color: #fff;\n  background: #675AFE;\n}\n.wrapper{\n  width: 370px;\n  padding: 30px;\n  border-radius: 7px;\n  background: #fff;\n  box-shadow: 7px 7px 20px rgba(0, 0, 0, 0.05);\n}\n.wrapper header{\n  font-size: 28px;\n  font-weight: 500;\n  text-align: center;\n}\n.wrapper form{\n  margin: 40px 0 20px 0;\n}\nform :where(input, select, button){\n  width: 100%;\n  outline: none;\n  border-radius: 5px;\n  border: none;\n}\nform p{\n  font-size: 18px;\n  margin-bottom: 5px;\n}\nform input{\n  height: 50px;\n  font-size: 17px;\n  padding: 0 15px;\n  border: 1px solid #999;\n}\nform input:focus{\n  padding: 0 14px;\n  border: 2px solid #675AFE;\n}\nform .drop-list{\n  display: flex;\n  margin-top: 20px;\n  align-items: center;\n  justify-content: space-between;\n}\n.drop-list .select-box{\n  display: flex;\n  width: 115px;\n  height: 45px;\n  align-items: center;\n  border-radius: 5px;\n  justify-content: center;\n  border: 1px solid #999;\n}\n.select-box img{\n  max-width: 21px;\n}\n.select-box select{\n  width: auto;\n  font-size: 16px;\n  background: none;\n  margin: 0 -5px 0 5px;\n}\n.select-box select::-webkit-scrollbar{\n  width: 8px;\n}\n.select-box select::-webkit-scrollbar-track{\n  background: #fff;\n}\n.select-box select::-webkit-scrollbar-thumb{\n  background: #888;\n  border-radius: 8px;\n  border-right: 2px solid #ffffff;\n}\n.drop-list .icon{\n  cursor: pointer;\n  margin-top: 30px;\n  font-size: 22px;\n}\nform .exchange-rate{\n  font-size: 17px;\n  margin: 20px 0 30px;\n}\nform button{\n  height: 52px;\n  color: #fff;\n  font-size: 17px;\n  cursor: pointer;\n  background: #675AFE;\n  transition: 0.3s ease;\n}\nform button:hover{\n  background: #4534fe;\n}<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">js\/country-list.js<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text\/javascript&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}\">let country_list = {\n    &quot;AED&quot; : &quot;AE&quot;,\n    &quot;AFN&quot; : &quot;AF&quot;,\n    &quot;XCD&quot; : &quot;AG&quot;,\n    &quot;ALL&quot; : &quot;AL&quot;,\n    &quot;AMD&quot; : &quot;AM&quot;,\n    &quot;ANG&quot; : &quot;AN&quot;,\n    &quot;AOA&quot; : &quot;AO&quot;,\n    &quot;AQD&quot; : &quot;AQ&quot;,\n    &quot;ARS&quot; : &quot;AR&quot;,\n    &quot;AUD&quot; : &quot;AU&quot;,\n    &quot;AZN&quot; : &quot;AZ&quot;,\n    &quot;BAM&quot; : &quot;BA&quot;,\n    &quot;BBD&quot; : &quot;BB&quot;,\n    &quot;BDT&quot; : &quot;BD&quot;,\n    &quot;XOF&quot; : &quot;BE&quot;,\n    &quot;BGN&quot; : &quot;BG&quot;,\n    &quot;BHD&quot; : &quot;BH&quot;,\n    &quot;BIF&quot; : &quot;BI&quot;,\n    &quot;BMD&quot; : &quot;BM&quot;,\n    &quot;BND&quot; : &quot;BN&quot;,\n    &quot;BOB&quot; : &quot;BO&quot;,\n    &quot;BRL&quot; : &quot;BR&quot;,\n    &quot;BSD&quot; : &quot;BS&quot;,\n    &quot;NOK&quot; : &quot;BV&quot;,\n    &quot;BWP&quot; : &quot;BW&quot;,\n    &quot;BYR&quot; : &quot;BY&quot;,\n    &quot;BZD&quot; : &quot;BZ&quot;,\n    &quot;CAD&quot; : &quot;CA&quot;,\n    &quot;CDF&quot; : &quot;CD&quot;,\n    &quot;XAF&quot; : &quot;CF&quot;,\n    &quot;CHF&quot; : &quot;CH&quot;,\n    &quot;CLP&quot; : &quot;CL&quot;,\n    &quot;CNY&quot; : &quot;CN&quot;,\n    &quot;COP&quot; : &quot;CO&quot;,\n    &quot;CRC&quot; : &quot;CR&quot;,\n    &quot;CUP&quot; : &quot;CU&quot;,\n    &quot;CVE&quot; : &quot;CV&quot;,\n    &quot;CYP&quot; : &quot;CY&quot;,\n    &quot;CZK&quot; : &quot;CZ&quot;,\n    &quot;DJF&quot; : &quot;DJ&quot;,\n    &quot;DKK&quot; : &quot;DK&quot;,\n    &quot;DOP&quot; : &quot;DO&quot;,\n    &quot;DZD&quot; : &quot;DZ&quot;,\n    &quot;ECS&quot; : &quot;EC&quot;,\n    &quot;EEK&quot; : &quot;EE&quot;,\n    &quot;EGP&quot; : &quot;EG&quot;,\n    &quot;ETB&quot; : &quot;ET&quot;,\n    &quot;EUR&quot; : &quot;FR&quot;,\n    &quot;FJD&quot; : &quot;FJ&quot;,\n    &quot;FKP&quot; : &quot;FK&quot;,\n    &quot;GBP&quot; : &quot;GB&quot;,\n    &quot;GEL&quot; : &quot;GE&quot;,\n    &quot;GGP&quot; : &quot;GG&quot;,\n    &quot;GHS&quot; : &quot;GH&quot;,\n    &quot;GIP&quot; : &quot;GI&quot;,\n    &quot;GMD&quot; : &quot;GM&quot;,\n    &quot;GNF&quot; : &quot;GN&quot;,\n    &quot;GTQ&quot; : &quot;GT&quot;,\n    &quot;GYD&quot; : &quot;GY&quot;,\n    &quot;HKD&quot; : &quot;HK&quot;,\n    &quot;HNL&quot; : &quot;HN&quot;,\n    &quot;HRK&quot; : &quot;HR&quot;,\n    &quot;HTG&quot; : &quot;HT&quot;,\n    &quot;HUF&quot; : &quot;HU&quot;,\n    &quot;IDR&quot; : &quot;ID&quot;,\n    &quot;ILS&quot; : &quot;IL&quot;,\n    &quot;INR&quot; : &quot;IN&quot;,\n    &quot;IQD&quot; : &quot;IQ&quot;,\n    &quot;IRR&quot; : &quot;IR&quot;,\n    &quot;ISK&quot; : &quot;IS&quot;,\n    &quot;JMD&quot; : &quot;JM&quot;,\n    &quot;JOD&quot; : &quot;JO&quot;,\n    &quot;JPY&quot; : &quot;JP&quot;,\n    &quot;KES&quot; : &quot;KE&quot;,\n    &quot;KGS&quot; : &quot;KG&quot;,\n    &quot;KHR&quot; : &quot;KH&quot;,\n    &quot;KMF&quot; : &quot;KM&quot;,\n    &quot;KPW&quot; : &quot;KP&quot;,\n    &quot;KRW&quot; : &quot;KR&quot;,\n    &quot;KWD&quot; : &quot;KW&quot;,\n    &quot;KYD&quot; : &quot;KY&quot;,\n    &quot;KZT&quot; : &quot;KZ&quot;,\n    &quot;LAK&quot; : &quot;LA&quot;,\n    &quot;LBP&quot; : &quot;LB&quot;,\n    &quot;LKR&quot; : &quot;LK&quot;,\n    &quot;LRD&quot; : &quot;LR&quot;,\n    &quot;LSL&quot; : &quot;LS&quot;,\n    &quot;LTL&quot; : &quot;LT&quot;,\n    &quot;LVL&quot; : &quot;LV&quot;,\n    &quot;LYD&quot; : &quot;LY&quot;,\n    &quot;MAD&quot; : &quot;MA&quot;,\n    &quot;MDL&quot; : &quot;MD&quot;,\n    &quot;MGA&quot; : &quot;MG&quot;,\n    &quot;MKD&quot; : &quot;MK&quot;,\n    &quot;MMK&quot; : &quot;MM&quot;,\n    &quot;MNT&quot; : &quot;MN&quot;,\n    &quot;MOP&quot; : &quot;MO&quot;,\n    &quot;MRO&quot; : &quot;MR&quot;,\n    &quot;MTL&quot; : &quot;MT&quot;,\n    &quot;MUR&quot; : &quot;MU&quot;,\n    &quot;MVR&quot; : &quot;MV&quot;,\n    &quot;MWK&quot; : &quot;MW&quot;,\n    &quot;MXN&quot; : &quot;MX&quot;,\n    &quot;MYR&quot; : &quot;MY&quot;,\n    &quot;MZN&quot; : &quot;MZ&quot;,\n    &quot;NAD&quot; : &quot;NA&quot;,\n    &quot;XPF&quot; : &quot;NC&quot;,\n    &quot;NGN&quot; : &quot;NG&quot;,\n    &quot;NIO&quot; : &quot;NI&quot;,\n    &quot;NPR&quot; : &quot;NP&quot;,\n    &quot;NZD&quot; : &quot;NZ&quot;,\n    &quot;OMR&quot; : &quot;OM&quot;,\n    &quot;PAB&quot; : &quot;PA&quot;,\n    &quot;PEN&quot; : &quot;PE&quot;,\n    &quot;PGK&quot; : &quot;PG&quot;,\n    &quot;PHP&quot; : &quot;PH&quot;,\n    &quot;PKR&quot; : &quot;PK&quot;,\n    &quot;PLN&quot; : &quot;PL&quot;,\n    &quot;PYG&quot; : &quot;PY&quot;,\n    &quot;QAR&quot; : &quot;QA&quot;,\n    &quot;RON&quot; : &quot;RO&quot;,\n    &quot;RSD&quot; : &quot;RS&quot;,\n    &quot;RUB&quot; : &quot;RU&quot;,\n    &quot;RWF&quot; : &quot;RW&quot;,\n    &quot;SAR&quot; : &quot;SA&quot;,\n    &quot;SBD&quot; : &quot;SB&quot;,\n    &quot;SCR&quot; : &quot;SC&quot;,\n    &quot;SDG&quot; : &quot;SD&quot;,\n    &quot;SEK&quot; : &quot;SE&quot;,\n    &quot;SGD&quot; : &quot;SG&quot;,\n    &quot;SKK&quot; : &quot;SK&quot;,\n    &quot;SLL&quot; : &quot;SL&quot;,\n    &quot;SOS&quot; : &quot;SO&quot;,\n    &quot;SRD&quot; : &quot;SR&quot;,\n    &quot;STD&quot; : &quot;ST&quot;,\n    &quot;SVC&quot; : &quot;SV&quot;,\n    &quot;SYP&quot; : &quot;SY&quot;,\n    &quot;SZL&quot; : &quot;SZ&quot;,\n    &quot;THB&quot; : &quot;TH&quot;,\n    &quot;TJS&quot; : &quot;TJ&quot;,\n    &quot;TMT&quot; : &quot;TM&quot;,\n    &quot;TND&quot; : &quot;TN&quot;,\n    &quot;TOP&quot; : &quot;TO&quot;,\n    &quot;TRY&quot; : &quot;TR&quot;,\n    &quot;TTD&quot; : &quot;TT&quot;,\n    &quot;TWD&quot; : &quot;TW&quot;,\n    &quot;TZS&quot; : &quot;TZ&quot;,\n    &quot;UAH&quot; : &quot;UA&quot;,\n    &quot;UGX&quot; : &quot;UG&quot;,\n    &quot;USD&quot; : &quot;US&quot;,\n    &quot;UYU&quot; : &quot;UY&quot;,\n    &quot;UZS&quot; : &quot;UZ&quot;,\n    &quot;VEF&quot; : &quot;VE&quot;,\n    &quot;VND&quot; : &quot;VN&quot;,\n    &quot;VUV&quot; : &quot;VU&quot;,\n    &quot;YER&quot; : &quot;YE&quot;,\n    &quot;ZAR&quot; : &quot;ZA&quot;,\n    &quot;ZMK&quot; : &quot;ZM&quot;,\n    &quot;ZWD&quot; : &quot;ZW&quot;\n}\n<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">js\/script.js<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text\/javascript&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}\">const dropList = document.querySelectorAll(&quot;form select&quot;),\nfromCurrency = document.querySelector(&quot;.from select&quot;),\ntoCurrency = document.querySelector(&quot;.to select&quot;),\ngetButton = document.querySelector(&quot;form button&quot;);\n\nfor (let i = 0; i &lt; dropList.length; i++) {\n    for(let currency_code in country_list){\n        \/\/ selecting USD by default as FROM currency and NPR as TO currency\n        let selected = i == 0 ? currency_code == &quot;USD&quot; ? &quot;selected&quot; : &quot;&quot; : currency_code == &quot;NPR&quot; ? &quot;selected&quot; : &quot;&quot;;\n        \/\/ creating option tag with passing currency code as a text and value\n        let optionTag = `&lt;option value=&quot;${currency_code}&quot; ${selected}&gt;${currency_code}&lt;\/option&gt;`;\n        \/\/ inserting options tag inside select tag\n        dropList[i].insertAdjacentHTML(&quot;beforeend&quot;, optionTag);\n    }\n    dropList[i].addEventListener(&quot;change&quot;, e =&gt;{\n        loadFlag(e.target); \/\/ calling loadFlag with passing target element as an argument\n    });\n}\n\nfunction loadFlag(element){\n    for(let code in country_list){\n        if(code == element.value){ \/\/ if currency code of country list is equal to option value\n            let imgTag = element.parentElement.querySelector(&quot;img&quot;); \/\/ selecting img tag of particular drop list\n            \/\/ passing country code of a selected currency code in a img url\n            imgTag.src = `https:\/\/flagcdn.com\/48x36\/${country_list[code].toLowerCase()}.png`;\n        }\n    }\n}\n\nwindow.addEventListener(&quot;load&quot;, ()=&gt;{\n    getExchangeRate();\n});\n\ngetButton.addEventListener(&quot;click&quot;, e =&gt;{\n    e.preventDefault(); \/\/preventing form from submitting\n    getExchangeRate();\n});\n\nconst exchangeIcon = document.querySelector(&quot;form .icon&quot;);\nexchangeIcon.addEventListener(&quot;click&quot;, ()=&gt;{\n    let tempCode = fromCurrency.value; \/\/ temporary currency code of FROM drop list\n    fromCurrency.value = toCurrency.value; \/\/ passing TO currency code to FROM currency code\n    toCurrency.value = tempCode; \/\/ passing temporary currency code to TO currency code\n    loadFlag(fromCurrency); \/\/ calling loadFlag with passing select element (fromCurrency) of FROM\n    loadFlag(toCurrency); \/\/ calling loadFlag with passing select element (toCurrency) of TO\n    getExchangeRate(); \/\/ calling getExchangeRate\n})\n\nfunction getExchangeRate(){\n    const amount = document.querySelector(&quot;form input&quot;);\n    const exchangeRateTxt = document.querySelector(&quot;form .exchange-rate&quot;);\n    let amountVal = amount.value;\n    \/\/ if user don't enter any value or enter 0 then we'll put 1 value by default in the input field\n    if(amountVal == &quot;&quot; || amountVal == &quot;0&quot;){\n        amount.value = &quot;1&quot;;\n        amountVal = 1;\n    }\n    exchangeRateTxt.innerText = &quot;Getting exchange rate...&quot;;\n    let url = `https:\/\/v6.exchangerate-api.com\/v6\/YOUR-API-KEY\/latest\/${fromCurrency.value}`;\n    \/\/ fetching api response and returning it with parsing into js obj and in another then method receiving that obj\n    fetch(url).then(response =&gt; response.json()).then(result =&gt;{\n        let exchangeRate = result.conversion_rates[toCurrency.value]; \/\/ getting user selected TO currency rate\n        let totalExRate = (amountVal * exchangeRate).toFixed(2); \/\/ multiplying user entered value with selected TO currency rate\n        exchangeRateTxt.innerText = `${amountVal} ${fromCurrency.value} = ${totalExRate} ${toCurrency.value}`;\n    }).catch(() =&gt;{ \/\/ if user is offline or any other error occured while fetching data then catch function will run\n        exchangeRateTxt.innerText = &quot;Something went wrong&quot;;\n    });\n}<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, I will teach you\u00a0how to create a currency converter app\u00a0using HTML5, CSS3, and JavaScript. The complete source code of this JavaScript currency converter app is given below. JavaScript Currency Converter App Source Code index.html style.css js\/country-list.js js\/script.js<\/p>\n","protected":false},"author":1,"featured_media":3644,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[112],"tags":[],"class_list":["post-3642","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Make a Currency Converter App using HTML5, CSS3 &amp; JavaScript<\/title>\n<meta name=\"description\" content=\"In this tutorial, I will teach you\u00a0how to create a currency converter app\u00a0using HTML5, CSS3, and JavaScript. The complete source code of this JavaScript\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.edopedia.com\/blog\/make-a-currency-converter-app-using-html5-css3-javascript\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Make a Currency Converter App using HTML5, CSS3 &amp; JavaScript\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, I will teach you\u00a0how to create a currency converter app\u00a0using HTML5, CSS3, and JavaScript. The complete source code of this JavaScript\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.edopedia.com\/blog\/make-a-currency-converter-app-using-html5-css3-javascript\/\" \/>\n<meta property=\"og:site_name\" content=\"Edopedia\" \/>\n<meta property=\"article:author\" content=\"trulyfurqan\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-07T18:05:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-10-07T18:05:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/10\/Build-A-Currency-Converter-App-in-HTML-CSS-JavaScript.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"880\" \/>\n\t<meta property=\"og:image:height\" content=\"495\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Furqan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Furqan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Make a Currency Converter App using HTML5, CSS3 & JavaScript","description":"In this tutorial, I will teach you\u00a0how to create a currency converter app\u00a0using HTML5, CSS3, and JavaScript. The complete source code of this JavaScript","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.edopedia.com\/blog\/make-a-currency-converter-app-using-html5-css3-javascript\/","og_locale":"en_US","og_type":"article","og_title":"Make a Currency Converter App using HTML5, CSS3 & JavaScript","og_description":"In this tutorial, I will teach you\u00a0how to create a currency converter app\u00a0using HTML5, CSS3, and JavaScript. The complete source code of this JavaScript","og_url":"https:\/\/www.edopedia.com\/blog\/make-a-currency-converter-app-using-html5-css3-javascript\/","og_site_name":"Edopedia","article_author":"trulyfurqan","article_published_time":"2022-10-07T18:05:54+00:00","article_modified_time":"2022-10-07T18:05:57+00:00","og_image":[{"width":880,"height":495,"url":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/10\/Build-A-Currency-Converter-App-in-HTML-CSS-JavaScript.jpg","type":"image\/jpeg"}],"author":"Furqan","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Furqan","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.edopedia.com\/blog\/make-a-currency-converter-app-using-html5-css3-javascript\/#article","isPartOf":{"@id":"https:\/\/www.edopedia.com\/blog\/make-a-currency-converter-app-using-html5-css3-javascript\/"},"author":{"name":"Furqan","@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/person\/3951cb19e3aa56df09e408c98aa02339"},"headline":"Make a Currency Converter App using HTML5, CSS3 &#038; JavaScript","datePublished":"2022-10-07T18:05:54+00:00","dateModified":"2022-10-07T18:05:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.edopedia.com\/blog\/make-a-currency-converter-app-using-html5-css3-javascript\/"},"wordCount":57,"commentCount":0,"publisher":{"@id":"https:\/\/www.edopedia.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.edopedia.com\/blog\/make-a-currency-converter-app-using-html5-css3-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/10\/Build-A-Currency-Converter-App-in-HTML-CSS-JavaScript.jpg","articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.edopedia.com\/blog\/make-a-currency-converter-app-using-html5-css3-javascript\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.edopedia.com\/blog\/make-a-currency-converter-app-using-html5-css3-javascript\/","url":"https:\/\/www.edopedia.com\/blog\/make-a-currency-converter-app-using-html5-css3-javascript\/","name":"Make a Currency Converter App using HTML5, CSS3 & JavaScript","isPartOf":{"@id":"https:\/\/www.edopedia.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.edopedia.com\/blog\/make-a-currency-converter-app-using-html5-css3-javascript\/#primaryimage"},"image":{"@id":"https:\/\/www.edopedia.com\/blog\/make-a-currency-converter-app-using-html5-css3-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/10\/Build-A-Currency-Converter-App-in-HTML-CSS-JavaScript.jpg","datePublished":"2022-10-07T18:05:54+00:00","dateModified":"2022-10-07T18:05:57+00:00","description":"In this tutorial, I will teach you\u00a0how to create a currency converter app\u00a0using HTML5, CSS3, and JavaScript. The complete source code of this JavaScript","breadcrumb":{"@id":"https:\/\/www.edopedia.com\/blog\/make-a-currency-converter-app-using-html5-css3-javascript\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.edopedia.com\/blog\/make-a-currency-converter-app-using-html5-css3-javascript\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.edopedia.com\/blog\/make-a-currency-converter-app-using-html5-css3-javascript\/#primaryimage","url":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/10\/Build-A-Currency-Converter-App-in-HTML-CSS-JavaScript.jpg","contentUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/10\/Build-A-Currency-Converter-App-in-HTML-CSS-JavaScript.jpg","width":880,"height":495,"caption":"Make a Currency Converter App using HTML5, CSS3 & JavaScript"},{"@type":"BreadcrumbList","@id":"https:\/\/www.edopedia.com\/blog\/make-a-currency-converter-app-using-html5-css3-javascript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.edopedia.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Make a Currency Converter App using HTML5, CSS3 &#038; JavaScript"}]},{"@type":"WebSite","@id":"https:\/\/www.edopedia.com\/blog\/#website","url":"https:\/\/www.edopedia.com\/blog\/","name":"Edopedia","description":"Coding\/Programming Blog","publisher":{"@id":"https:\/\/www.edopedia.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.edopedia.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.edopedia.com\/blog\/#organization","name":"Edopedia","url":"https:\/\/www.edopedia.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2017\/10\/edopedia_icon_text_10.jpg","contentUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2017\/10\/edopedia_icon_text_10.jpg","width":400,"height":100,"caption":"Edopedia"},"image":{"@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/person\/3951cb19e3aa56df09e408c98aa02339","name":"Furqan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e5e68aef3ad8f0b83d56f4953c512c8e57bd2e6dc64daec33b5d0495d9058f51?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e5e68aef3ad8f0b83d56f4953c512c8e57bd2e6dc64daec33b5d0495d9058f51?s=96&d=mm&r=g","caption":"Furqan"},"description":"Well. I've been working for the past three years as a web designer and developer. I have successfully created websites for small to medium sized companies as part of my freelance career. During that time I've also completed my bachelor's in Information Technology.","sameAs":["http:\/\/www.edopedia.com\/blog\/","trulyfurqan"],"url":"https:\/\/www.edopedia.com\/blog\/author\/furqan\/"}]}},"_links":{"self":[{"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/posts\/3642","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/comments?post=3642"}],"version-history":[{"count":1,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/posts\/3642\/revisions"}],"predecessor-version":[{"id":3643,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/posts\/3642\/revisions\/3643"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/media\/3644"}],"wp:attachment":[{"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/media?parent=3642"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/categories?post=3642"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/tags?post=3642"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}