Advertisement
Patrikrizek

lesson-5-form

Mar 9th, 2022
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.75 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.  
  4. <head>
  5.     <meta charset="UTF-8">
  6.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8.    
  9.     <!-- CSS - link to the external CSS file -->
  10.     <link rel="stylesheet" href="/lesson-4/css/styles.css">
  11.    
  12.     <title>Contact</title>
  13.  
  14.     <!-- FOLDER STRUCTURE
  15.  
  16.            lesson-4
  17.                ∟ css
  18.                    ∟ styles.css
  19.                ∟ form.html
  20.                ∟ index.html        
  21.            
  22.    -->
  23.  
  24. </head>
  25.  
  26. <body>
  27.  
  28.     <div id="header">
  29.         <h1>This is a <span class="pageName">contact</span> page</h1>
  30.         <h2>Tag line</h2>
  31.     </div>
  32.  
  33.     <div id="topNavigation">
  34.         <ul>
  35.             <li> <a href="index.html"> home </a> </li>
  36.             <li> <a href="form.html"> contact </a> </li>
  37.         </ul>
  38.     </div>
  39.  
  40.     <div id="main">
  41.         <form>
  42.  
  43.             <label for="fname">First name<small>*</small></label>
  44.             <input type="text" id="fname" name="fname" required placeholder="John" autofocus pattern="[A-Za-z]{3}">
  45.  
  46.             <label for="lname">Last name<small>*</small></label>
  47.             <input type="text" id="lname" name="lname" required placeholder="Green" pattern="[a-zA-Z]{5}">
  48.  
  49.             <label for="email">Your email<small>*</small></label>
  50.             <input type="email" id="email" name="email" required placeholder="j.green@email.com"
  51.                pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$">
  52.  
  53.             <label for="destination">Choose your destination:<small>*</small></label>
  54.             <select id="destination" name="destination" required>
  55.                 <option value="0">--</option>
  56.                 <option value="London">London</option>
  57.                 <option value="Barcelona">Barcelona</option>
  58.                 <option value="Berlin">Berlin</option>
  59.                 <option value="Manchester">Manchester</option>
  60.             </select>
  61.  
  62.             <label for="passengers">How many passengers?<small>*</small></label>
  63.             <input type="number" id="passengers" name="passengers" required min="1" max="10" step="1" value="1">
  64.  
  65.             <label for="fromDate">First day of travel:<small>*</small></label>
  66.             <input type="date" id="fromDate" name="fromDate" required min="2022-03-09" max="2022-06-09">
  67.  
  68.             <label for="toDate">Last date of travel:<small>*</small></label>
  69.             <input type="date" id="toDate" name="toDate" required min="2022-03-10" max="2022-06-10">
  70.             <br>
  71.             <br>
  72.             <input type="submit" value="Confirm Order">
  73.             <br>
  74.             <small>* these fields are mandatory</small>
  75.  
  76.         </form>
  77.     </div>
  78.  
  79.     <!-- Footer -->
  80. </body>
  81.  
  82. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement