Sichanov

06. Semantic Blog Layout

Jan 15th, 2023
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.09 KB | None | 0 0
  1. #HTML
  2.  
  3.  
  4. <!DOCTYPE html>
  5. <html lang="en">
  6. <head>
  7. <meta charset="UTF-8" />
  8. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  9. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  10. <link rel="stylesheet" href="styles.css" />
  11. <title>Semantic Blog Layout</title>
  12. </head>
  13. <body>
  14. <header>
  15. <h1>Developer News</h1>
  16. <nav>
  17. <ul>
  18. <li><a href="#">HTML</a></li>
  19. <li><a href="#">JavaScript</a></li>
  20. </ul>
  21. </nav>
  22. </header>
  23. <main>
  24. <section>
  25. <header>
  26. <h2>HTML</h2>
  27. </header>
  28. <article>
  29. <p><strong>New feature: JPEG XL image format</strong></p>
  30. <p>
  31. JPEG XL image format is a modern image format optimized for web
  32. environments. JPEG XL generally has better compression than WebP,
  33. JPEG, PNG and GIF and is designed to supersede them.
  34. </p>
  35. <p>
  36. Learn more at:
  37. <a href="https://en.wikipedia.org/wiki/JPEG_XL"
  38. >https://en.wikipedia.org/wiki/JPEG_XL</a
  39. >
  40. </p>
  41. <p>By The HTTP Working Group. Published <time>January 23rd</time></p>
  42. </article>
  43. <article>
  44. <p><strong>New feature: Cookie Store API</strong></p>
  45. <p>
  46. Cookie Store API is a JS API for reading and modifying cookies.
  47. Compared to the existing `document.cookie` method, the API provides
  48. a much more modern interface, which can also be used in service
  49. workers.
  50. </p>
  51. <p>
  52. Learn more at:
  53. <a
  54. href="https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/cookies/CookieStore"
  55. >https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/cookies/CookieStore</a
  56. >
  57. </p>
  58. <p>By Joshua Bell. Published <time>December 15th</time></p>
  59. </article>
  60. </section>
  61. <section>
  62. <header>
  63. <h2>JavaScript</h2>
  64. </header>
  65. <article>
  66. <p><strong>Billboard.js 3.0: The D3.js-Powered Chart Library</strong></p>
  67. <p>Billboard.js is a popular library supporting a whole range of chart types out of the box (bar, line, areas, donuts, radars, and various hybrids) – 3.0 brings candlestick / OHLC chart support (often used in financial contexts) and supports D3.js v6.</p>
  68. <p>Learn more at: <a href="https://github.com/naver/billboard.js">https://github.com/naver/billboard.js</a></p>
  69. <p>By Jae Sung Park. Published <time>March 24th</time></p>
  70. </article>
  71. <article>
  72. <p><strong>Nine JavaScript and TypeScript ORMs</strong></p>
  73. <p>A roundup, complete with code examples, showing off a variety of tools like Knex.js, Mongoose, TypeORM, Waterline, and Bookshelf.</p>
  74. <p>Learn more at: <a href="https://www.sitepoint.com/javascript-typescript-orms/">https://www.sitepoint.com/javascript-typescript-orms/</a></p>
  75. <p>By Michael Wanyoike. Published <time>March 31rd</time></p>
  76. </article>
  77. </section>
  78. </main>
  79. <footer>
  80. <p>&copy; 2021 DeveloperNewsPortal.info</p>
  81. <p>Please contact <a href="#">Troy McClure</a> for questions about these articles.</p>
  82. </footer>
  83. </body>
  84. </html>
  85.  
  86.  
  87. #CSS
  88.  
  89. header {
  90. border-radius: 3px;
  91. padding: 8px 10px;
  92. background-color: #dceaf4;
  93. border: 1px solid #bfcacb;
  94. }
  95.  
  96. header * {
  97. display: inline;
  98. vertical-align: middle;
  99. }
  100.  
  101. nav ul {
  102. margin: 0;
  103. padding: 10px;
  104. }
  105.  
  106. nav li a {
  107. text-decoration: none;
  108. }
  109.  
  110. body {
  111. background-color: #b7d7e8;
  112. }
  113.  
  114. section h2 {
  115. margin: 15px 10px;
  116. }
  117.  
  118. article {
  119. display: table-cell;
  120. width: 50%;
  121. padding: 10px 15px;
  122. background-color: #e5f0f7;
  123. border: 10px solid #b7d7e8;
  124. }
  125.  
  126. footer {
  127. margin: 5px;
  128. padding: 5px 10px;
  129. border-radius: 3px;
  130. background-color: #dceaf4;
  131. border: 1px solid #bfcacb;
  132. }
  133.  
  134. footer p {
  135. margin: 5px;
  136. }
Advertisement
Add Comment
Please, Sign In to add comment