How to Make Working Firefox Search Engine Website using Html CSS & JavaScript

Hello friends, today we will be going to how do we How to Make Working Firefox Search Engine Website using Html CSS & JavaScript. I have posted many videos and articles before related to the JavaScript project, now this the something new that we are going to build.

Video Tutorial of How to Make Working Firefox Search Engine Website using Html CSS & JavaScript


As you have seen on the given video tutorial of  How to Make Working Firefox Search Engine Website using Html CSS & JavaScript, 

If you are feeling bored watching the given video tutorial of How to Make Working Firefox Search Engine Website using Html CSS & JavaScript then you can copy or download the given codes below:


How to Make Working Firefox Search Engine Website using Html CSS & JavaScript | Free Source Code

To create this program (Working Firefox Search Engine). First, you need to create two Files one HTML File and another one is CSS File. After creating these files just paste the following codes in your file.

In the first place, make a HTML document with the name of index.html and glue the given codes in your HTML record. Keep in mind, you've to make a document with .html extension.
<!DOCTYPE html>
<html lang="en">
<head>
   <meta charset="UTF-8">
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <link rel="stylesheet" href="style.css">
   <link rel="shortcut icon" href="./images/logo.png" type="image/png">
   <title>New Tab</title>
</head>
<body>
   <div class="logo-and-wordmark">
      <div class="logo"></div>
      <div class="wordmark"></div>
   </div>
   <div class="search-inner-wrapper">
      <input type="search" class="query" spellcheck="false" placeholder="Search with Google or enter address">
   </div>
   <section class="top-sites">
      <ul class="top-sites-list">
         <li class="top-site-outer">
            <div class="top-site-inner">
               <a href="https://www.youtube.com" title="Youtube">
                  <div class="tile">
                     <img src="./images/youtube.png" class="icon">
                  </div>
                  <div class="title">
                     <span>youtube</span>
                  </div>
               </a>
            </div>
         </li>
         <li class="top-site-outer">
            <div class="top-site-inner">
               <a href="https://www.facebook.com" title="facebook">
                  <div class="tile">
                     <img src="./images/facebook.png" class="icon">
                  </div>
                  <div class="title">
                     <span>facebook</span>
                  </div>
               </a>
            </div>
         </li>
         <li class="top-site-outer">
            <div class="top-site-inner">
               <a href="https://www.wikipedia.com" title="wikipedia">
                  <div class="tile">
                     <img src="./images/wikipedia.png" class="icon">
                  </div>
                  <div class="title">
                     <span>wikipedia</span>
                  </div>
               </a>
            </div>
         </li>
         <li class="top-site-outer">
            <div class="top-site-inner">
               <a href="https://www.twitter.com" title="twitter">
                  <div class="tile">
                     <img src="./images/twitter.png" class="icon">
                  </div>
                  <div class="title">
                     <span>twitter</span>
                  </div>
               </a>
            </div>
         </li>
         <li class="top-site-outer">
            <div class="top-site-inner">
               <a href="https://www.reddit.com" title="reddit">
                  <div class="tile">
                     <img src="./images/reddit.png" class="icon">
                  </div>
                  <div class="title">
                     <span>reddit</span>
                  </div>
               </a>
            </div>
         </li>
      </ul>
   </section>
   <script>
      const query = document.querySelector('.query')
      function search(){
         const url = "https://www.google.com/search?q="+query.value
         window.open(url,"_self")
      }
      query.addEventListener('keydown',(e)=>{
         if(e.keyCode === 13){
            search();
         }
      })
   </script>
</body>
</html>
Second, make a CSS record with the name of style.css and glue the given codes in your CSS document. Keep in mind, you've to make a record with .css extension.
*
{
   margin: 0;
   padding: 0;
   box-sizing: inherit;
   font-family: sans-serif;
}
:root
{
   --newtab-background-color: #f9f9fb;
   --newtab-search-first-shadow: rgba(9, 32, 77, 0.12);
   --newtab-search-second-shadow: rgba(29, 17, 51, 0.12);
   --newtab-focus-border: #0060DF;
   --newtab-focus-border-selected: rgba(0, 0, 0, 0.15);
   --newtab-focus-outline: rgba(0, 96, 223, 0.25);
   --newtab-border-primary-color: #B1B1B3;
   --newtab-inner-box-shadow-color-nte: rgba(9, 32, 77, 0.12);
   --newtab-tile-shadow-secondary: rgba(29, 17, 51, 0.2);
   --newtab-text-secondary-color: #737373;
   --newtab-topsites-background-color: #FFF;
   --newtab-topsites-label-color: inherit;
   --newtab-topsites-outer-card-hover: rgba(0, 0, 0, 0.05);
   --newtab-background-primary-text-color: #151515;
   --newtab-focus-outline: rgba(0, 96, 223, 0.25);
   --newtab-focus-border: #0060DF;
   --newtab-focus-border-selected: rgba(0, 0, 0, 0.15);
   --newtab-search-text-color: #585165;
}
body
{
   display: flex;
   justify-content: center;
   align-items: center;
   flex-direction: column;
   min-height: 100vh;
   width: 100%;
   background: var(--newtab-background-color);
}
.logo-and-wordmark
{
   display: flex;
   justify-content: center;
   align-items: center;
   margin-bottom: 48px;
}
.logo-and-wordmark .logo
{
   width: 82px;
   height: 82px;
   background: url(./images/logo.png);
   background-repeat: no-repeat;
   background-size: cover;
   background-position: center;
}
.logo-and-wordmark .wordmark
{
   width: 134px;
   height: 82px;
   background: url(./images/firefox-wordmark.svg);
   background-repeat: no-repeat;
   background-size: 134px;
   background-position: center;
   margin-inline-start: 15px;
}

.search-inner-wrapper
{
   position: relative;
   width: 60%;
   height: 48px;
   display: flex;
   cursor: default;
   margin: 0 auto;
   padding-bottom: 30px;
}
.search-inner-wrapper input[type="search"]
{
   width: 100%;
   background: #fff url(./images/favicon.ico) 16px center no-repeat;
   background-size: 25px;
   padding-inline-start: 52px;
   padding-inline-end: 10px;
   border-radius: 8px;
   border: 1px solid transparent;
   outline: none;
   box-shadow: 0 3px 8px var(--newtab-search-first-shadow), 0 0 2px var(--newtab-search-second-shadow);
   font-size: 15px;
   font-weight: 500;
   color: var(--newtab-search-text-color);
}
.search-inner-wrapper input[type="search"]:focus
{
   border: 1px solid var(--newtab-focus-border);
   outline: 0;
   box-shadow: 0 0 0 2px var(--newtab-focus-outline);
}

section
{
   max-width: 70%;
   width: 100%;
   display: grid;
   place-items: center;
}
section .top-sites-list
{
   list-style: none;
   padding: 0;
}
section .top-sites-list .top-site-outer
{
   display: inline-block;
   height: 100%;
   border-radius: 8px;
   padding: 20px;
}
section .top-sites-list .top-site-outer:is(.active, :hover, :active)
{
   background: var(--newtab-topsites-outer-card-hover);
}
section .top-site-inner
{
   position: relative;
   width: 100%;
   height: 100%;
   border-radius: 8px;
}

section .top-site-inner a
{
   display: block;
   text-decoration: none;
   outline: none;
   border: none;
   color: var(--newtab-topsites-label-color);
}
section .top-site-inner a .tile
{
   position: relative;
   width: 80px;
   height: 80px;
   display: flex;
   justify-content: center;
   align-items: center;
   text-decoration: none;
   font-size: 32px;
   font-weight: 400;
   text-transform: uppercase;
   border-radius: 8px;
   color: var(--newtab-text-secondary-color);
   box-shadow: 0 3px 8px var(--newtab-inner-box-shadow-color-nte), 0 0 2px var(--newtab-tile-shadow-secondary);
   background: var(--newtab-topsites-background-color);
}
.tile .icon
{
   border-radius: 4px;
   width: 48px;
   height: 48px;
   overflow: hidden;
   position: relative;
   display: flex;
   justify-content: center;
   align-items: center;
}
section .top-site-inner .title
{
   padding-top: 8px;
   color: var(--newtab-topsites-label-color);
   font-size: 12px;
   text-align: center;
   position: relative;
}
section .top-site-inner .title span
{
   display: block;
   text-overflow: ellipsis;
   overflow: hidden;
   width: 100%;
   white-space: nowrap;
}
@media(max-width: 600px){
   .search-inner-wrapper
   {
      width: 80%;
   }  
}
That’s all, now you’ve successfully created a program to How to Make Working Firefox Search Engine Website using Html CSS & JavaScript. If your code doesn’t work or you’ve faced any error/problem, please download the source code files from the given download button. It’s free and a .zip file will be downloaded then you’ve to extract it.
Click on the following download button to download all source code files.


Download Now
Please Wait...
Direct Link click here.

How can I help you

Post a Comment

How can I help you

Post a Comment (0)

Previous Post Next Post