Skip to main content

Command Palette

Search for a command to run...

Assignment 0.2

Published
2 min read

Question: write a search query for Google by creating a form and taking a search query from the user

  • for this search anything in Google and get which name-value pair Google uses to search it query

  • Google uses q as a name of query attribute

<h1>GOOGLE SEARCH</h1>
<form action="https://www.google.com/search">
    <label for="q">WRITE SEARCH QUERY</label>
    <input type="text" name="q" placeholder="Enter the search query">
    <br>
    SEARCH ON GOOGLE : <button>Search</button>
</form>

clicking on the search result on this page

Question: create the following page

Answer:

<h1>Registration Form</h1>
<form action="/reister">
    <input type="text" id="fname" name="fname" placeholder="first Name">
    <input type="text" id="lname" name="lname" placeholder="last Name">
    <br>
    Please Select Your Gender 
    <select name="gender" id="gender">
        <option value="Male">Male</option>
        <option value="Female">Female</option>
    </select>
    <br>
    Do You Agree to all terms & conditon ?
    <input type="checkbox" id="terms" name="Terms&Condition">
    Yes, I agree
    <br>
    <button>Register</button>
</form>

Question: create the following page

<div>
    <form action="/submit">
        <div>
            <label for="name">Name : </label>
            <input type="text" id="name" name="name" placeholder="Enter your name">
        </div>
        <div>
            <label for="gender">Gender : </label>
            <input type="radio" id="gender" name="gender" value="male">Male
            <input type="radio" id="gender" name="gender" value="female">Female
        </div>
        <div>
            <label for="country">Country : </label>
            <select name="Country" id="country">
                <option value="">Select an option</option>
                <option value="India">India</option>
                <option value="Nepal">Nepal</option>
                <option value="China">China</option>
            </select>
        </div>
        <div>
            <label for="msg">
                Message :<br>
            </label>
            <textarea id="msg" name="message"></textarea>
        </div>
        <div>
            <input type="checkbox" id="sus" name="subscribe">
            <label for="sus"> Suscribe?</label>
        </div>
        <div>
            <button>Submit</button>
        </div>
    </form>
</div>

<div>
    <h1>Feedback Form</h1>
</div>
<div>
    <form action="/server">
        <div>
            <label for="name">Name : </label>
            <input type="text" id="name" name="name" placeholder="Writ your Name">
        </div>
        <br>

        <div>
            <label for="email">Email:</label>
            <input type="text" id="email" name="email" placeholder="email">
        </div>
        <br>
        <div>
            <Label for="mesg">Message : </Label><br>
            <Textarea id="mesg" name="message"></Textarea>
        </div>
        <br>
        <div>
            <label for="rating">Rate us our of 5</label>
            <br>
            <input type="radio" id="rating" value="1" name="rating"> 1 <br>
            <input type="radio" id="rating" value="2" name="rating"> 2 <br>
            <input type="radio" id="rating" value="3" name="rating"> 3 <br>
            <input type="radio" id="rating" value="4" name="rating"> 4 <br>
            <input type="radio" id="rating" value="5" name="rating"> 5 <br>
        </div>
        <br>
        <button>Sedn you message!</button>
    </form>
</div>

More from this blog

dheeraj koranga's blog

51 posts