{"id":2094,"date":"2022-07-06T14:09:10","date_gmt":"2022-07-06T09:09:10","guid":{"rendered":"https:\/\/www.edopedia.com\/blog\/?p=2094"},"modified":"2022-07-06T14:14:38","modified_gmt":"2022-07-06T09:14:38","slug":"build-english-dictionary-app-using-javascript-html5-css3","status":"publish","type":"post","link":"https:\/\/www.edopedia.com\/blog\/build-english-dictionary-app-using-javascript-html5-css3\/","title":{"rendered":"Build English Dictionary App Using JavaScript HTML5 CSS3"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">index.html<\/h2>\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;&gt;\n&lt;head&gt;\n  &lt;meta charset=&quot;UTF-8&quot;&gt;\n  &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt;\n  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;\n  &lt;title&gt;Document&lt;\/title&gt;\n  &lt;style&gt;\n    * {\n\tpadding: 0;\n\tmargin: 0;\n\t-webkit-box-sizing: border-box;\n\tbox-sizing: border-box;\n}\n*:not(i) {\n\tfont-family: &quot;Poppins&quot;, sans-serif;\n}\nbody {\n\tbackground-color: #ae9cff;\n}\n.wrapper {\n\twidth: 92vmin;\n\tposition: absolute;\n\t-webkit-transform: translateX(-50%);\n\t-ms-transform: translateX(-50%);\n\ttransform: translateX(-50%);\n\ttop: 50px;\n\tleft: 50%;\n}\n.container {\n\twidth: 100%;\n\tbackground-color: #ffffff;\n\tpadding: 80px 50px;\n\tborder-radius: 10px;\n\t-webkit-box-shadow: 0 20px 40px rgba(38, 33, 61, 0.2);\n\tbox-shadow: 0 20px 40px rgba(38, 33, 61, 0.2);\n}\na {\n\tpadding: 15px 0;\n\ttext-align: center;\n\ttext-decoration: none;\n\tdisplay: block;\n\twidth: 100%;\n\tbackground-color: #ffffff;\n\tborder-radius: 5px;\n\tcolor: #1f194c;\n\tfont-weight: 600;\n\t-webkit-box-shadow: 0 20px 40px rgba(38, 33, 61, 0.2);\n\tbox-shadow: 0 20px 40px rgba(38, 33, 61, 0.2);\n\tmargin-top: 30px;\n}\n.search-box {\n\twidth: 100%;\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-pack: justify;\n\t-ms-flex-pack: justify;\n\tjustify-content: space-between;\n}\n.search-box input {\n\tpadding: 5px;\n\twidth: 70%;\n\tborder: none;\n\toutline: none;\n\tborder-bottom: 3px solid #ae9cff;\n}\n.search-box button {\n\tpadding: 15px 0;\n\twidth: 25%;\n\tbackground-color: #ae9cff;\n\tborder: none;\n\toutline: none;\n\tcolor: #ffffff;\n\tborder-radius: 5px;\n\tfont-size: 16px;\n}\n.result {\n\tposition: relative;\n}\n.result h3 {\n\tfont-size: 30px;\n\tcolor: #1f194c;\n}\n.result .word {\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-pack: justify;\n\t-ms-flex-pack: justify;\n\tjustify-content: space-between;\n\tmargin-top: 80px;\n}\n.result button {\n\tbackground-color: transparent;\n\tcolor: #ae9cff;\n\tborder: none;\n\toutline: none;\n\tfont-size: 18px;\n}\n.result .details {\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\tgap: 10px;\n\tcolor: #b3b6d4;\n\tmargin: 5px 0 20px 0;\n\tfont-size: 14px;\n}\n.word-meaning {\n\tcolor: #575a7b;\n}\n.word-example {\n\tcolor: #575a7b;\n\tfont-style: italic;\n\tborder-left: 5px solid #ae9cff;\n\tpadding-left: 20px;\n\tmargin-top: 30px;\n\tfont-size: 16px;\n}\n.error {\n\tmargin-top: 80px;\n\ttext-align: center;\n}\n@media screen and (max-width: 768px) {\n\t.container {\n\t\tpadding: 40px 20px;\n\t}\n\t.search-box button {\n\t\tfont-size: 14px;\n\t}\n}\n\n  &lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n  &lt;div class=&quot;wrapper&quot;&gt;\n    &lt;audio id=&quot;sound&quot;&gt;&lt;\/audio&gt;\n    &lt;div class=&quot;container&quot;&gt;\n      &lt;div class=&quot;search-box&quot;&gt;\n        &lt;input type=&quot;text&quot; placeholder=&quot;Type the word here...&quot; id=&quot;inp-word&quot; \/&gt;\n        &lt;button id=&quot;search-btn&quot;&gt;Search&lt;\/button&gt;\n      &lt;\/div&gt;\n      &lt;div id=&quot;result&quot; class=&quot;result&quot;&gt;&lt;\/div&gt;\n    &lt;\/div&gt;\n  &lt;\/div&gt;\n&lt;\/body&gt;\n&lt;script&gt;\n  const url = &quot;https:\/\/api.dictionaryapi.dev\/api\/v2\/entries\/en\/&quot;;\nconst result = document.getElementById(&quot;result&quot;);\nconst sound = document.getElementById(&quot;sound&quot;);\n\nconst btn = document.getElementById(&quot;search-btn&quot;);\nbtn.addEventListener(&quot;click&quot;, () =&gt; {\n\tlet inpWord = document.getElementById(&quot;inp-word&quot;).value;\n\tfetch(`${url}${inpWord}`)\n\t\t.then((response) =&gt; {\n\t\t\treturn response.json();\n\t\t})\n\t\t.then((data) =&gt; {\n\t\t\tresult.innerHTML = `\n  &lt;div class=&quot;word&quot;&gt;\n    &lt;h3&gt;${inpWord}&lt;\/h3&gt;\n    &lt;button onclick=&quot;playSound()&quot;&gt; &lt;i class=&quot;fas fa-volume-up&quot;&gt;&lt;\/i&gt;&lt;\/button&gt;\n  &lt;\/div&gt;\n  &lt;div class=&quot;details&quot;&gt;\n    &lt;p&gt;${data[0].meanings[0].partOfSpeech}&lt;\/p&gt;\n    &lt;p&gt;\/${data[0].phonetic}\/&lt;\/p&gt;\n  &lt;\/div&gt;\n  &lt;p class=&quot;word-meaning&quot;&gt;\n    ${data[0].meanings[0].definitions[0].definition}\n  &lt;\/p&gt;\n  &lt;p class=&quot;word-example&quot;&gt;${\n\t\t\tdata[0].meanings[0].definitions[0].example || &quot;&quot;\n\t\t}&lt;\/p&gt;\n  `;\n\t\t\tsound.setAttribute(&quot;src&quot;, `https:${data[0].phonetics[0].audio}`);\n\t\t})\n\t\t.catch((error) =&gt; {\n\t\t\tresult.innerHTML = `&lt;h3 class=&quot;error&quot;&gt;Couldn't Find The Word!&lt;\/h3&gt;`;\n\t\t});\n});\nfunction playSound() {\n\tsound.play();\n}\n\n&lt;\/script&gt;\n&lt;\/html&gt;<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>index.html<\/p>\n","protected":false},"author":1,"featured_media":2096,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[112],"tags":[],"class_list":["post-2094","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Build English Dictionary App Using JavaScript HTML5 CSS3<\/title>\n<meta name=\"description\" content=\"index.html &lt;!DOCTYPE html&gt; &lt;html lang=&quot;en&quot;&gt; &lt;head&gt; &lt;meta charset=&quot;UTF-8&quot;&gt; &lt;meta\" \/>\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\/build-english-dictionary-app-using-javascript-html5-css3\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Build English Dictionary App Using JavaScript HTML5 CSS3\" \/>\n<meta property=\"og:description\" content=\"index.html &lt;!DOCTYPE html&gt; &lt;html lang=&quot;en&quot;&gt; &lt;head&gt; &lt;meta charset=&quot;UTF-8&quot;&gt; &lt;meta\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.edopedia.com\/blog\/build-english-dictionary-app-using-javascript-html5-css3\/\" \/>\n<meta property=\"og:site_name\" content=\"Edopedia\" \/>\n<meta property=\"article:author\" content=\"trulyfurqan\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-06T09:09:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-06T09:14:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/07\/JavaScript-Project-English-Dictionary-App.png\" \/>\n\t<meta property=\"og:image:width\" content=\"682\" \/>\n\t<meta property=\"og:image:height\" content=\"529\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\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=\"2 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Build English Dictionary App Using JavaScript HTML5 CSS3","description":"index.html &lt;!DOCTYPE html&gt; &lt;html lang=&quot;en&quot;&gt; &lt;head&gt; &lt;meta charset=&quot;UTF-8&quot;&gt; &lt;meta","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\/build-english-dictionary-app-using-javascript-html5-css3\/","og_locale":"en_US","og_type":"article","og_title":"Build English Dictionary App Using JavaScript HTML5 CSS3","og_description":"index.html &lt;!DOCTYPE html&gt; &lt;html lang=&quot;en&quot;&gt; &lt;head&gt; &lt;meta charset=&quot;UTF-8&quot;&gt; &lt;meta","og_url":"https:\/\/www.edopedia.com\/blog\/build-english-dictionary-app-using-javascript-html5-css3\/","og_site_name":"Edopedia","article_author":"trulyfurqan","article_published_time":"2022-07-06T09:09:10+00:00","article_modified_time":"2022-07-06T09:14:38+00:00","og_image":[{"width":682,"height":529,"url":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/07\/JavaScript-Project-English-Dictionary-App.png","type":"image\/png"}],"author":"Furqan","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Furqan","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.edopedia.com\/blog\/build-english-dictionary-app-using-javascript-html5-css3\/#article","isPartOf":{"@id":"https:\/\/www.edopedia.com\/blog\/build-english-dictionary-app-using-javascript-html5-css3\/"},"author":{"name":"Furqan","@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/person\/3951cb19e3aa56df09e408c98aa02339"},"headline":"Build English Dictionary App Using JavaScript HTML5 CSS3","datePublished":"2022-07-06T09:09:10+00:00","dateModified":"2022-07-06T09:14:38+00:00","mainEntityOfPage":{"@id":"https:\/\/www.edopedia.com\/blog\/build-english-dictionary-app-using-javascript-html5-css3\/"},"wordCount":10,"commentCount":0,"publisher":{"@id":"https:\/\/www.edopedia.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.edopedia.com\/blog\/build-english-dictionary-app-using-javascript-html5-css3\/#primaryimage"},"thumbnailUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/07\/JavaScript-Project-English-Dictionary-App.png","articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.edopedia.com\/blog\/build-english-dictionary-app-using-javascript-html5-css3\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.edopedia.com\/blog\/build-english-dictionary-app-using-javascript-html5-css3\/","url":"https:\/\/www.edopedia.com\/blog\/build-english-dictionary-app-using-javascript-html5-css3\/","name":"Build English Dictionary App Using JavaScript HTML5 CSS3","isPartOf":{"@id":"https:\/\/www.edopedia.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.edopedia.com\/blog\/build-english-dictionary-app-using-javascript-html5-css3\/#primaryimage"},"image":{"@id":"https:\/\/www.edopedia.com\/blog\/build-english-dictionary-app-using-javascript-html5-css3\/#primaryimage"},"thumbnailUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/07\/JavaScript-Project-English-Dictionary-App.png","datePublished":"2022-07-06T09:09:10+00:00","dateModified":"2022-07-06T09:14:38+00:00","description":"index.html &lt;!DOCTYPE html&gt; &lt;html lang=&quot;en&quot;&gt; &lt;head&gt; &lt;meta charset=&quot;UTF-8&quot;&gt; &lt;meta","breadcrumb":{"@id":"https:\/\/www.edopedia.com\/blog\/build-english-dictionary-app-using-javascript-html5-css3\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.edopedia.com\/blog\/build-english-dictionary-app-using-javascript-html5-css3\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.edopedia.com\/blog\/build-english-dictionary-app-using-javascript-html5-css3\/#primaryimage","url":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/07\/JavaScript-Project-English-Dictionary-App.png","contentUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/07\/JavaScript-Project-English-Dictionary-App.png","width":682,"height":529,"caption":"Build English Dictionary App Using JavaScript HTML5 CSS3"},{"@type":"BreadcrumbList","@id":"https:\/\/www.edopedia.com\/blog\/build-english-dictionary-app-using-javascript-html5-css3\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.edopedia.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Build English Dictionary App Using JavaScript HTML5 CSS3"}]},{"@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:\/\/secure.gravatar.com\/avatar\/e5e68aef3ad8f0b83d56f4953c512c8e57bd2e6dc64daec33b5d0495d9058f51?s=96&d=mm&r=g","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\/2094","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=2094"}],"version-history":[{"count":0,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/posts\/2094\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/media\/2096"}],"wp:attachment":[{"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/media?parent=2094"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/categories?post=2094"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/tags?post=2094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}