HTML Practical 2 | Web-Programming | WebDevs I CS

The Combine Website of all Practicals till 1 to 9 will upload Soon !!!

Practical 2


WebOs

    <!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">
    <title>WebOs</title>
    <style>
ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #333;
}

li {
  float: left;
}

li a {
  display: block;
  color: white;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
}

li a:hover:not(.active) {
  background-color: #111;
}

.active {
  background-color: #04AA6D;
}
        table {
          font-family: arial, sans-serif;
          border-collapse: collapse;
          width: 100%;
        }
        
        td, th {
          border: 1px solid #dddddd;
          text-align: left;
          padding: 8px;
        }
        
        tr:nth-child(even) {
          background-color: #dddddd;
        }
        </style>
</head>
<body>     
    <nav>   
    <ul>
        <li><a href="#home" class="active">Home</a></li>
        <li><a href="#news">News</a></li>
        <li><a href="#contact">Contact</a></li>
        <li style="float:right"><a href="#about">About</a></li>
      </ul> 
    </nav>     
        <h2 Align="center">HTML Table</h2>
        
        <table>
          <tr>
            <th>Company</th>
            <th>Contact</th>
            <th>Country</th>
          </tr>
          <tr>
            <td>Alfreds Futterkiste</td>
            <td>Maria Anders</td>
            <td>Germany</td>
          </tr>
          <tr>
            <td>Centro comercial Moctezuma</td>
            <td>Francisco Chang</td>
            <td>Mexico</td>
          </tr>
          <tr>
            <td>Ernst Handel</td>
            <td>Roland Mendel</td>
            <td>Austria</td>
          </tr>
          <tr>
            <td>Island Trading</td>
            <td>Helen Bennett</td>
            <td>UK</td>
          </tr>
          <tr>
            <td>Laughing Bacchus Winecellars</td>
            <td>Yoshi Tannamuri</td>
            <td>Canada</td>
          </tr>
          <tr>
            <td>Magazzini Alimentari Riuniti</td>
            <td>Giovanni Rovelli</td>
            <td>Italy</td>
          </tr>
        </table>
        <h1 Align="center">Form Tags</h1>
        <form>
            <label for="name">Name:</label>
            <input type="text" name="name"><br><br>
            <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> <br><br>
            <label for="name">Name:</label>
            <input type="text" name="name"><br><br>
            <label for="pets">Pets:</label>
<select id="pets">
    <optgroup label="Mammals">
        <option value="dog">Dog</option>
        <option value="cat">Cat</option>
    </optgroup>
    <optgroup label="Insects">
        <option value="spider">Spider</option>
        <option value="ants">Ants</option>
    </optgroup>
    <optgroup label="Fish">
        <option value="goldfish">Goldfish</option>
    </optgroup>
</select> <br><br>
<textarea rows="10" cols="30"> Type something…</textarea> <br> <br>
<label for="country-choice">Choose a country:</label>
<input list="country-options" id="country-choice" name="country-choice">
<datalist id="country-options">
    <option value="India">
    <option value="Russia">
    <option value="America">
    <option value="China">
    <option value="Japan">
</datalist> <br> <br>
            <button type="reset">Reset</button>
            <input type="submit" value="Submit">
        </form>
</body>
</html>

1 Comments

  1. Hello My Name is Zakir, Testing Comment is working or not

    ReplyDelete
Previous Post Next Post