Practice

Q1)

 <!DOCTYPE html>

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Student Info</title>
</head>
<body>
    <table border="black">
        <caption>Student Information</caption>
        <tr>
            <th rowspan="6">Info</th>
            <th rowspan="2">Name</th>
            <th colspan="2">Address</th>
        </tr>
        <tr>
            <th>City</th>
            <th>House</th>
        </tr>
        <tr>
            <td>A</td>
            <td>Delhi</td>
            <td>1</td>
        </tr>
        <tr>
            <td>B</td>
            <td>Mumbai</td>
            <td>2</td>

        </tr>
        <tr>
            <td>C</td>
            <td>Kolkota</td>
            <td>3</td>
        </tr>
        <tr>
            <td>D</td>
            <td>Pune</td>
            <td>4</td>
        </tr>
    </table>
</body>
</html>

Q2)<!DOCTYPE html>

<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Q2</title>
  </head>
  <body>
    <form action="/server">
      <div>
        <label for="name">Name:</label>

        <input type="text" name="name" id="name" />
      </div>
      <div>
        <label for="sex">Sex:</label>
        <input type="radio" name="sex" id="Male" value="Male" />
        <label for="Male">Male</label>
        <input type="radio" name="sex" id="Female" value="Female" />
        <label for="Female">Female</label>
      </div>
      <div>
        <label for="country">Country:</label>
        <select name="country" id="country">
          <option>select an option</option>
          <option value="India">India</option>
          <option value="USA">USA</option>
          <option value="Nepal">Nepal</option>
          <option value="Canada">Canada</option>
        </select>
      </div>
      <div>
        <label for="message">Message:</label><br />
        <textarea rows="4" cols="30" name="message" id="message"></textarea>
      </div>
      <div>
        <label for="subscribe">Subscribe?</label>
        <input type="checkbox" name="subscribe" id="subscribe" />
      </div>
      <button>Submit</button>
    </form>
  </body>
</html>

Q3)<!DOCTYPE html>

<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Feedback form</title>
  </head>
  <body>
   
    <form action="/server">
      <h2>Feedback Form</h2>
      <div>
        <label for="name">Name:</label>
        <input
          type="text"
          name="name"
          id="name"
          placeholder="Write your name"
        />
      </div>
      <div>
        <label for="email">Email:</label>
        <input
          type="text"
          name="email"
          id="email"
          placeholder="Write your email"
        />
      </div>
      <div>
        <label for="message">Message:</label>
        <br />
        <textarea rows="5" cols="20" name="message" id="message"></textarea>
      </div>
      <div>
        <label for="rating">Rate us out of 5:</label>
        <br />
        <input type="radio" name="rating" id="1" value="1" />
        <label for="1">1</label>
        <br />
        <input type="radio" name="rating" id="2" value="2" />
        <label for="2">2</label>
        <br />
        <input type="radio" name="rating" id="3" value="3" />
        <label for="3">3</label>
        <br />
        <input type="radio" name="rating" id="4" value="4" />
        <label for="4">4</label>
        <br />
        <input type="radio" name="rating" id="5" value="5" />
        <label for="5">5</label>
      </div>
      <button>send your message!</button>
    </form>
  </body>
</html>

Comments

Popular posts from this blog

TextArea

unordered list with image link

Select input form