Home Web Front-end CSS Tutorial HTML Boilerplates

HTML Boilerplates

Mar 24, 2025 am 10:06 AM

HTML Boilerplates

Manuel Matuzović goes line-by-line through a boilerplate HTML document. I like it. It’s a good reference and has a lot of the same type of stuff I tend to put in the main HTML template. It makes me think about how opinionated this kind of thing can be. Dang near every line! Not the DOCTYPE, not the

, but nearly everything else. <details> <summary> The HTML </summary> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre rel="HTML" data-line=""> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width"> <title>Unique page title - My Site</title> <script type="module"> document.documentElement.classList.remove('no-js'); document.documentElement.classList.add('js'); </script> <link rel="stylesheet" href="/assets/css/styles.css"> <link rel="stylesheet" href="/assets/css/print.css" media="print"> <meta name="description" content="Page description"> <meta property="og:title" content="Unique page title - My Site"> <meta property="og:description" content="Page description"> <meta property="og:image" content="https://www.mywebsite.com/image.jpg"> <meta property="og:image:alt" content="Image description"> <meta property="og:locale" content="en_GB"> <meta property="og:type" content="website"> <meta name="twitter:card" content="summary_large_image"> <meta property="og:url" content="https://www.mywebsite.com/page"> <link rel="canonical" href="https://www.mywebsite.com/page"> <link rel="icon" href="/favicon.ico"> <link rel="icon" href="/favicon.svg" type="image/svg xml"> <link rel="apple-touch-icon" href="/apple-touch-icon.png"> <link rel="manifest" href="/my.webmanifest"> <meta name="theme-color" content="#FF00FF"> <!-- Content --> <script src="/assets/js/xy-polyfill.js" nomodule></script> <script src="/assets/js/script.js" type="module"></script> </pre><div class="contentsignin">Copy after login</div></div> </details> <p>Maybe my site doesn’t use any JavaScript or have no-JavaScript fallbacks so I don’t need any of the class name dancing. Maybe my site doesn’t need print styles, but I do need link prefetching. Maybe I don’t care about social images, but I do want critical CSS in the head. It’s a boilerplate, not a prescription — it’s meant to be changed.</p> <p>There was a time when HTML5 Boilerplate was a huge project in this space. It has a whole GitHub Org! The boilerplate has 50,000 stars! Personally, I feel like the project lost its way when it started to have a src and dist folder and a 200-line Gulp build process, ya know? It worked best as a reference for what stuff any given web project might need, but now I feel like it is intimidating in a way it doesn’t need to be. The boilerplate index file is also quite opinionated. It assumes Normalize and Modernizr, which are certainly not deprecated projects, but also not things I see developers reaching for much anymore. It even assumes Google Analytics usage!</p> <p>I have no problem with people having and sharing boilerplate documents, but considering how unavoidable being opinionated it is with them, I also like the reference guide approach. Just show me every possible thing that can go in the </p> (a lot of the value of these boilerplates), and I’ll pick and choose what I need (or may have forgotten). To that end, Josh Buchea’s HEAD project is pretty cool.

The above is the detailed content of HTML Boilerplates. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Create a JavaScript Contact Form With the Smart Forms Framework Create a JavaScript Contact Form With the Smart Forms Framework Mar 07, 2025 am 11:33 AM

Create a JavaScript Contact Form With the Smart Forms Framework

Adding Box Shadows to WordPress Blocks and Elements Adding Box Shadows to WordPress Blocks and Elements Mar 09, 2025 pm 12:53 PM

Adding Box Shadows to WordPress Blocks and Elements

Working With GraphQL Caching Working With GraphQL Caching Mar 19, 2025 am 09:36 AM

Working With GraphQL Caching

Making Your First Custom Svelte Transition Making Your First Custom Svelte Transition Mar 15, 2025 am 11:08 AM

Making Your First Custom Svelte Transition

Demystifying Screen Readers: Accessible Forms & Best Practices Demystifying Screen Readers: Accessible Forms & Best Practices Mar 08, 2025 am 09:45 AM

Demystifying Screen Readers: Accessible Forms & Best Practices

Comparing the 5 Best PHP Form Builders (And 3 Free Scripts) Comparing the 5 Best PHP Form Builders (And 3 Free Scripts) Mar 04, 2025 am 10:22 AM

Comparing the 5 Best PHP Form Builders (And 3 Free Scripts)

Show, Don't Tell Show, Don't Tell Mar 16, 2025 am 11:49 AM

Show, Don't Tell

What the Heck Are npm Commands? What the Heck Are npm Commands? Mar 15, 2025 am 11:36 AM

What the Heck Are npm Commands?

See all articles