Advertisement
Patrikrizek

lesson-3-index-in-class

Nov 10th, 2022
640
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.99 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>Lesson 3</title>
  8.  
  9.     <!-- CSS styles -->
  10.     <style>
  11.         /* Globals */
  12.         body {
  13.             background-color: lightblue;
  14.         }
  15.  
  16.         /* Classes */
  17.         .city {
  18.             background-color: tomato;
  19.             color: yellow;
  20.             font-weight: bold;
  21.         }
  22.  
  23.         .town {
  24.             font-family: 'Courier New', Courier, monospace;
  25.             font-size: 20px;
  26.             font-weight: bold;
  27.         }
  28.  
  29.         /* IDs */
  30.         #myHeader {
  31.             background-color: lightgreen;
  32.             color: black;
  33.             padding: 40px;
  34.             text-align: center;
  35.         }
  36.  
  37.         /* Class */
  38.         .space {
  39.             margin-top: 500px;
  40.             color:orange;
  41.         }
  42.     </style>
  43.  
  44. </head>
  45. <body>
  46.     <div style="background-color: red;">
  47.         <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Eveniet, dolores?</p>
  48.         <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quasi porro nam, aliquid nulla praesentium veritatis numquam unde assumenda natus officia.</p>
  49.     </div>
  50.    
  51.     <span>This is the first span text.</span>
  52.     <span>This is the second span text.</span>
  53.  
  54.     <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Magni sint, sed possimus, a <span style="color:red;">facilis earum ex beatae</span> adipisci, officia animi eaque asperiores nesciunt. Quas, enim excepturi officiis sit adipisci deserunt?</p>
  55.  
  56.     <p class="city">This paragraph is styled by CSS class named "city".</p>
  57.  
  58.     <p id="myHeader">This paragraph is styled by CSS "myHeader" ID.</p>
  59.  
  60.     <!-- HTML Bookmark -->
  61.     <a href="#C1">Jump to chapter 1</a>
  62.  
  63.     <div id="C1" class="space">
  64.         <h3>Chapter One</h3>
  65.         <p>This is a text of the chapter one.</p>
  66.     </div>
  67.  
  68. </body>
  69. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement