{"id":1418,"date":"2023-09-07T05:00:00","date_gmt":"2023-09-07T12:00:00","guid":{"rendered":"https:\/\/www.angulartraining.com\/daily-newsletter\/?p=1418"},"modified":"2023-09-05T15:19:34","modified_gmt":"2023-09-05T22:19:34","slug":"hidden-gems-of-html","status":"publish","type":"post","link":"https:\/\/www.angulartraining.com\/daily-newsletter\/hidden-gems-of-html\/","title":{"rendered":"Hidden gems of HTML"},"content":{"rendered":"\n<p>As front-end developers, we have been used to frameworks and libraries that enhance HTML, CSS, and Javascript. We adopt component libraries or individual third-party components from NPM as if participating in an all-you-can-eat buffet. However, <a href=\"https:\/\/blog.angulartraining.com\/how-to-pick-the-right-dependencies-for-your-angular-application-328ce637b982\" target=\"_blank\" rel=\"noopener\" title=\"\">this will break our apps in the future if we&#8217;re not careful<\/a>.<\/p>\n\n\n\n<p>In this newsletter, we&#8217;ve covered that <a href=\"https:\/\/www.angulartraining.com\/daily-newsletter\/creating-a-dialog-in-two-lines-of-code\/\" target=\"_blank\" rel=\"noopener\" title=\"\">dialogs can be created in simple HTML<\/a>. Yet, many more &#8220;hidden&#8221; gems in HTML are worth knowing about. Here are a few examples:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Details and summary<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"712\" height=\"117\" src=\"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/09\/image-1.png\" alt=\"\" class=\"wp-image-1419\" srcset=\"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/09\/image-1.png 712w, https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/09\/image-1-300x49.png 300w\" sizes=\"auto, (max-width: 712px) 100vw, 712px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>The above HTML code displays the following collapsible element:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"486\" height=\"116\" src=\"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/09\/details.gif\" alt=\"\" class=\"wp-image-1420\"\/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>Of course, the entire thing can be customized with CSS. It&#8217;s just HTML, after all:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"393\" height=\"379\" src=\"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/09\/image-2.png\" alt=\"\" class=\"wp-image-1421\" srcset=\"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/09\/image-2.png 393w, https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/09\/image-2-300x289.png 300w\" sizes=\"auto, (max-width: 393px) 100vw, 393px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"712\" height=\"99\" src=\"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/09\/image-3.png\" alt=\"\" class=\"wp-image-1422\" srcset=\"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/09\/image-3.png 712w, https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/09\/image-3-300x42.png 300w\" sizes=\"auto, (max-width: 712px) 100vw, 712px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">Abbreviations<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"838\" height=\"48\" src=\"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/09\/image-5.png\" alt=\"\" class=\"wp-image-1425\" srcset=\"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/09\/image-5.png 838w, https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/09\/image-5-300x17.png 300w, https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/09\/image-5-768x44.png 768w\" sizes=\"auto, (max-width: 838px) 100vw, 838px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Abbreviations are everywhere in our world, so providing accessible definitions is a must, and the <code>abbr<\/code> tag does precisely that:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"228\" height=\"62\" src=\"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/09\/image-4.png\" alt=\"\" class=\"wp-image-1424\"\/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Meter<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"249\" height=\"232\" src=\"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/09\/image-6.png\" alt=\"\" class=\"wp-image-1426\"\/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>What about a native fancy progress bar with different colors for different thresholds? <code>meter<\/code> does exactly that:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"289\" height=\"66\" src=\"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/09\/meter.gif\" alt=\"\" class=\"wp-image-1427\"\/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>Always remember that HTML is excellent because, unlike third-party libraries, these elements do not increase the size of your app. Their code does not have to be packaged, downloaded, and then interpreted. You don&#8217;t have to run <code>npm update<\/code> on them. They&#8217;re free and won&#8217;t break your app.<\/p>\n\n\n\n<p>You can see all these <a href=\"https:\/\/stackblitz.com\/edit\/stackblitz-starters-5fno16?description=An%20angular-cli%20project%20based%20on%20@angular\/animations,%20@angular\/common,%20@angular\/compiler,%20@angular\/core,%20@angular\/forms,%20@angular\/platform-browser,%20@angular\/platform-browser-dynamic,%20@angular\/router,%20core-js,%20rxjs,%20tslib%20and%20zone.js&amp;file=src%2Fmain.ts,src%2Fmain.html&amp;title=Angular%20Starter\" target=\"_blank\" rel=\"noopener\" title=\"\">examples in action on Stackblitz<\/a>. And for even more cool HTML\/CSS tricks, check out this other post of mine: <a href=\"https:\/\/blog.angulartraining.com\/5-new-html-css-features-you-didnt-know-about-fc3da316d951\" target=\"_blank\" rel=\"noopener\" title=\"\">5 new HTML\/CSS features you didn&#8217;t know about<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As front-end developers, we have been used to frameworks and libraries that enhance HTML, CSS, and Javascript. We adopt component libraries or individual third-party components from NPM as if participating in an all-you-can-eat buffet. However, this will break our apps in the future if we&#8217;re not careful. In this newsletter, we&#8217;ve covered that dialogs can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-1418","post","type-post","status-publish","format-standard","hentry","category-html"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/posts\/1418","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/comments?post=1418"}],"version-history":[{"count":3,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/posts\/1418\/revisions"}],"predecessor-version":[{"id":1429,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/posts\/1418\/revisions\/1429"}],"wp:attachment":[{"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/media?parent=1418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/categories?post=1418"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/tags?post=1418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}