Advertisement
Patrikrizek

Lesson5-index.html

May 3rd, 2022
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.82 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7.     <title>Links, Emmet, Forms</title>
  8.    
  9.     <!--
  10.  
  11.        FOLDER STRUCTURE
  12.        
  13.        lesson-5
  14.            ∟ css
  15.                ∟ style.css
  16.            ∟ index.html
  17.            ∟ form.html
  18.        
  19.    -->
  20.  
  21.     <!-- External CSS file -->
  22.     <link rel="stylesheet" href="/css/style.css">
  23.    
  24.     <style>
  25.         /* Your internal CSS code */
  26.         /* This internal CSS can be cut and paste into the external file style.css */
  27.     </style>
  28.  
  29. </head>
  30. <body>
  31.  
  32. <!-- Navigation -->
  33.    
  34.     <!-- 4 TYPES OF LINKS
  35.  
  36.        1 - The Anchor Link
  37.        This link will scroll down to the element with the relevant ID name
  38.        Only ID can by used for Anchor links, not classes
  39.        This link will scroll to the element with the ID name
  40.        <a href="#some-id">Item1</a>
  41.        
  42.        <div id="some-id"></div>
  43.  
  44.        2 - The Internal Link, using relative path to the file
  45.        This link is used for your other webpages in the same project folder.
  46.        This will be used in HOMEWORK.
  47.        <a href="/folder/about.html">About</a>
  48.  
  49.        3 - The External Link
  50.        This is a link to the external webpage.
  51.        <a href="https://www.somepage.com/">Some web page</a>
  52.  
  53.        4 - The Internal/External Link with Anchor
  54.        This is a combination of examples above. The link to another page with scrolling to element with ID name.
  55.        <a href="https://www.somepage.com/#some-id"> Some Page</a> -->
  56.    
  57.    
  58. <!-- EMMET examples -->
  59. <!-- https://docs.emmet.io/abbreviations/syntax/ -->
  60. <!-- To use Emmet simply start to typing the emmet shortcuts (see the examples bellow) and then hit the enter. -->
  61.    
  62.     <!-- Create div with ID named "example". -->
  63.     div#example
  64.     <div id="example"></div>
  65.  
  66.     <!-- Create div with class named "book". -->
  67.     div.book
  68.     <div class="book"></div>
  69.  
  70.     <!-- Create paragraph with class named "author". -->
  71.     p.author
  72.     <p class="author"></p>
  73.  
  74.     <!-- Create paragraph with inserted text "dummy text". -->
  75.     p{dummy text}
  76.     <p>dummy text</p>
  77.  
  78.     <!-- Create parent "ul" with five children "li", and child "a" with text "Item". -->
  79.     ul>li*5>a{Item}
  80.     <ul>
  81.         <li><a href="">Item</a></li>
  82.         <li><a href="">Item</a></li>
  83.         <li><a href="">Item</a></li>
  84.         <li><a href="">Item</a></li>
  85.         <li><a href="">Item</a></li>
  86.     </ul>
  87.  
  88.     <!-- Create parent "ul" with two children "li", and child "a" with text "Item" and number starting from 1. -->
  89.     ul>li*2>a{Item$}
  90.  
  91.     <ul>
  92.         <li><a href="">Item1</a></li>
  93.         <li><a href="">Item2</a></li>
  94.     </ul>
  95.  
  96.     <!-- Create a div with ID named "navigation" and parent "ul" with two children "li", and child "a" with text "Item" and number starting from 1. -->
  97.     div#navigation>ul>li*2>a{Item$}
  98.     <div id="navigation">
  99.         <ul>
  100.             <li><a href="">Item1</a></li>
  101.             <li><a href="">Item2</a></li>
  102.         </ul>
  103.     </div>
  104.  
  105. <!-- Forms -->
  106.     <form>
  107.  
  108.         <!-- To tight label with input filed use same names in the "for" and "name" attributes. -->
  109.         <label for="fname"> First name</label><br>
  110.         <input type="text" name="fname">
  111.  
  112.         <br>
  113.  
  114.         <label for="email">Your email address</label><br>
  115.         <input type="email" name="email">
  116.  
  117.         <br>
  118.  
  119.         <label for="passengers">Passengers</label><br>
  120.         <input type="number" name="passengers">
  121.  
  122.         <br>
  123.  
  124.         <label for="sdate">Start of your holiday</label><br>
  125.         <input type="date" name="sdate">
  126.  
  127.         <br>
  128.  
  129.         <input type="submit" value="Subscribe">
  130.     </form>
  131. </body>
  132. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement