Advertisement
Patrikrizek

lesson-3-index-in-class

Jun 23rd, 2022
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.83 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>Float, margin, padding, ...</title>
  8.    
  9.     <style>
  10.         .myDiv {
  11.             background-color: coral;
  12.             height: 300px;
  13.         }
  14.  
  15.         .fl-right {
  16.             float: right;
  17.         }
  18.  
  19.         .m-p-b {
  20.             background-color: aquamarine;
  21.             font-size: 20px;
  22.             margin: 100px;
  23.             /* margin: 100px 20px;
  24.             margin: 10px 20px 50px 80px;
  25.             margin-right: 50px; */
  26.            
  27.             padding: 50px;
  28.             border: 5px dotted red;
  29.         }
  30.  
  31.         table, th, td {
  32.             margin-left: auto;
  33.             margin-right: auto;
  34.  
  35.             border: 3px solid green;
  36.         }
  37.  
  38.         .layout {
  39.         display: flex;
  40.         justify-content: center;
  41.        
  42.     }
  43.     </style>
  44. </head>
  45. <body>
  46.     <div class="myDiv">
  47.         <img src="https://files.worldwildlife.org/wwfcmsprod/images/African_Elephant_Kenya_112367/story_full_width/qxyqxqjtu_WW187785.jpg" alt="elephant" height="300px" class="fl-right">
  48.         <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Quo aperiam consequuntur dolor id consequatur sunt dolore. Cupiditate vitae minus impedit!</p>
  49.     </div>
  50.  
  51.     <div class="m-p-b">
  52.         <h3>Margin</h3>
  53.         <p>Space outside of the border of the element.</p>
  54.        
  55.         <h3>Padding</h3>
  56.         <p>Space between border and content of the element.</p>
  57.  
  58.         <h3>Border</h3>
  59.         <p>Just a line between padding and margin.</p>
  60.     </div>
  61.  
  62.     <table>
  63.         <tr>
  64.             <th>Person 1</th>
  65.             <th>Person 2</th>
  66.             <th>Person 3</th>
  67.         </tr>
  68.  
  69.         <tr>
  70.             <td>John</td>
  71.             <td>Anne</td>
  72.             <td>Josh</td>
  73.         </tr>
  74.  
  75.         <tr>
  76.             <td>16</td>
  77.             <td>20</td>
  78.             <td>18</td>
  79.         </tr>
  80.     </table>
  81.  
  82.     <!-- Unordered list -->
  83.     <ul type="square">
  84.         <li>T-shirt</li>
  85.         <li>Socks</li>
  86.         <li>Jacket</li>
  87.     </ul>
  88.    
  89.     <!-- Ordered list -->
  90.     <ol type="A">
  91.         <li>T-shirt</li>
  92.         <li>Socks</li>
  93.         <li>Jacket</li>
  94.     </ol>
  95.  
  96.     <!-- Embedding video -->
  97.     <iframe width="560" height="315" src="https://www.youtube.com/embed/7NiYVoqBt-8" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  98.  
  99.  
  100.    
  101.  
  102.  
  103.  
  104.     <div class="layout">
  105.         <p>Lorem ipsum dolor sit amet.</p>
  106.         <p>Lorem ipsum dolor sit amet.</p>
  107.         <p>Lorem ipsum dolor sit amet.</p>
  108.         <p>Lorem ipsum dolor sit amet.</p>
  109.     </div>
  110. </body>
  111. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement