HTML Boilerplates

No Comments

Manuel Matuzović goes line-by-line by means of a boilerplate HTML doc. I prefer it. It’s a superb reference and has a variety of the identical sort of stuff I are inclined to put in the principle HTML template. It makes me take into consideration how opinionated this sort of factor will be. Dang close to each line! Not the DOCTYPE, not the <title>, however almost every part else.


<!DOCTYPE html>
<html lang=”en” class=”no-js”>
<meta charset=”UTF-8″>
<meta title=”viewport” content material=”width=device-width”>

<title>Distinctive web page title – My Web site</title>

<script sort=”module”>
doc.documentElement.classList.take away(‘no-js’);

<hyperlink rel=”stylesheet” href=”/property/css/types.css”>
<hyperlink rel=”stylesheet” href=”/property/css/print.css” media=”print”>

<meta title=”description” content material=”Web page description”>
<meta property=”og:title” content material=”Distinctive web page title – My Web site”>
<meta property=”og:description” content material=”Web page description”>
<meta property=”og:picture” content material=””>
<meta property=”og:picture:alt” content material=”Picture description”>
<meta property=”og:locale” content material=”en_GB”>
<meta property=”og:sort” content material=”web site”>
<meta title=”twitter:card” content material=”summary_large_image”>
<meta property=”og:url” content material=” page”>
<hyperlink rel=”canonical” href=” page”>

<hyperlink rel=”icon” href=”/favicon.ico”>
<hyperlink rel=”icon” href=”/favicon.svg” sort=”picture/svg+xml”>
<hyperlink rel=”apple-touch-icon” href=”/apple-touch-icon.png”>
<hyperlink rel=”manifest” href=”/my.webmanifest”>
<meta title=”theme-color” content material=”#FF00FF”>

<!– Content material –>
<script src=”/property/js/xy-polyfill.js” nomodule></script>
<script src=”/property/js/script.js” sort=”module”></script>

Possibly my web site doesn’t use any JavaScript or have no-JavaScript fallbacks so I don’t want any of the category title dancing. Possibly my web site doesn’t want print types, however I do want hyperlink prefetching. Possibly I don’t care about social photos, however I do need vital CSS within the head. It’s a boilerplate, not a prescription — it’s meant to be modified.

There was a time when HTML5 Boilerplate was an enormous venture on this house. It has a complete GitHub Org! The boilerplate has 50,000 stars! Personally, I really feel just like the venture misplaced its approach when it began to have a src and dist folder and a 200-line Gulp construct course of, ya know? It labored greatest as a reference for what stuff any given net venture may want, however now I really feel like it’s intimidating in a approach it doesn’t have to be. The boilerplate index file can be fairly opinionated. It assumes Normalize and Modernizr, that are definitely not deprecated initiatives, but additionally not issues I see builders reaching for a lot anymore. It even assumes Google Analytics utilization!

I’ve no drawback with folks having and sharing boilerplate paperwork, however contemplating how unavoidable being opinionated it’s with them, I additionally just like the reference information method. Simply present me each doable factor that may go within the <head> (a variety of the worth of those boilerplates), and I’ll choose and select what I want (or might have forgotten). To that finish, Josh Buchea’s HEAD venture is fairly cool.

The publish HTML Boilerplates appeared first on CSS-Tips.

You possibly can help CSS-Tips by being an MVP Supporter.

    About Marketing Solution Australia

    We are a digital marketing company with a focus on helping our customers achieve great results across several key areas.

    Request a free quote

    We offer professional SEO services that help websites increase their organic search score drastically in order to compete for the highest rankings even when it comes to highly competitive keywords.

    Subscribe to our newsletter!

    More from our blog

    See all posts

    Leave a Comment