+ 1

Search box

Hello everyone, I am planning to make a web-based dictionary with HTML and CSS, I don't know whether it is possible or not, if not, should I learn PHP? The key point I need is to hide the content and show only a search for for users to input words, after they input a word and Enter, my webpage will show the its meanings. Is it possible to do with HTML? Can you please show me a way to do this?

7th Apr 2018, 2:24 AM
Trần Long Quang
Trần Long Quang - avatar
4 ответов
+ 5
Are you going to add the content yourself. There's a lot of APIs to use https://www.programmableweb.com/category/dictionary/api https://www.wordsapi.com/
7th Apr 2018, 2:38 AM
Toni Isotalo
Toni Isotalo - avatar
+ 3
W3schools has an example of how you can implement the search for words. With respect to using PHP, you can use it to store the words and their definition, but it is not strictly necessary. There are other ways to achieve data persistence now. A point to keep in mind is that if you want to show your code here (in Code Playground) the persistence of data will not be possible (or not directly, since you can always use external scripts). If it is something simple (it does not require persistence of data and you will work with a reasonable finite number of words) the combination of HTML, CSS and Javascript will probably be adequate. https://www.w3schools.com/howto/howto_js_filter_lists.asp
7th Apr 2018, 2:36 AM
Mickel
Mickel - avatar
+ 1
Thank you very much for your advice, I will try it (I have not tried it before because I didn't know how to do).
7th Apr 2018, 2:59 AM
Trần Long Quang
Trần Long Quang - avatar
+ 1
Actually, I don't now what xhr requests but I will check it on the link you gave me.
7th Apr 2018, 3:02 AM
Trần Long Quang
Trần Long Quang - avatar