{"id":982,"date":"2023-11-21T17:11:00","date_gmt":"2023-11-21T15:11:00","guid":{"rendered":"https:\/\/html-online.com\/articles\/?p=982"},"modified":"2024-09-13T09:25:04","modified_gmt":"2024-09-13T06:25:04","slug":"website-search-box-with-dropdown-tooltip-suggestions","status":"publish","type":"post","link":"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/","title":{"rendered":"Website Search Box with Dropdown Tooltip Suggestions"},"content":{"rendered":"<p><strong>Search functionality is crucial to improve the user experience, making navigation on the website much easier. This functionality is built into WordPress and almost every other CMS, but in this article I&#8217;m going to present a custom and very lightweight <a href=\"https:\/\/html-css-js.com\/\" target=\"_blank\" rel=\"external nofollow noopener\">HTML-CSS-JS-jQuery<\/a> solution that is very easy to implement.<\/strong><\/p>\n<p class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/html-online.com\/demo\/website-search\/website-search-tooltip-dropdown.jpg\" alt=\"website search input tooltip dropdown\"><\/p>\n<p><!--more--><\/p>\n<p>This will be a great <a href=\"https:\/\/cse.google.com\/cse\/\" target=\"_blank\" rel=\"external nofollow noopener\">Google Custom Search<\/a> alternative or you can customize the code according to your needs. Try the <a href=\"https:\/\/html-online.com\/demo\/website-search\/\" target=\"_blank\" rel=\"external nofollow noopener\">live demo<\/a> here or visit the <a href=\"https:\/\/ruwix.com\/\" target=\"_blank\" rel=\"external nofollow noopener\">Rubik&#8217;s Cube Wiki<\/a> to see it on a live site.<\/p>\n<p>You are welcome to copy, edit and publish this code for free but please do link back to our website if you use it.<\/p>\n<h2>HTML Code<\/h2>\n<p>We need to wrap everything into a div element that can be displayed as an inline block. We need a close button to erase the input, hide the dropdown and reset the search. Next is an input field and another div that will be populated with the suggested liks.<\/p>\n<pre style=\"color: #000000; background: #ffffff;\"><span style=\"color: #a65700;\">&lt;<\/span><span style=\"color: #800000; font-weight: bold;\">div<\/span> <span style=\"color: #074726;\">id<\/span><span style=\"color: #808030;\">=<\/span><span style=\"color: #0000e6;\">\"wrapTooltipSearch\"<\/span><span style=\"color: #a65700;\">&gt;<\/span>\n\t<span style=\"color: #a65700;\">&lt;<\/span><span style=\"color: #800000; font-weight: bold;\">div<\/span> <span style=\"color: #074726;\">id<\/span><span style=\"color: #808030;\">=<\/span><span style=\"color: #0000e6;\">\"abortTooltipSearch\"<\/span><span style=\"color: #a65700;\">&gt;<\/span>\n\t\t&amp;times;\n\t<span style=\"color: #a65700;\">&lt;\/<\/span><span style=\"color: #800000; font-weight: bold;\">div<\/span><span style=\"color: #a65700;\">&gt;<\/span>\n\t<span style=\"color: #a65700;\">&lt;<\/span><span style=\"color: #800000; font-weight: bold;\">input<\/span> <span style=\"color: #074726;\">type<\/span><span style=\"color: #808030;\">=<\/span><span style=\"color: #0000e6;\">\"text\"<\/span> <span style=\"color: #074726;\">id<\/span><span style=\"color: #808030;\">=<\/span><span style=\"color: #0000e6;\">\"tooltipSearch\"<\/span> <span style=\"color: #074726;\">placeholder<\/span><span style=\"color: #808030;\">=<\/span><span style=\"color: #0000e6;\">\"Search...\"<\/span> <span style=\"color: #a65700;\">\/&gt;<\/span>\n\t<span style=\"color: #a65700;\">&lt;<\/span><span style=\"color: #800000; font-weight: bold;\">div<\/span> <span style=\"color: #074726;\">id<\/span><span style=\"color: #808030;\">=<\/span><span style=\"color: #0000e6;\">\"tooltipSearchSuggestions\"<\/span><span style=\"color: #a65700;\">&gt;<\/span>\n\t<span style=\"color: #a65700;\">&lt;\/<\/span><span style=\"color: #800000; font-weight: bold;\">div<\/span><span style=\"color: #a65700;\">&gt;<\/span>\n<span style=\"color: #a65700;\">&lt;\/<\/span><span style=\"color: #800000; font-weight: bold;\">div<\/span><span style=\"color: #a65700;\">&gt;<\/span>\n<\/pre>\n<h2>JavaScript<\/h2>\n<p>The JavaScript is using jQuery library and it&#8217;s less than 50 uncompressed lines. It&#8217;s parsing the targeted section on the website and collects all links. In this case it parses the links in the <strong>.navigation<\/strong> div. Make sure to change this according to your requirements.<\/p>\n<pre style=\"color: #000000; background: #ffffff;\"><span style=\"color: #800000; font-weight: bold;\">var<\/span> ttLinks <span style=\"color: #808030;\">=<\/span> <span style=\"color: #808030;\">[<\/span><span style=\"color: #008c00;\">0<\/span><span style=\"color: #808030;\">,<\/span> <span style=\"color: #008c00;\">1<\/span><span style=\"color: #808030;\">]<\/span><span style=\"color: #800080;\">;<\/span>\n<span style=\"color: #800000; font-weight: bold;\">var<\/span> ttAnchors <span style=\"color: #808030;\">=<\/span> <span style=\"color: #808030;\">[<\/span><span style=\"color: #008c00;\">0<\/span><span style=\"color: #808030;\">,<\/span> <span style=\"color: #008c00;\">1<\/span><span style=\"color: #808030;\">]<\/span><span style=\"color: #800080;\">;<\/span>\n<span style=\"color: #800000; font-weight: bold;\">var<\/span> i<span style=\"color: #800080;\">;<\/span>\n$<span style=\"color: #808030;\">(<\/span>document<span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">.<\/span>ready<span style=\"color: #808030;\">(<\/span><span style=\"color: #800000; font-weight: bold;\">function<\/span><span style=\"color: #808030;\">(<\/span><span style=\"color: #808030;\">)<\/span> <span style=\"color: #800080;\">{<\/span>\n\ti <span style=\"color: #808030;\">=<\/span> <span style=\"color: #008c00;\">0<\/span><span style=\"color: #800080;\">;<\/span>\n\t$<span style=\"color: #808030;\">(<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #0000e6;\">.navigation a<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">.<\/span>each<span style=\"color: #808030;\">(<\/span><span style=\"color: #800000; font-weight: bold;\">function<\/span><span style=\"color: #808030;\">(<\/span><span style=\"color: #808030;\">)<\/span> <span style=\"color: #800080;\">{<\/span>\n\t\tttLinks<span style=\"color: #808030;\">[<\/span>i<span style=\"color: #808030;\">]<\/span> <span style=\"color: #808030;\">=<\/span> $<span style=\"color: #808030;\">(<\/span><span style=\"color: #800000; font-weight: bold;\">this<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">.<\/span>attr<span style=\"color: #808030;\">(<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #0000e6;\">href<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #800080;\">;<\/span>\n\t\tttAnchors<span style=\"color: #808030;\">[<\/span>i<span style=\"color: #808030;\">]<\/span> <span style=\"color: #808030;\">=<\/span> $<span style=\"color: #808030;\">(<\/span><span style=\"color: #800000; font-weight: bold;\">this<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">.<\/span>text<span style=\"color: #808030;\">(<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #800080;\">;<\/span>\n\t\ti<span style=\"color: #808030;\">++<\/span><span style=\"color: #800080;\">;<\/span>\n\t\tconsole<span style=\"color: #808030;\">.<\/span><span style=\"color: #800000; font-weight: bold;\">log<\/span><span style=\"color: #808030;\">(<\/span>ttLinks<span style=\"color: #808030;\">[<\/span>i<span style=\"color: #808030;\">]<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #800080;\">;<\/span>\n\t\tconsole<span style=\"color: #808030;\">.<\/span><span style=\"color: #800000; font-weight: bold;\">log<\/span><span style=\"color: #808030;\">(<\/span>ttAnchors<span style=\"color: #808030;\">[<\/span>i<span style=\"color: #808030;\">]<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #800080;\">;<\/span>\n\t<span style=\"color: #800080;\">}<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #800080;\">;<\/span>\n\t$<span style=\"color: #808030;\">(<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #0000e6;\">#abortTooltipSearch<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">.<\/span>click<span style=\"color: #808030;\">(<\/span><span style=\"color: #800000; font-weight: bold;\">function<\/span><span style=\"color: #808030;\">(<\/span><span style=\"color: #808030;\">)<\/span> <span style=\"color: #800080;\">{<\/span>\n\t\t$<span style=\"color: #808030;\">(<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #0000e6;\">#tooltipSearch<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">.<\/span>val<span style=\"color: #808030;\">(<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #800080;\">;<\/span>\n\t\tupdateTooltipSearch<span style=\"color: #808030;\">(<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #800080;\">;<\/span>\n\t<span style=\"color: #800080;\">}<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #800080;\">;<\/span>\n\t$<span style=\"color: #808030;\">(<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #0000e6;\">#tooltipSearch<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">.<\/span>keyup<span style=\"color: #808030;\">(<\/span><span style=\"color: #800000; font-weight: bold;\">function<\/span><span style=\"color: #808030;\">(<\/span><span style=\"color: #808030;\">)<\/span> <span style=\"color: #800080;\">{<\/span>\n\t\tupdateTooltipSearch<span style=\"color: #808030;\">(<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #800080;\">;<\/span>\n\t<span style=\"color: #800080;\">}<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #800080;\">;<\/span>\n\t$<span style=\"color: #808030;\">(<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #0000e6;\">#tooltipSearch<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">.<\/span>change<span style=\"color: #808030;\">(<\/span><span style=\"color: #800000; font-weight: bold;\">function<\/span><span style=\"color: #808030;\">(<\/span><span style=\"color: #808030;\">)<\/span> <span style=\"color: #800080;\">{<\/span>\n\t\tupdateTooltipSearch<span style=\"color: #808030;\">(<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #800080;\">;<\/span>\n\t<span style=\"color: #800080;\">}<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #800080;\">;<\/span>\n<span style=\"color: #800080;\">}<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #800080;\">;<\/span>\n<span style=\"color: #800000; font-weight: bold;\">function<\/span> updateTooltipSearch<span style=\"color: #808030;\">(<\/span><span style=\"color: #808030;\">)<\/span> <span style=\"color: #800080;\">{<\/span>\n\t<span style=\"color: #800000; font-weight: bold;\">var<\/span> squery <span style=\"color: #808030;\">=<\/span> $<span style=\"color: #808030;\">(<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #0000e6;\">#tooltipSearch<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">.<\/span>val<span style=\"color: #808030;\">(<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">.<\/span><span style=\"color: #800000; font-weight: bold;\">toLowerCase<\/span><span style=\"color: #808030;\">(<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #800080;\">;<\/span>\t\n\t<span style=\"color: #800000; font-weight: bold;\">var<\/span> tooltips <span style=\"color: #808030;\">=<\/span> <span style=\"color: #800000;\">'<\/span><span style=\"color: #800000;\">'<\/span><span style=\"color: #800080;\">;<\/span>\n\t<span style=\"color: #800000; font-weight: bold;\">var<\/span> results <span style=\"color: #808030;\">=<\/span> <span style=\"color: #008c00;\">0<\/span><span style=\"color: #800080;\">;<\/span>\n\t<span style=\"color: #800000; font-weight: bold;\">if<\/span> <span style=\"color: #808030;\">(<\/span>squery<span style=\"color: #808030;\">.<\/span><span style=\"color: #800000; font-weight: bold;\">length<\/span> <span style=\"color: #808030;\">&gt;<\/span> <span style=\"color: #008c00;\">1<\/span><span style=\"color: #808030;\">)<\/span> <span style=\"color: #800080;\">{<\/span>\n\t\t<span style=\"color: #800000; font-weight: bold;\">for<\/span> <span style=\"color: #808030;\">(<\/span>i <span style=\"color: #808030;\">=<\/span> <span style=\"color: #008c00;\">0<\/span><span style=\"color: #800080;\">;<\/span> i <span style=\"color: #808030;\">&lt;<\/span> ttLinks<span style=\"color: #808030;\">.<\/span><span style=\"color: #800000; font-weight: bold;\">length<\/span><span style=\"color: #800080;\">;<\/span> i<span style=\"color: #808030;\">++<\/span><span style=\"color: #808030;\">)<\/span> <span style=\"color: #800080;\">{<\/span>\n\t\t\t<span style=\"color: #800000; font-weight: bold;\">if<\/span> <span style=\"color: #808030;\">(<\/span> <span style=\"color: #808030;\">(<\/span>ttAnchors<span style=\"color: #808030;\">[<\/span>i<span style=\"color: #808030;\">]<\/span><span style=\"color: #808030;\">.<\/span><span style=\"color: #800000; font-weight: bold;\">toLowerCase<\/span><span style=\"color: #808030;\">(<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">.<\/span>includes<span style=\"color: #808030;\">(<\/span>squery<span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">)<\/span> <span style=\"color: #808030;\">||<\/span> <span style=\"color: #808030;\">(<\/span>ttLinks<span style=\"color: #808030;\">[<\/span>i<span style=\"color: #808030;\">]<\/span><span style=\"color: #808030;\">.<\/span><span style=\"color: #800000; font-weight: bold;\">toLowerCase<\/span><span style=\"color: #808030;\">(<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">.<\/span>includes<span style=\"color: #808030;\">(<\/span>squery<span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">)<\/span> <span style=\"color: #800080;\">{<\/span>\n\t\t\t\ttooltips <span style=\"color: #808030;\">+=<\/span> <span style=\"color: #800000;\">'<\/span><span style=\"color: #0000e6;\">&lt;a href=\"<\/span><span style=\"color: #800000;\">'<\/span> <span style=\"color: #808030;\">+<\/span> ttLinks<span style=\"color: #808030;\">[<\/span>i<span style=\"color: #808030;\">]<\/span> <span style=\"color: #808030;\">+<\/span> <span style=\"color: #800000;\">'<\/span><span style=\"color: #0000e6;\">\"&gt;<\/span><span style=\"color: #800000;\">'<\/span> <span style=\"color: #808030;\">+<\/span> ttAnchors<span style=\"color: #808030;\">[<\/span>i<span style=\"color: #808030;\">]<\/span> <span style=\"color: #808030;\">+<\/span><span style=\"color: #800000;\">'<\/span><span style=\"color: #0000e6;\">&lt;\/a&gt;<\/span><span style=\"color: #800000;\">'<\/span><span style=\"color: #800080;\">;<\/span>\n\t\t\t\tresults <span style=\"color: #808030;\">++<\/span><span style=\"color: #800080;\">;<\/span>\n\t\t\t<span style=\"color: #800080;\">}<\/span>\n\t\t<span style=\"color: #800080;\">}<\/span>\n\t\t<span style=\"color: #800000; font-weight: bold;\">if<\/span> <span style=\"color: #808030;\">(<\/span>results <span style=\"color: #808030;\">==<\/span> <span style=\"color: #008c00;\">0<\/span><span style=\"color: #808030;\">)<\/span> <span style=\"color: #800080;\">{<\/span>\n\t\t\ttooltips <span style=\"color: #808030;\">=<\/span> <span style=\"color: #800000;\">\"<\/span><span style=\"color: #0000e6;\">&lt;em&gt;&lt;strong&gt;No results&lt;\/strong&gt;&lt;br \/&gt;Try something else.&lt;\/em&gt;<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #800080;\">;<\/span>\n\t\t<span style=\"color: #800080;\">}<\/span>\n\t\t$<span style=\"color: #808030;\">(<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #0000e6;\">#tooltipSearchSuggestions, #abortTooltipSearch<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">.<\/span>fadeIn<span style=\"color: #808030;\">(<\/span><span style=\"color: #008c00;\">222<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #800080;\">;<\/span>\n\t<span style=\"color: #800080;\">}<\/span> <span style=\"color: #800000; font-weight: bold;\">else<\/span> <span style=\"color: #800080;\">{<\/span>\n\t\t<span style=\"color: #800000; font-weight: bold;\">if<\/span> <span style=\"color: #808030;\">(<\/span>squery<span style=\"color: #808030;\">.<\/span><span style=\"color: #800000; font-weight: bold;\">length<\/span> <span style=\"color: #808030;\">==<\/span> <span style=\"color: #008c00;\">0<\/span><span style=\"color: #808030;\">)<\/span> <span style=\"color: #800080;\">{<\/span>\n\t\t\t$<span style=\"color: #808030;\">(<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #0000e6;\">#tooltipSearchSuggestions, #abortTooltipSearch<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">.<\/span>fadeOut<span style=\"color: #808030;\">(<\/span><span style=\"color: #008c00;\">222<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #800080;\">;<\/span>\n\t\t<span style=\"color: #800080;\">}<\/span> <span style=\"color: #800000; font-weight: bold;\">else<\/span> <span style=\"color: #800080;\">{<\/span>\n\t\t\ttooltips <span style=\"color: #808030;\">=<\/span> <span style=\"color: #800000;\">\"<\/span><span style=\"color: #0000e6;\">&lt;em&gt;Enter 2 characters&lt;\/em&gt;<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #800080;\">;<\/span>\n\t\t\t$<span style=\"color: #808030;\">(<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #0000e6;\">#tooltipSearchSuggestions, #abortTooltipSearch<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">.<\/span>fadeIn<span style=\"color: #808030;\">(<\/span><span style=\"color: #008c00;\">222<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #800080;\">;<\/span>\n\t\t<span style=\"color: #800080;\">}<\/span>\n\t<span style=\"color: #800080;\">}<\/span>\n\t$<span style=\"color: #808030;\">(<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #0000e6;\">#tooltipSearchSuggestions<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">.<\/span>html<span style=\"color: #808030;\">(<\/span>tooltips<span style=\"color: #808030;\">)<\/span><span style=\"color: #800080;\">;<\/span>\n<span style=\"color: #800080;\">}<\/span>\n<\/pre>\n<h2>The CSS styles<\/h2>\n<p>All we need is 7 rules to style this simple search widget. Set up your custom design if you don&#8217;t like the default&nbsp;look.<\/p>\n<pre style=\"color: #000000; background: #ffffff;\"><span style=\"color: #808030;\">#<\/span>wrapTooltipSearch <span style=\"color: #800080;\">{<\/span><span style=\"color: #bb7977; font-weight: bold;\">position<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #074726;\">relative<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">width<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">200<\/span><span style=\"color: #006600;\">px<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #800080;\">}<\/span>\n<span style=\"color: #808030;\">#<\/span>abortTooltipSearch <span style=\"color: #800080;\">{<\/span><span style=\"color: #bb7977; font-weight: bold;\">background<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">#<\/span><span style=\"color: #008000;\">406b98<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">color<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">#<\/span><span style=\"color: #008000;\">FFF<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">border-radius<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">10<\/span><span style=\"color: #006600;\">px<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">position<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #074726;\">absolute<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">top<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #808030;\">-<\/span><span style=\"color: #008c00;\">5<\/span><span style=\"color: #006600;\">px<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">right<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #808030;\">-<\/span><span style=\"color: #008c00;\">17<\/span><span style=\"color: #006600;\">px<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">width<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">15<\/span><span style=\"color: #006600;\">px<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">height<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">15<\/span><span style=\"color: #006600;\">px<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">line-height<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">15<\/span><span style=\"color: #006600;\">px<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">text-align<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #074726;\">center<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">font-weight<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #074726;\">bold<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">cursor<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #074726;\">pointer<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">display<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #074726;\">none<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #800080;\">}<\/span>\n<span style=\"color: #808030;\">#<\/span>tooltipSearch <span style=\"color: #800080;\">{<\/span><span style=\"color: #bb7977; font-weight: bold;\">border<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">1<\/span><span style=\"color: #006600;\">px<\/span> <span style=\"color: #074726;\">solid<\/span> <span style=\"color: #008c00;\">#<\/span><span style=\"color: #008000;\">222<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">border-radius<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">5<\/span><span style=\"color: #006600;\">px<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">font-size<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">1.2<\/span><span style=\"color: #006600;\">em<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">outline<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #074726;\">none<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">padding<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">2<\/span><span style=\"color: #006600;\">px<\/span> <span style=\"color: #008c00;\">5<\/span><span style=\"color: #006600;\">px<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">display<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #074726;\">block<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">width<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">100<\/span><span style=\"color: #006600;\">%<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #800080;\">}<\/span>\n<span style=\"color: #808030;\">#<\/span>tooltipSearchSuggestions <span style=\"color: #800080;\">{<\/span><span style=\"color: #bb7977; font-weight: bold;\">border<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">1<\/span><span style=\"color: #006600;\">px<\/span> <span style=\"color: #074726;\">solid<\/span> <span style=\"color: #008c00;\">#<\/span><span style=\"color: #008000;\">222<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">position<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #074726;\">absolute<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">max-height<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">200<\/span><span style=\"color: #006600;\">px<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">overflow<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #074726;\">auto<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">background<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">#<\/span><span style=\"color: #008000;\">FFF<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">padding<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">5<\/span><span style=\"color: #006600;\">px<\/span> <span style=\"color: #008c00;\">0<\/span><span style=\"color: #006600;\">px<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">width<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">280<\/span><span style=\"color: #006600;\">px<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">display<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #074726;\">none<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">box-shadow<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">5<\/span><span style=\"color: #006600;\">px<\/span> <span style=\"color: #008c00;\">5<\/span><span style=\"color: #006600;\">px<\/span> <span style=\"color: #008c00;\">8<\/span><span style=\"color: #006600;\">px<\/span> <span style=\"color: #008c00;\">#<\/span><span style=\"color: #008000;\">000<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">border-radius<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">10<\/span><span style=\"color: #006600;\">px<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #800080;\">}<\/span>\n<span style=\"color: #808030;\">#<\/span>tooltipSearchSuggestions <span style=\"color: #800000; font-weight: bold;\">a<\/span> <span style=\"color: #800080;\">{<\/span><span style=\"color: #bb7977; font-weight: bold;\">text-decoration<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #074726;\">none<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">display<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #074726;\">block<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">padding<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">1<\/span><span style=\"color: #006600;\">px<\/span> <span style=\"color: #008c00;\">5<\/span><span style=\"color: #006600;\">px<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">cursor<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #074726;\">pointer<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #800080;\">}<\/span>\n<span style=\"color: #808030;\">#<\/span>tooltipSearchSuggestions <span style=\"color: #800000; font-weight: bold;\">a<\/span><span style=\"color: #800080;\">:<\/span><span style=\"color: #800000; font-weight: bold;\">hover<\/span> <span style=\"color: #800080;\">{<\/span><span style=\"color: #bb7977; font-weight: bold;\">background<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">#<\/span><span style=\"color: #008000;\">dde6ef<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">color<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">#<\/span><span style=\"color: #008000;\">000<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #800080;\">}<\/span>\n<span style=\"color: #808030;\">#<\/span>tooltipSearchSuggestions <span style=\"color: #800000; font-weight: bold;\">em<\/span> <span style=\"color: #800080;\">{<\/span><span style=\"color: #bb7977; font-weight: bold;\">display<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #074726;\">block<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #bb7977; font-weight: bold;\">padding<\/span><span style=\"color: #808030;\">:<\/span> <span style=\"color: #008c00;\">10<\/span><span style=\"color: #006600;\">px<\/span><span style=\"color: #800080;\">;<\/span><span style=\"color: #800080;\">}<\/span>\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Search functionality is crucial to improve the user experience, making navigation on the website much easier. This functionality is built into WordPress and almost every other CMS, but in this article I&#8217;m going to present a custom and very lightweight HTML-CSS-JS-jQuery solution that is very easy to implement.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,3,6,8],"tags":[],"class_list":["post-982","post","type-post","status-publish","format-standard","hentry","category-articles","category-freebies","category-jquery","category-tools"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Website Search Box with Dropdown Tooltip Suggestions<\/title>\n<meta name=\"description\" content=\"Search functionality is crucial to improve the user experience, making navigation on the website much easier.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Website Search Box with Dropdown Tooltip Suggestions\" \/>\n<meta property=\"og:description\" content=\"Search functionality is crucial to improve the user experience, making navigation on the website much easier.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/\" \/>\n<meta property=\"og:site_name\" content=\"HTML Online\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/htmlcoding\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-21T15:11:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-13T06:25:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/html-online.com\/demo\/website-search\/website-search-tooltip-dropdown.jpg\" \/>\n<meta name=\"author\" content=\"HTML Editor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"HTML Editor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/\"},\"author\":{\"name\":\"HTML Editor\",\"@id\":\"https:\/\/html-online.com\/articles\/#\/schema\/person\/019f9afa07f209153df0fecfc90b8c1d\"},\"headline\":\"Website Search Box with Dropdown Tooltip Suggestions\",\"datePublished\":\"2023-11-21T15:11:00+00:00\",\"dateModified\":\"2024-09-13T06:25:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/\"},\"wordCount\":244,\"publisher\":{\"@id\":\"https:\/\/html-online.com\/articles\/#organization\"},\"image\":{\"@id\":\"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/html-online.com\/demo\/website-search\/website-search-tooltip-dropdown.jpg\",\"articleSection\":[\"Articles\",\"Freebies\",\"jQuery\",\"Tools\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/\",\"url\":\"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/\",\"name\":\"Website Search Box with Dropdown Tooltip Suggestions\",\"isPartOf\":{\"@id\":\"https:\/\/html-online.com\/articles\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/html-online.com\/demo\/website-search\/website-search-tooltip-dropdown.jpg\",\"datePublished\":\"2023-11-21T15:11:00+00:00\",\"dateModified\":\"2024-09-13T06:25:04+00:00\",\"description\":\"Search functionality is crucial to improve the user experience, making navigation on the website much easier.\",\"breadcrumb\":{\"@id\":\"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/#primaryimage\",\"url\":\"https:\/\/html-online.com\/demo\/website-search\/website-search-tooltip-dropdown.jpg\",\"contentUrl\":\"https:\/\/html-online.com\/demo\/website-search\/website-search-tooltip-dropdown.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/html-online.com\/articles\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Website Search Box with Dropdown Tooltip Suggestions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/html-online.com\/articles\/#website\",\"url\":\"https:\/\/html-online.com\/articles\/\",\"name\":\"HTML Online Articles\",\"description\":\"Tips, tricks, tutorials\u2026\",\"publisher\":{\"@id\":\"https:\/\/html-online.com\/articles\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/html-online.com\/articles\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/html-online.com\/articles\/#organization\",\"name\":\"HTML Online\",\"url\":\"https:\/\/html-online.com\/articles\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/html-online.com\/articles\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2022\/06\/logo.jpg\",\"contentUrl\":\"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2022\/06\/logo.jpg\",\"width\":350,\"height\":350,\"caption\":\"HTML Online\"},\"image\":{\"@id\":\"https:\/\/html-online.com\/articles\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/htmlcoding\/\",\"https:\/\/www.linkedin.com\/in\/ferencdenes\/\",\"https:\/\/www.youtube.com\/channel\/UCn38Jw1sJzbjVHO95Zp0Sww\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/html-online.com\/articles\/#\/schema\/person\/019f9afa07f209153df0fecfc90b8c1d\",\"name\":\"HTML Editor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/html-online.com\/articles\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7c1d8f5e7f1dc3e261766a96ac50c6a907fa5c236e87ab73379c57c9114e92cd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7c1d8f5e7f1dc3e261766a96ac50c6a907fa5c236e87ab73379c57c9114e92cd?s=96&d=mm&r=g\",\"caption\":\"HTML Editor\"},\"description\":\"In 2013, while wrestling with a mountain of client articles and an uncooperative CMS, I decided enough was enough. So, I created an online HTML editor purely out of necessity (and mild frustration). What began as a tool for my own sanity quickly evolved into a gift for the world\u2014or at least for anyone trying to avoid breaking their website's code. Since then, I've shared my tech notes on my blog, which serves as both a handy reference and a digital diary of the adventures and misadventures of a coder.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/ferencdenes\/\",\"https:\/\/www.youtube.com\/@htmlg\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Website Search Box with Dropdown Tooltip Suggestions","description":"Search functionality is crucial to improve the user experience, making navigation on the website much easier.","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:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/","og_locale":"en_GB","og_type":"article","og_title":"Website Search Box with Dropdown Tooltip Suggestions","og_description":"Search functionality is crucial to improve the user experience, making navigation on the website much easier.","og_url":"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/","og_site_name":"HTML Online","article_publisher":"https:\/\/www.facebook.com\/htmlcoding\/","article_published_time":"2023-11-21T15:11:00+00:00","article_modified_time":"2024-09-13T06:25:04+00:00","og_image":[{"url":"https:\/\/html-online.com\/demo\/website-search\/website-search-tooltip-dropdown.jpg","type":"","width":"","height":""}],"author":"HTML Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"HTML Editor","Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/#article","isPartOf":{"@id":"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/"},"author":{"name":"HTML Editor","@id":"https:\/\/html-online.com\/articles\/#\/schema\/person\/019f9afa07f209153df0fecfc90b8c1d"},"headline":"Website Search Box with Dropdown Tooltip Suggestions","datePublished":"2023-11-21T15:11:00+00:00","dateModified":"2024-09-13T06:25:04+00:00","mainEntityOfPage":{"@id":"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/"},"wordCount":244,"publisher":{"@id":"https:\/\/html-online.com\/articles\/#organization"},"image":{"@id":"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/#primaryimage"},"thumbnailUrl":"https:\/\/html-online.com\/demo\/website-search\/website-search-tooltip-dropdown.jpg","articleSection":["Articles","Freebies","jQuery","Tools"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/","url":"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/","name":"Website Search Box with Dropdown Tooltip Suggestions","isPartOf":{"@id":"https:\/\/html-online.com\/articles\/#website"},"primaryImageOfPage":{"@id":"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/#primaryimage"},"image":{"@id":"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/#primaryimage"},"thumbnailUrl":"https:\/\/html-online.com\/demo\/website-search\/website-search-tooltip-dropdown.jpg","datePublished":"2023-11-21T15:11:00+00:00","dateModified":"2024-09-13T06:25:04+00:00","description":"Search functionality is crucial to improve the user experience, making navigation on the website much easier.","breadcrumb":{"@id":"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/#primaryimage","url":"https:\/\/html-online.com\/demo\/website-search\/website-search-tooltip-dropdown.jpg","contentUrl":"https:\/\/html-online.com\/demo\/website-search\/website-search-tooltip-dropdown.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/html-online.com\/articles\/website-search-box-with-dropdown-tooltip-suggestions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/html-online.com\/articles\/"},{"@type":"ListItem","position":2,"name":"Website Search Box with Dropdown Tooltip Suggestions"}]},{"@type":"WebSite","@id":"https:\/\/html-online.com\/articles\/#website","url":"https:\/\/html-online.com\/articles\/","name":"HTML Online Articles","description":"Tips, tricks, tutorials\u2026","publisher":{"@id":"https:\/\/html-online.com\/articles\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/html-online.com\/articles\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/html-online.com\/articles\/#organization","name":"HTML Online","url":"https:\/\/html-online.com\/articles\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/html-online.com\/articles\/#\/schema\/logo\/image\/","url":"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2022\/06\/logo.jpg","contentUrl":"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2022\/06\/logo.jpg","width":350,"height":350,"caption":"HTML Online"},"image":{"@id":"https:\/\/html-online.com\/articles\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/htmlcoding\/","https:\/\/www.linkedin.com\/in\/ferencdenes\/","https:\/\/www.youtube.com\/channel\/UCn38Jw1sJzbjVHO95Zp0Sww"]},{"@type":"Person","@id":"https:\/\/html-online.com\/articles\/#\/schema\/person\/019f9afa07f209153df0fecfc90b8c1d","name":"HTML Editor","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/html-online.com\/articles\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/7c1d8f5e7f1dc3e261766a96ac50c6a907fa5c236e87ab73379c57c9114e92cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7c1d8f5e7f1dc3e261766a96ac50c6a907fa5c236e87ab73379c57c9114e92cd?s=96&d=mm&r=g","caption":"HTML Editor"},"description":"In 2013, while wrestling with a mountain of client articles and an uncooperative CMS, I decided enough was enough. So, I created an online HTML editor purely out of necessity (and mild frustration). What began as a tool for my own sanity quickly evolved into a gift for the world\u2014or at least for anyone trying to avoid breaking their website's code. Since then, I've shared my tech notes on my blog, which serves as both a handy reference and a digital diary of the adventures and misadventures of a coder.","sameAs":["https:\/\/www.linkedin.com\/in\/ferencdenes\/","https:\/\/www.youtube.com\/@htmlg"]}]}},"_links":{"self":[{"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/posts\/982","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/comments?post=982"}],"version-history":[{"count":3,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/posts\/982\/revisions"}],"predecessor-version":[{"id":1409,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/posts\/982\/revisions\/1409"}],"wp:attachment":[{"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/media?parent=982"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/categories?post=982"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/tags?post=982"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}