HTML5 Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites.
This project is the product of over 10 years of iterative development and community knowledge. It does not impose a specific development philosophy or framework, so you're free to architect your code in the way that you want.
This repository is where HTML5-Boilerplate is authored. Some of the tools, files and processes that you see here are solely for the production of HTML5 Boilerplate and are not part of HTML5 Boilerplate. For one example, the gulpfile.mjs script is used to build the project. It's not part of the project itself.
The project we publish is represented by the contents of the /dist/
folder. Everything else in this repository is used to author the project.
Think of it this way, in the same way that you don't clone vuejs/core to create a Vue.js app, you don't need to clone this repository to start a new site or app based on HTML5 Boilerplate.
So, if you're looking for a quick start template to build a website or application, look at the options in the Quick Start section of this document.
If you want to help us improve HTML5 Boilerplate then you can start with the documentation here, which includes steps to clone this repo in order to get it set up for development.
Choose one of the following options:
-
Using the create-html5-boilerplate script, instantly fetch the latest npm published package (or any version available on npm) with
npx
,npm init
oryarn create
without having to install any dependencies. Running the followingnpx
command installs the latest version into a folder callednew-site
npx create-html5-boilerplate new-site cd new-site npm install npm run start
Using our new Template Repository create a new GitHub repository based on the latest code from the main branch of HTML5 Boilerplate.
Install with npm:
npm install html5-boilerplate
or yarn:yarn add html5-boilerplate
. The resultingnode_modules/html5-boilerplate/dist
folder represents the latest version of the project for end users. Depending on what you want to use and how you want to use it, you may have to copy and paste the contents of that folder into your project directory.Download the latest stable release from here. This zip file is a snapshot of the
dist
folder. On Windows, Mac and from the file manager on Linux unzipping this folder will output to a folder named something likehtml5-boilerplate_v9.0.0
. From the command-line, you will need to create a folder and unzip the contents into that folder.mkdir html5-boilerplate unzip html5-boilerplate*.zip -d html5-boilerplate
- A finely-tuned starter template: Reap the benefits of 10 years of analysis, research and experimentation by over 200 contributors.
- Designed with progressive enhancement in mind.
- Includes:
- Placeholder Open Graph elements and attributes.
- An example package.json file with WebPack commands built in to jumpstart application development.
- Placeholder CSS Media Queries.
- Useful CSS helper classes.
- Default print styles, performance optimized.
- "Delete-key friendly." Easy to strip out parts you don't need.
- Extensive documentation.
HTML5-Boilerplate supports the latest, stable releases of all major browsers.
Check the
default
configuration from Browserslist for more details on browsers and versions covered.Take a look at the documentation table of contents. This documentation is bundled with the project which makes it available for offline reading and provides a useful starting point for any documentation you want to write about your project.
Hundreds of developers have helped to make the HTML5 Boilerplate. Anyone is welcome to contribute. However, if you decide to get involved, please take a moment to review the guidelines:
The code is available under the MIT license.
html5-boilerplate's People
Forkers
andrewkolesnikov ncrovatti choonkeat rmdort mikebucks garowetz ryanflorence edwardgalligan subtlegradient peterarmstrong rizkysyazuli ekoontz abdulchalik vigvari neurogami davidnorth motionlab bvt macskeptic roccostorm misterxavier pixelhandler rjorgenson joebushi roblarsen heintzsight michaelcgorman sanand radarseven robrighter nevvkid durdn jcsiegrist m0nkey csamuel eadz duggi o19s ljxia fabiogaldo tanle gerrit jaygilmore umaar dibeja rmanalan espnmobile cloudbring robflaherty steo iamamused jzmudzinski latentflip jduff mstahl thefrontside jordandobson digikev rowedev vladikoff m4dc4p rendydev gijs ashitvora-zz dieseltravis westonruter grigio sirupsen jeffyoung23 teleject billnordwall bryanjswift scfrisby monteslu bdtomlin unruthless neilholcomb fusionstrings tonyjcamp rwaldron ryangiglio bhatti rthrash johnantoni k1000 buritica boldewyn strogo randalem cole matthewjones skilldrick bjrn acnithin d2s davidykay seanpowell iansym cmerot bzeranguehtml5-boilerplate's Issues
absorb some ideas from kroc camen
css: http://camendesign.com/design/
htaccess: http://camendesign.com/.htaccessboth are incredible.
Invalid HTML5 code
validator.w3.org complains about several errors.
Arial and Helvetica vs just sans-serif
From Comment on html5boilerplate.com: http://html5boilerplate.com/#comment-67622441
Key Points:
In general Arial is a better screen font than Helvetica being developed for the screen in the first place. More pressing problem is that Helvetica on Windows does not render well at all and you don't want to ignore the majority of your audience ;) - http://html5boilerplate.com/#comment-67626905
This is very true - Helvetica on Windows looks awful. But can't this be solved by simply using sans-serif as the first font-face? I'm pretty sure that will default to Helvetica on Macs and Arial on Windows. - http://html5boilerplate.com/#comment-67654932
<Location/> tags in htaccess are throwing errors.
I'm not genius when it comes to apache config but the two instances of
...
are throwing errors.We need to revise that.
sitemap.xml ?
via: http://twitter.com/tedgoas/status/20820324262
should it be referenced in robots.txt ?
or just prevent a 404 and have guides on how to use it.
No <article> and no <section>
Why are "article" and "section" tags not used but "div" tags with id "container" and "main" ?
extract ideas from One Source to Rule them pres
needs more cowbell
http://html5boilerplate.com renders poorly in IE6
The project site is rendering quite poorly in IE6, running on Windows XP in a VMware Fusion image.
mobile stylesheet include
i'm not sure on the best way to serve this..
from:
http://www.cssquirrel.com/presentations/refresh-2009-12/<link rel="stylesheet" href="mobile.css" media="handheld, screen and (max-device-width: 480px)" type="text/css" /> (Since the iPhone Thinks It's a Big Boy) <link rel="stylesheet" href="mobile.css" media="handheld, only screen and (max-device-width: 480px)" type="text/css" /> (To Help An Anonymous Quirky Browser So It Won't Think It's Mobile) <link rel="stylesheet" href="mobile.css" media="handheld, only screen and (max-device-width: 480px)" type="text/css" /> <meta name="viewport" content="width = 320" /> (So The iPhone Won't Be Zoomed Out) Here's A Solution <link rel="stylesheet" href="standard.css" media="screen and (min-device-width: 481px)" type="text/css" /> <link rel="stylesheet" href="mobile.css" media="handheld, only screen and (max-device-width: 480px)" type="text/css" /> (Option To Override With JS-Powered Switch) (Save It With A Cookie)
Gzip cookie solution from even faster websites
launch todos
DONE:
- header/footer elements.
- clarify license
- contributors section (and inspired by ish) - we'll include html5reset
- rename github repo
TODO:
- create non-documented release zip
- name that non-documented release.. (ideas?)
- write post
- contact homies
microformats?
anything i can do for that?
button padding in ff
button::-moz-focus-inner {border: none; /* overrides extra padding in Firefox */}
Update jquery version used by test
jquery-1.2.6.js is obsolete.
accessibility guidelines ?
are there any guidelines we can add to the default?
or guidance?outline styling for accessibility.
from patrick lauke, who did the research:
@paul_irish @jared_w_smith i'd actually remove a:focus { outline: thin dotted; } as you're not suppressing it for generic a
@paul_irish @jared_w_smith and replace a:active { outline: none; } with a:hover, a:active { outline: none; } perhaps?
nginx config
htaccess config port by voodootikigod: https://gist.github.com/225907185304dba63f38
nerf'd document.write will throw
"@paul_irish docwrite will throw because the
this
argument is incorrect. testcase http://bit.ly/d0ZGca #html5boilerplate"via http://twitter.com/fearphage/status/20818399005
that sucks...
script loading solution
# This issue thread is now closed. ## It was fun, but the conversations have moved elsewhere for now. Thanks ### In appreciation of the funtimes we had, @rmurphey made us a happy word cloud of the thread.Enjoy.
via labjs or require.
my "boilerplate" load.js file has LABjs inlined in it, and then uses it to load jquery, GA, and one site js file. if it helps, I have an integrated RequireJS+jQuery in one file: http://bit.ly/dAiqEG ;)
also how does this play into the expectation of a build script that concatenates and minifies all script? should script loading be an option?
deflating svgz needless?
"looking at http://html5boilerplate.com deflating svgz files seems a bit wasteful to me, svgz is meant to be gzip-compressed already"
.htaccess some comments cause errors
these 2 comments cause err500 (for me at least)
ExpiresByType image/vnd.microsoft.icon "access plus 1 week" #favicon.ico
and
FileETag Size #can this be moved outside of the Location block?
placing the comments on separate lines solves the issue
tell the other folks
http://github.com/chrislloyd/tyrone
and 52framework guySuggestions for the "so you want more?" section
(basically links to other techniques that are really good, but probably overboard for what should be an empty template without a lot of opinionated architecture.)
... to be continued.
aria roles
disable combined includes by default
based on Chris Dary's comments: http://html5boilerplate.com/#comment-68227405
He also recommends
IncludesNOEXEC
:
http://httpd.apache.org/docs/2.0/misc/security_tips.html#ssiI think it'd be fine to disable by default. It's a more pro-level feature you should have to opt-in to, I think.
JavaScript issue in IE6 when you visit http://html5boilerplate.com
I'm getting an error in IE6, running on Windows XP in a VMware Fusion image, when I visit http://html5boilerplate.com.
links/recommendations for the Suggestions section
- yes it works with a grid: 960 or what-have-you
- css3pie? mmmaybe..
- omg css3please!
any other recommendations for additions for the boilerplate or Next Steps part should go here:
Port it to Haml/Sass
Update DD_belatedPN to 0.0.8a
Why not use the latest version?
Set font-size only on body for handheld.css
From Enrique Ramirez http://html5boilerplate.com/#comment-68239665
"Reducing font size to 80% on ALL elements is, again, a really bad idea. This should be body {font-size: 80%}."
Vary and Last-Modified headers
via aaron peters at http://html5boilerplate.com/#comment-67835184
You can further improve browser and proxy caching, and thus page performance:
- To ensure proxy caching of CSS and JS files, ensure you send the Vary: Accept-Encoding response header as well (not just the Cache-control: public header), if you send them Gzipped.
http://code.google.com/speed/page-speed/docs/caching.html#LeverageProxyCaching
- Send the Last-Modified header, to enable browser to make conditional requests and enable the server to send a (small, fast) 304 response.
Set the Last-Modified date to the last time the resource was changed.
http://code.google.com/speed/page-speed/docs/caching.html#LeverageBrowserCaching
mobile/iOS css revisions
(I have revised this ticket summary after the issue has been fixed for clarity)
- Scott jehl was concerned with maximum scale = 1
- @riddle posted a few concerns as well.. "No scaling, no text adjustment?"
After discussions with Matt Henry, a front-end dev mobile expert, recently from Yahoo!, now at Viget...
We concluded to drop maximum-scale=1 and leave text-size-adjust commented out by default.max-scale doesnt let the user zoom in as they please. However it prevents some weird layout shifting when a device is changed from portrait to landscape. It doesn't seem like a good default.
initial-scale remains 1. It's default is 'auto' and I have no understanding why a mobile browser would set it to anything other than 1, but it's explicitly set for now..
Also.. worth watching http://people.opera.com/rune/TR/css-viewport/ (though it's unimplemented anywhere so far)
default favicon.ico
My bet is a default would help people change it to something more fitting, than if it stays blank.
Suggestions on the favicon? http://miketaylr.com/favicon.ico is a personal favorite.
Optimize fallback to local jQuery (screw `unescape`!)
It's awesome you've added a fallback jQuery in case Google’s CDN goes down. Currently, you're using the following code:
<script>!window.jQuery && document.write(unescape('%3Cscript src="js/jquery-1.4.2.min.js"%3E%3C/script%3E'))</script>
You might be able to save a few precious milliseconds by getting rid of the
unescape()
call and using string literal escapes (\xNN
) instead.<script>!window.jQuery && document.write('\x3Cscript src="js/jquery-1.4.2.min.js"\x3E\x3C/script\x3E')</script>
webm
Add WebM to the .htaccess file:
AddType video/webm webmthx Kenneth D. Nordahl
javascript and css versioning
Since you are using such far-future expires headers for caching in the .htaccess file should you not be using a format to version your css and javascript files.
Such as the "script.js?v=1.0" or similar example in the .htaccess file
html5boilerplate.com paragraph issue on mobile safari
The first paragraph doesn't wrap it just keeps going off to right.
I'll add more when I look at the code tomorrow.
miketaylr's feedback
Notes on Paul Irish's starter template.
Mike Taylor
11/08/2009- meta name=keywords? I'm no SEO wizard, but I tend to still use this guy in conjunction with meta name=description.
- using HTML5 doctype and a html5 shiv script for IE, yet
<div id=header>, <div id=footer>
.
Why not<header> & <footer>
? Although I can understand if you don't want to force people to go server-side to fix FF2. - How is
<html lang=en>
different from<meta http-equiv="content-language" content="en">
? There might be something I'm not aware of here. - In html5,
<script type>
defaults to text/javascript if not present. So, you can leave it out if you want to live in the future. I don't know if there are any real-world consequences to doing so today.
http://www.whatwg.org/specs/web-apps/current-work/#script
'(The default, which is used if the attribute is absent, is "text/javascript".)'- Remy's html5 enabling script is a little out of date--
<dialog>
is no longer in the spec, nor is<eventsource>
. (There are naturally more new elements in the spec, but I can't imagine you'd try to style a - In script.js small typo:
//common domready code => common domready code
- In script.js FOO.config and FOO.strings could use some simple explanatory comments to explain why they're in there.
- In reset.css:
- dialog can be removed from lines 21 and 36.
- Line 32 of the html5 reset stylesheet (body{line-height:1} is essentially getting overwritten by line 109 (yui's body * {line-height:1.22em}, right? Or would there be some meaningful reason to have body at 1 but all of body's descendants at 1.22em? If not, 32 could be removed.
- Shouldn't line 121 also include .ie6? i.e., .ie6 img, .ie7 img {-ms-interpol...;}
- A few missing ending semi-colons: line 129, 140, 151, 152
- If you were crazy like i am, you could change line 144 -> color: #003366 -> color: #36.
Suggestion on using body as a wrapper.
From Kroc Camen:
http://camendesign.com/code/developpeurs_sans_frontieresThis might have to end up in a piece of documentation if I can't find a way to work it into the source or "make it better" section.
Apply IE conditional classes to html tag (instead of body)
This is not really an issue but based on http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/#comment-33260 would be nice to change the IE conditional classes to html tag.
As said, that will not block the download and save some bytes from the empty conditional comment at http://github.com/paulirish/html5-boilerplate/blob/master/index.html#L7
Thanks for your time!
htaccess additions
A build script is necessary
- js/css concat and minification
- html minification
- filename revving for far-future expries.
- image optimization (jpegtran, pngcrush, etc)
others: http://daverupert.com/2010/06/web-performant-wordpress/
I'm unsure on how this could be added to the project in a general way.. something php/ruby/py/html folks could all use it.
remove backgroundImageCache guy as dd_belatedpng already does it.
via: http://twitter.com/3rdEden/status/20820800535
Confirmed!
Documentation: How to use Boilerplate effectively
Talking to some folks, I come to realize the templates definitely could use some documentation.
I'm going to just keep updating the content of this ticket, if anyone has anything to add, comment.- What is htaccess and what does it do?
- What is Modernizr and what does it do?
- What do I have to do when I updated my images, css, or js?
- If you're not using the apache .htaccess, you're fine. Otherwise.. there is fairly moderate caching on the static assets so users don't redownload them every pageload. As a result, you'll have to increment the ?v=1 to 2 and beyond each time you push the changes live to your host. (This will be addressed automatically in the future with a build script)
- What's going on in plugins.js?
** Hypothetically you'd put your jquery plugins inside of the(function($){ ... })(jQuery)
block. This is good incase the plugin developers didn't write their plugins well.
a name!
freestylehtml
thestartingtemplate
sensible markup
the markup zygote
website embryo"an un-framework"
Stoyan suggest using conditional comments for body classes slows page load
http://www.phpied.com/conditional-comments-block-downloads/
Suggested soln is:
<!--[if lte IE 7]> <link type="text/css" rel="stylesheet" href="http://tools.w3clubs.com/pagr/2.expires.css"> <![endif]--> <!--[if gt IE 7]><!--> <link type="text/css" rel="stylesheet" href="http://tools.w3clubs.com/pagr/1.expires.css"> <!--<![endif]-->
consider new clearfix
http://www.paulrhayes.com/2010-08/useful-css-snippets/
via kroc camen
monospace styles
from peter @riddle:
pre, code, kbd, samp { font-family: monospace, sans-serif; }
apache syntaxhighlighter brush
Right now on the site http://html5boilerplate.com - the entire htaccess section is pretty ugly looking. This is because there is no "brush" for the syntax highlighter script we're using.
http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/
It would be pimp to have a real brush so the section would come off looking pretty good.
Anyone would regex smarts could tackle this in an hour or so.
http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/custom.htmlRecommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.