├── src ├── js │ ├── app.js │ └── vendor │ │ └── .gitkeep ├── img │ └── .gitkeep ├── icon.png ├── favicon.ico ├── robots.txt ├── .editorconfig ├── .gitignore ├── webpack.common.js ├── site.webmanifest ├── webpack.config.dev.js ├── icon.svg ├── package.json ├── webpack.config.prod.js ├── index.html ├── 404.html └── .gitattributes ├── dist ├── img │ └── .gitkeep ├── js │ ├── app.js │ └── vendor │ │ └── .gitkeep ├── icon.png ├── favicon.ico ├── robots.txt ├── .editorconfig ├── .gitignore ├── webpack.common.js ├── site.webmanifest ├── webpack.config.dev.js ├── icon.svg ├── package.json ├── webpack.config.prod.js ├── index.html ├── LICENSE.txt ├── 404.html ├── .gitattributes └── css │ └── style.css ├── .prettierignore ├── .npmrc ├── .gitignore ├── .github ├── SUPPORT.md ├── ISSUE_TEMPLATE │ ├── config.yml │ ├── feature_request.yml │ └── bug_report.yml ├── dependabot.yml ├── workflows │ ├── dependency-review.yml │ ├── spellcheck.yml │ ├── codeql-analysis.yml │ ├── test.yml │ ├── ossf-scorecard.yml │ ├── push-to-template.yml │ ├── build-dist.yml │ └── publish.yml ├── PULL_REQUEST_TEMPLATE.md ├── CODE_OF_CONDUCT.md └── CONTRIBUTING.md ├── .vscode ├── extensions.json └── settings.json ├── .prettierrc.json ├── .editorconfig ├── .cspell.json ├── docs ├── js.md ├── faq.md ├── css.md ├── TOC.md ├── usage.md ├── misc.md ├── html.md ├── about-this-repo.md └── extend.md ├── eslint.config.mjs ├── .gitattributes ├── LICENSE.txt ├── package.json ├── test ├── file_content.mjs └── file_existence.mjs ├── gulpfile.mjs ├── README.md └── CHANGELOG.md /src/js/app.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dist/img/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dist/js/app.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/img/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dist/js/vendor/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/js/vendor/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | lockfile-version = 3 2 | registry = "https://registry.npmjs.org/" 3 | -------------------------------------------------------------------------------- /src/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h5bp/html5-boilerplate/HEAD/src/icon.png -------------------------------------------------------------------------------- /dist/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h5bp/html5-boilerplate/HEAD/dist/icon.png -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h5bp/html5-boilerplate/HEAD/src/favicon.ico -------------------------------------------------------------------------------- /dist/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h5bp/html5-boilerplate/HEAD/dist/favicon.ico -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/.DS_Store 2 | archive 3 | node_modules 4 | packages 5 | dist/package-lock.json 6 | src/package-lock.json 7 | -------------------------------------------------------------------------------- /dist/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/ 2 | 3 | # Allow crawling of all content 4 | User-agent: * 5 | Disallow: 6 | -------------------------------------------------------------------------------- /src/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/ 2 | 3 | # Allow crawling of all content 4 | User-agent: * 5 | Disallow: 6 | -------------------------------------------------------------------------------- /.github/SUPPORT.md: -------------------------------------------------------------------------------- 1 | # Support 2 | 3 | For personal support requests with HTML5 Boilerplate please use Stack Overflow 4 | ([`html5boilerplate`](https://stackoverflow.com/questions/tagged/html5boilerplate) 5 | tag). 6 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "dbaeumer.vscode-eslint", 4 | "editorconfig.editorconfig", 5 | "esbenp.prettier-vscode", 6 | "streetsidesoftware.code-spell-checker" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /dist/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | end_of_line = lf 8 | indent_size = 2 9 | indent_style = space 10 | insert_final_newline = true 11 | trim_trailing_whitespace = true 12 | -------------------------------------------------------------------------------- /src/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | end_of_line = lf 8 | indent_size = 2 9 | indent_style = space 10 | insert_final_newline = true 11 | trim_trailing_whitespace = true 12 | -------------------------------------------------------------------------------- /dist/.gitignore: -------------------------------------------------------------------------------- 1 | # Include your project-specific ignores in this file 2 | # Read about how to use .gitignore: https://help.github.com/articles/ignoring-files 3 | # Useful .gitignore templates: https://github.com/github/gitignore 4 | node_modules 5 | dist 6 | .cache -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | # Include your project-specific ignores in this file 2 | # Read about how to use .gitignore: https://help.github.com/articles/ignoring-files 3 | # Useful .gitignore templates: https://github.com/github/gitignore 4 | node_modules 5 | dist 6 | .cache -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Ask the community 4 | url: https://github.com/h5bp/html5-boilerplate/discussions/new 5 | about: Ask and discuss questions with other HTML5 Boilerplate community members. 6 | -------------------------------------------------------------------------------- /dist/webpack.common.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = { 4 | entry: { 5 | app: './js/app.js', 6 | }, 7 | output: { 8 | path: path.resolve(__dirname, 'dist'), 9 | clean: true, 10 | filename: './js/app.js', 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /src/webpack.common.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = { 4 | entry: { 5 | app: './js/app.js', 6 | }, 7 | output: { 8 | path: path.resolve(__dirname, 'dist'), 9 | clean: true, 10 | filename: './js/app.js', 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "bracketSameLine": true, 3 | "embeddedLanguageFormatting": "off", 4 | "singleQuote": true, 5 | "overrides": [ 6 | { 7 | "files": "**/*.yml", 8 | "options": { 9 | "singleQuote": false 10 | } 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /dist/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "", 3 | "name": "", 4 | "icons": [{ 5 | "src": "icon.png", 6 | "type": "image/png", 7 | "sizes": "192x192" 8 | }], 9 | "start_url": "/?utm_source=homescreen", 10 | "background_color": "#fafafa", 11 | "theme_color": "#fafafa" 12 | } 13 | -------------------------------------------------------------------------------- /src/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "", 3 | "name": "", 4 | "icons": [{ 5 | "src": "icon.png", 6 | "type": "image/png", 7 | "sizes": "192x192" 8 | }], 9 | "start_url": "/?utm_source=homescreen", 10 | "background_color": "#fafafa", 11 | "theme_color": "#fafafa" 12 | } 13 | -------------------------------------------------------------------------------- /src/webpack.config.dev.js: -------------------------------------------------------------------------------- 1 | const { merge } = require('webpack-merge'); 2 | const common = require('./webpack.common.js'); 3 | 4 | module.exports = merge(common, { 5 | mode: 'development', 6 | devtool: 'inline-source-map', 7 | devServer: { 8 | liveReload: true, 9 | hot: true, 10 | open: true, 11 | static: ['./'], 12 | }, 13 | }); 14 | -------------------------------------------------------------------------------- /dist/webpack.config.dev.js: -------------------------------------------------------------------------------- 1 | const { merge } = require('webpack-merge'); 2 | const common = require('./webpack.common.js'); 3 | 4 | module.exports = merge(common, { 5 | mode: 'development', 6 | devtool: 'inline-source-map', 7 | devServer: { 8 | liveReload: true, 9 | hot: true, 10 | open: true, 11 | static: ['./'], 12 | }, 13 | }); 14 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # For more information about the properties used in 2 | # this file, please see the EditorConfig documentation: 3 | # https://editorconfig.org/ 4 | 5 | root = true 6 | 7 | [*] 8 | charset = utf-8 9 | end_of_line = lf 10 | indent_size = 2 11 | indent_style = space 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | 15 | [*.md] 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /dist/icon.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/icon.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: "/" 5 | schedule: 6 | interval: monthly 7 | versioning-strategy: increase 8 | - package-ecosystem: npm 9 | directory: "/src/" 10 | schedule: 11 | interval: monthly 12 | versioning-strategy: increase 13 | - package-ecosystem: github-actions 14 | directory: "/" 15 | schedule: 16 | interval: monthly 17 | -------------------------------------------------------------------------------- /.cspell.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2", 3 | "words": [ 4 | "codeql", 5 | "devdeps", 6 | "FOUC", 7 | "lighttpd", 8 | "mkdir", 9 | "modernizr", 10 | "robotstxt", 11 | "vuejs", 12 | "cpina" 13 | ], 14 | "language": "en,en-GB,en-US", 15 | "allowCompoundWords": true, 16 | "files": ["**/*.md"], 17 | "ignoreRegExpList": ["\\_\\w+", "\\#\\w+"], 18 | "ignorePaths": [".cspell.json"], 19 | "useGitignore": true 20 | } 21 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "[javascript][typescript][json][jsonc][markdown][yaml]": { 3 | "editor.defaultFormatter": "esbenp.prettier-vscode", 4 | "editor.formatOnSave": true 5 | }, 6 | "[javascript][typescript]": { 7 | "editor.codeActionsOnSave": { 8 | "source.fixAll.eslint": "explicit" 9 | } 10 | }, 11 | "eslint.validate": ["javascript", "typescript"], 12 | "editor.formatOnSave": true, 13 | "editor.renderWhitespace": "all", 14 | "files.trimTrailingWhitespace": true 15 | } 16 | -------------------------------------------------------------------------------- /docs/js.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # The JavaScript 5 | 6 | Information about the default JavaScript included in the project. 7 | 8 | ## app.js 9 | 10 | This file can be used to contain or reference your site/app JavaScript code. If 11 | you're working on something more advanced you might replace this file entirely. 12 | That's cool. 13 | 14 | ## vendor 15 | 16 | This directory can be used to contain all third-party library code. 17 | -------------------------------------------------------------------------------- /.github/workflows/dependency-review.yml: -------------------------------------------------------------------------------- 1 | name: "Dependency Review" 2 | on: [pull_request] 3 | 4 | permissions: 5 | contents: read 6 | 7 | jobs: 8 | dependency-review: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: "Checkout Repository" 12 | uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 13 | with: 14 | persist-credentials: false 15 | 16 | - name: "Dependency Review" 17 | uses: actions/dependency-review-action@595b5aeba73380359d98a5e087f648dbb0edce1b # v4.7.3 18 | -------------------------------------------------------------------------------- /docs/faq.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # Frequently asked questions 5 | 6 | ## Do I need to upgrade my site each time a new version of HTML5 Boilerplate is released? 7 | 8 | No, just as you don't normally replace the foundation of a house once it was 9 | built. However, there is nothing stopping you from trying to work in the latest 10 | changes, but you'll have to assess the costs/benefits of doing so. 11 | 12 | ## Where can I get help with support questions? 13 | 14 | Please ask for help on 15 | [Stack Overflow](https://stackoverflow.com/questions/tagged/html5boilerplate). 16 | -------------------------------------------------------------------------------- /dist/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": " ", 3 | "version": "0.0.1", 4 | "description": "", 5 | "private": true, 6 | "keywords": [ 7 | "" 8 | ], 9 | "license": "", 10 | "author": "", 11 | "scripts": { 12 | "test": "echo \"Error: no test specified\" && exit 1", 13 | "start": "webpack serve --open --config webpack.config.dev.js", 14 | "build": "webpack --config webpack.config.prod.js" 15 | }, 16 | "devDependencies": { 17 | "copy-webpack-plugin": "^13.0.1", 18 | "html-webpack-plugin": "^5.6.4", 19 | "webpack": "^5.101.3", 20 | "webpack-cli": "^6.0.1", 21 | "webpack-dev-server": "^5.2.2", 22 | "webpack-merge": "^6.0.1" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": " ", 3 | "version": "0.0.1", 4 | "description": "", 5 | "private": true, 6 | "keywords": [ 7 | "" 8 | ], 9 | "license": "", 10 | "author": "", 11 | "scripts": { 12 | "test": "echo \"Error: no test specified\" && exit 1", 13 | "start": "webpack serve --open --config webpack.config.dev.js", 14 | "build": "webpack --config webpack.config.prod.js" 15 | }, 16 | "devDependencies": { 17 | "copy-webpack-plugin": "^13.0.1", 18 | "html-webpack-plugin": "^5.6.4", 19 | "webpack": "^5.101.3", 20 | "webpack-cli": "^6.0.1", 21 | "webpack-dev-server": "^5.2.2", 22 | "webpack-merge": "^6.0.1" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /.github/workflows/spellcheck.yml: -------------------------------------------------------------------------------- 1 | name: "Check spelling" 2 | on: # rebuild any PRs and main branch changes 3 | push: 4 | branches-ignore: 5 | - "dependabot/**" 6 | pull_request: 7 | 8 | permissions: 9 | contents: read 10 | 11 | jobs: 12 | spellcheck: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 16 | with: 17 | persist-credentials: false 18 | 19 | - uses: streetsidesoftware/cspell-action@dcd03dc3e8a59ec2e360d0c62db517baa0b4bb6d # v7.2.0 20 | with: 21 | inline: warning 22 | strict: false 23 | incremental_files_only: true 24 | -------------------------------------------------------------------------------- /docs/css.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # The CSS 5 | 6 | HTML5 Boilerplate's CSS includes: 7 | 8 | - [style.css](#stylecss) 9 | 10 | ## style.css 11 | 12 | Several base styles are included. These styles: 13 | 14 | - provide basic typography settings that improve text readability 15 | - protect against unwanted `text-shadow` during text highlighting 16 | - tweak the default alignment of some elements (e.g.: `img`, `video`, 17 | `fieldset`, `textarea`) 18 | - style the prompt that is displayed to users using an outdated browser 19 | - and more... 20 | 21 | These styles are included in 22 | [style.css](https://github.com/h5bp/html5-boilerplate/blob/main/dist/css/style.css). 23 | -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import globals from 'globals'; 2 | import js from '@eslint/js'; 3 | import mocha from 'eslint-plugin-mocha'; 4 | import { defineConfig } from 'eslint/config'; 5 | 6 | export default defineConfig([ 7 | { 8 | files: ['**/*.js'], 9 | plugins: { 10 | js, 11 | mocha, 12 | }, 13 | languageOptions: { 14 | ecmaVersion: 2020, 15 | sourceType: 'module', 16 | globals: { 17 | ...globals.browser, 18 | ...globals.node, 19 | ...globals.mocha, 20 | }, 21 | }, 22 | extends: ['js/recommended'], 23 | rules: { 24 | // Your custom rules 25 | indent: ['error', 2], 26 | quotes: ['error', 'single'], 27 | semi: ['error', 'always'], 28 | }, 29 | }, 30 | ]); 31 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Automatically normalize line endings for all text-based files 2 | # https://git-scm.com/docs/gitattributes#_end_of_line_conversion 3 | 4 | * text=auto 5 | 6 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 7 | 8 | # For the following file types, normalize line endings to LF on 9 | # checkin and prevent conversion to CRLF when they are checked out 10 | # (this is required in order to prevent newline related issues like, 11 | # for example, after the build script is run) 12 | 13 | .* text eol=lf 14 | *.css text eol=lf 15 | *.html text eol=lf 16 | *.js text eol=lf 17 | *.json text eol=lf 18 | *.md text eol=lf 19 | *.mjs text eol=lf 20 | *.sh text eol=lf 21 | *.txt text eol=lf 22 | *.xml text eol=lf 23 | *.yml text eol=lf 24 | -------------------------------------------------------------------------------- /dist/webpack.config.prod.js: -------------------------------------------------------------------------------- 1 | const { merge } = require('webpack-merge'); 2 | const common = require('./webpack.common.js'); 3 | const HtmlWebpackPlugin = require('html-webpack-plugin'); 4 | const CopyPlugin = require('copy-webpack-plugin'); 5 | 6 | module.exports = merge(common, { 7 | mode: 'production', 8 | plugins: [ 9 | new HtmlWebpackPlugin({ 10 | template: './index.html', 11 | }), 12 | new CopyPlugin({ 13 | patterns: [ 14 | { from: 'img', to: 'img' }, 15 | { from: 'css', to: 'css' }, 16 | { from: 'js/vendor', to: 'js/vendor' }, 17 | { from: 'icon.svg', to: 'icon.svg' }, 18 | { from: 'favicon.ico', to: 'favicon.ico' }, 19 | { from: 'robots.txt', to: 'robots.txt' }, 20 | { from: 'icon.png', to: 'icon.png' }, 21 | { from: '404.html', to: '404.html' }, 22 | { from: 'site.webmanifest', to: 'site.webmanifest' }, 23 | ], 24 | }), 25 | ], 26 | }); 27 | -------------------------------------------------------------------------------- /src/webpack.config.prod.js: -------------------------------------------------------------------------------- 1 | const { merge } = require('webpack-merge'); 2 | const common = require('./webpack.common.js'); 3 | const HtmlWebpackPlugin = require('html-webpack-plugin'); 4 | const CopyPlugin = require('copy-webpack-plugin'); 5 | 6 | module.exports = merge(common, { 7 | mode: 'production', 8 | plugins: [ 9 | new HtmlWebpackPlugin({ 10 | template: './index.html', 11 | }), 12 | new CopyPlugin({ 13 | patterns: [ 14 | { from: 'img', to: 'img' }, 15 | { from: 'css', to: 'css' }, 16 | { from: 'js/vendor', to: 'js/vendor' }, 17 | { from: 'icon.svg', to: 'icon.svg' }, 18 | { from: 'favicon.ico', to: 'favicon.ico' }, 19 | { from: 'robots.txt', to: 'robots.txt' }, 20 | { from: 'icon.png', to: 'icon.png' }, 21 | { from: '404.html', to: '404.html' }, 22 | { from: 'site.webmanifest', to: 'site.webmanifest' }, 23 | ], 24 | }), 25 | ], 26 | }); 27 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |

Hello world! This is HTML5 Boilerplate.

29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |

Hello world! This is HTML5 Boilerplate.

29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | name: "CodeQL" 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - "!dependabot/**" 8 | pull_request: 9 | branches: 10 | - main 11 | - "!dependabot/**" 12 | workflow_dispatch: 13 | 14 | jobs: 15 | analyze: 16 | name: Analyze 17 | runs-on: ubuntu-latest 18 | permissions: 19 | actions: read 20 | contents: read 21 | security-events: write 22 | 23 | steps: 24 | - name: Checkout repository 25 | uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 26 | with: 27 | persist-credentials: false 28 | 29 | - name: Initialize CodeQL 30 | uses: github/codeql-action/init@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5 31 | with: 32 | languages: "javascript" 33 | queries: +security-and-quality 34 | 35 | - name: Perform CodeQL Analysis 36 | uses: github/codeql-action/analyze@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5 37 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) HTML5 Boilerplate 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /dist/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) HTML5 Boilerplate 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Build status 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | pull_request: 7 | branches: [main] 8 | workflow_dispatch: 9 | 10 | permissions: 11 | contents: read 12 | 13 | jobs: 14 | build: 15 | runs-on: ${{ matrix.os }} 16 | strategy: 17 | matrix: 18 | node-version: 19 | - 20 20 | - 22 21 | - 24 22 | os: [ubuntu-latest, windows-latest] 23 | 24 | steps: 25 | - name: Get npm cache directory 26 | id: npm-cache 27 | run: | 28 | echo "dir=$(npm config get cache)" >> "$GITHUB_OUTPUT" 29 | - uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3.4.3 30 | with: 31 | path: ${{ steps.npm-cache.outputs.dir }} 32 | key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} 33 | restore-keys: | 34 | ${{ runner.os }}-node- 35 | - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 36 | - name: Run tests ${{ matrix.node-version }} 37 | uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 38 | with: 39 | node-version: ${{ matrix.node-version }} 40 | - run: npm ci 41 | - run: npm test 42 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | name: Feature request 2 | description: Suggest new or updated features to include in HTML5 Boilerplate. 3 | title: "Suggest a new feature" 4 | labels: [feature] 5 | assignees: [] 6 | body: 7 | - type: checkboxes 8 | attributes: 9 | label: Prerequisites 10 | description: Take a couple minutes to help our maintainers work faster. 11 | options: 12 | - label: I have [searched](https://github.com/h5bp/html5-boilerplate/issues?utf8=%E2%9C%93&q=is%3Aissue) for duplicate or closed issues 13 | required: true 14 | - label: I have read the [contributing guidelines](https://github.com/h5bp/html5-boilerplate/blob/main/.github/CONTRIBUTING.md) 15 | required: true 16 | - type: textarea 17 | id: proposal 18 | attributes: 19 | label: Proposal 20 | description: Provide detailed information for what we should add, including relevant links to prior art, screenshots, or live demos whenever possible. 21 | validations: 22 | required: true 23 | - type: textarea 24 | id: motivation 25 | attributes: 26 | label: Motivation and context 27 | description: Tell us why this change is needed or helpful, and what problems it may help solve. 28 | validations: 29 | required: true 30 | -------------------------------------------------------------------------------- /dist/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Page Not Found 7 | 8 | 54 | 55 | 56 | 57 |

Page Not Found

58 |

Sorry, but the page you were trying to view does not exist.

59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /src/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Page Not Found 7 | 8 | 54 | 55 | 56 | 57 |

Page Not Found

58 |

Sorry, but the page you were trying to view does not exist.

59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Types of changes 2 | 3 | 4 | 5 | - [ ] Bug fix (non-breaking change which fixes an issue) 6 | - [ ] New feature (non-breaking change which adds functionality) 7 | - [ ] Breaking change (fix or feature that would cause existing functionality to change) 8 | 9 | ## Checklist: 10 | 11 | 12 | 13 | 14 | - [ ] My code follows the code style of this project. 15 | - [ ] My change requires a change to the documentation. 16 | - [ ] I have updated the documentation accordingly. 17 | - [ ] I have read the **[CONTRIBUTING](https://github.com/h5bp/html5-boilerplate/blob/main/.github/CONTRIBUTING.md)** document. 18 | - [ ] I have added tests to cover my changes. 19 | - [ ] All new and existing tests passed. 20 | 21 | Pull requests should be thought of as a conversation. There will be some back and forth when trying to get code merged into this or any other project. With all but the simplest changes you can and should expect that the maintainers of the project will request changes to your code. Please be aware of that and check in after you open your PR in order to get your code merged in cleanly. 22 | 23 | Thanks! 24 | -------------------------------------------------------------------------------- /.github/workflows/ossf-scorecard.yml: -------------------------------------------------------------------------------- 1 | name: Scorecard supply-chain security 2 | on: 3 | branch_protection_rule: 4 | schedule: 5 | - cron: '27 12 * * 2' 6 | push: 7 | branches: [ "main" ] 8 | 9 | permissions: read-all 10 | 11 | jobs: 12 | analysis: 13 | name: Scorecard analysis 14 | runs-on: ubuntu-latest 15 | if: github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request' 16 | permissions: 17 | security-events: write 18 | id-token: write 19 | 20 | steps: 21 | - name: "Checkout code" 22 | uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 23 | with: 24 | persist-credentials: false 25 | 26 | - name: "Run analysis" 27 | uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3 28 | with: 29 | results_file: results.sarif 30 | results_format: sarif 31 | publish_results: true 32 | 33 | - name: "Upload artifact" 34 | uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 35 | with: 36 | name: SARIF file 37 | path: results.sarif 38 | retention-days: 5 39 | 40 | - name: "Upload to code-scanning" 41 | uses: github/codeql-action/upload-sarif@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5 42 | with: 43 | sarif_file: results.sarif 44 | -------------------------------------------------------------------------------- /.github/workflows/push-to-template.yml: -------------------------------------------------------------------------------- 1 | name: Push to template repository 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | 7 | permissions: 8 | contents: read 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Get npm cache directory 15 | id: npm-cache 16 | run: | 17 | echo "dir=$(npm config get cache)" >> "$GITHUB_OUTPUT" 18 | - uses: actions/cache@v3 19 | with: 20 | path: ${{ steps.npm-cache.outputs.dir }} 21 | key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} 22 | restore-keys: | 23 | ${{ runner.os }}-node- 24 | - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 25 | with: 26 | persist-credentials: false 27 | - name: Setup Node.js 28 | uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 29 | with: 30 | node-version: "lts/*" 31 | - name: Install dependencies 32 | run: npm ci 33 | - name: Build 34 | run: npm run build 35 | - name: Pushes to another repository 36 | uses: cpina/github-action-push-to-another-repository@main 37 | env: 38 | API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} 39 | with: 40 | source-directory: "dist" 41 | destination-github-username: "h5bp" 42 | destination-repository-name: "html5-boilerplate-template" 43 | user-name: "roblarsen" 44 | user-email: rob@htmlcssjavascript.com 45 | commit-message: "The latest and greatest from HTML5 Boilerplate" 46 | -------------------------------------------------------------------------------- /.github/workflows/build-dist.yml: -------------------------------------------------------------------------------- 1 | name: Build and PR dist changes 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | 7 | jobs: 8 | build-and-pr-dist: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Checkout repository 12 | uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 13 | with: 14 | persist-credentials: false 15 | 16 | - name: Setup Node.js 17 | uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 18 | with: 19 | node-version: "lts/*" 20 | 21 | - name: Install dependencies 22 | run: npm ci 23 | 24 | - name: Build project 25 | run: npm run build 26 | 27 | - name: Check for dist changes 28 | id: git-diff 29 | run: | 30 | git config --global user.name "github-actions[bot]" 31 | git config --global user.email "github-actions[bot]@users.noreply.github.com" 32 | git add dist 33 | if git diff --cached --quiet; then 34 | echo "changed=false" >> $GITHUB_OUTPUT 35 | else 36 | echo "changed=true" >> $GITHUB_OUTPUT 37 | fi 38 | 39 | - name: Create Pull Request for dist changes 40 | if: steps.git-diff.outputs.changed == 'true' 41 | uses: peter-evans/create-pull-request@v6 42 | with: 43 | commit-message: "chore(dist): update dist folder after build" 44 | title: "chore(dist): update dist folder after build" 45 | body: "This PR updates the dist folder with the latest build output." 46 | branch: update-dist-after-build 47 | add-paths: dist 48 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "html5-boilerplate", 3 | "version": "9.0.1", 4 | "description": "A professional front-end template for building fast, robust, and adaptable web apps or sites.", 5 | "keywords": [ 6 | "h5bp", 7 | "template", 8 | "front-end" 9 | ], 10 | "homepage": "https://html5boilerplate.com/", 11 | "bugs": { 12 | "url": "https://github.com/h5bp/html5-boilerplate/issues" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "https://github.com/h5bp/html5-boilerplate.git" 17 | }, 18 | "license": "MIT", 19 | "files": [ 20 | "CHANGELOG.md", 21 | "LICENSE.txt", 22 | "package.json", 23 | "dist/", 24 | "README.md" 25 | ], 26 | "scripts": { 27 | "build": "gulp build", 28 | "prettier": "prettier --write ./**/*.{js,json,md,mjs,yml}", 29 | "test": "gulp archive && mocha --reporter spec --timeout 5000" 30 | }, 31 | "devDependencies": { 32 | "@eslint/js": "^9.35.0", 33 | "archiver": "^7.0.1", 34 | "del": "^8.0.1", 35 | "eslint": "^9.35.0", 36 | "eslint-plugin-mocha": "^11.1.0", 37 | "glob": "^11.1.0", 38 | "globals": "^16.4.0", 39 | "gulp": "^5.0.1", 40 | "gulp-autoprefixer": "^9.0.0", 41 | "gulp-eslint-new": "^2.4.0", 42 | "gulp-header": "^2.0.9", 43 | "gulp-rename": "^2.1.0", 44 | "main.css": "3.0.0", 45 | "mocha": "^11.7.2", 46 | "prettier": "3.6.2" 47 | }, 48 | "engines": { 49 | "node": ">=20" 50 | }, 51 | "volta": { 52 | "node": "20.19.1" 53 | }, 54 | "h5bp-configs": { 55 | "directories": { 56 | "archive": "archive", 57 | "dist": "dist", 58 | "src": "src", 59 | "test": "test" 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /test/file_content.mjs: -------------------------------------------------------------------------------- 1 | import assert from 'assert'; 2 | import fs from 'fs'; 3 | import path from 'path'; 4 | import { createRequire } from 'module'; 5 | const require = createRequire(import.meta.url); 6 | const pkg = require('../package.json'); 7 | const dirs = pkg['h5bp-configs'].directories; 8 | 9 | // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 10 | 11 | function checkString(file, string, done) { 12 | let character = ''; 13 | let matchFound = false; 14 | let matchedPositions = 0; 15 | const readStream = fs.createReadStream(file, { encoding: 'utf8' }); 16 | 17 | readStream.on('close', done); 18 | readStream.on('error', done); 19 | readStream.on('readable', function () { 20 | // Read file until the string is found 21 | // or the whole file has been read 22 | while (matchFound !== true && (character = readStream.read(1)) !== null) { 23 | if (character === string.charAt(matchedPositions)) { 24 | matchedPositions += 1; 25 | } else { 26 | matchedPositions = 0; 27 | } 28 | 29 | if (matchedPositions === string.length) { 30 | matchFound = true; 31 | } 32 | } 33 | 34 | assert.equal(true, matchFound); 35 | this.close(); 36 | }); 37 | } 38 | 39 | // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 40 | 41 | function runTests() { 42 | const dir = dirs.dist; 43 | 44 | describe(`Test if the files from the "${dir}" directory have the expected content`, () => { 45 | it('"style.css" should contain a custom banner', function (done) { 46 | const string = `/*! HTML5 Boilerplate v${pkg.version} | ${pkg.license} License | ${pkg.homepage} */\n`; 47 | checkString(path.resolve(dir, 'css/style.css'), string, done); 48 | }); 49 | }); 50 | } 51 | 52 | runTests(); 53 | -------------------------------------------------------------------------------- /docs/TOC.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](https://html5boilerplate.com/) 2 | 3 | ## Getting started 4 | 5 | - [Usage](usage.md) — Overview of the project contents. 6 | - [FAQ](faq.md) — Frequently asked questions along with their answers. 7 | 8 | ## HTML5 Boilerplate core 9 | 10 | - [HTML](html.md) — Guide to the default HTML. 11 | - [CSS](css.md) — Guide to the default CSS. 12 | - [JavaScript](js.md) — Guide to the default JavaScript. 13 | - [Everything else](misc.md). 14 | 15 | ## Development 16 | 17 | - [Extending and customizing HTML5 Boilerplate](extend.md) — Going further with 18 | the boilerplate. 19 | 20 | ## Related projects 21 | 22 | The [H5BP organization](https://github.com/h5bp) maintains several projects that 23 | complement HTML5 Boilerplate, projects that can help you improve different 24 | aspects of your website/web app (e.g.: the performance, security, etc.). 25 | 26 | - [Server Configs](https://github.com/h5bp/server-configs) — Fast and smart 27 | configurations for web servers such as Apache and Nginx. 28 | - [Apache](https://github.com/h5bp/server-configs-apache) 29 | - [Google App Engine (GAE)](https://github.com/h5bp/server-configs-gae) 30 | - [Internet Information Services 31 | (IIS)](https://github.com/h5bp/server-configs-iis) 32 | - [lighttpd](https://github.com/h5bp/server-configs-lighttpd) 33 | - [Nginx](https://github.com/h5bp/server-configs-nginx) 34 | - [Node.js](https://github.com/h5bp/server-configs-node) 35 | - [Front-end Developer Interview Questions](https://github.com/h5bp/Front-end-Developer-Interview-Questions) 36 | - [create-html5-boilerplate](https://github.com/h5bp/create-html5-boilerplate) — Quick start HTML5 Boilerplate development. 37 | - [main.css](https://github.com/h5bp/main.css) — the main.css file included (as style.css) with HTML5 Boilerplate. 38 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Publish 2 | 3 | on: 4 | push: 5 | tags: 6 | - "v*" 7 | 8 | permissions: 9 | contents: read 10 | 11 | jobs: 12 | build: 13 | permissions: 14 | contents: write # for actions/create-release to create a release 15 | name: Upload Release Asset 16 | runs-on: ubuntu-latest 17 | steps: 18 | - name: Checkout code 19 | uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 20 | with: 21 | persist-credentials: false 22 | - name: Get tag 23 | id: get_version 24 | run: echo VERSION=$(echo $GITHUB_REF | cut -d / -f 3) >> "$GITHUB_OUTPUT" 25 | - name: Create Zip Folder 26 | working-directory: dist 27 | run: zip -r ../html5-boilerplate_${{ steps.get_version.outputs.VERSION }}.zip ./ 28 | - name: Create Release 29 | id: create_release 30 | uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4 31 | env: 32 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 33 | with: 34 | tag_name: ${{ github.ref }} 35 | release_name: Release ${{ github.ref }} 36 | draft: false 37 | prerelease: false 38 | - name: Upload Release Asset 39 | id: upload-release-asset 40 | uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2 41 | env: 42 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 43 | with: 44 | upload_url: ${{ steps.create_release.outputs.upload_url }} 45 | asset_path: ./html5-boilerplate_${{ steps.get_version.outputs.VERSION }}.zip 46 | asset_name: html5-boilerplate_${{ steps.get_version.outputs.VERSION }}.zip 47 | asset_content_type: application/zip 48 | - name: Setup Node 49 | uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 50 | with: 51 | node-version: 20 52 | registry-url: https://registry.npmjs.org/ 53 | - name: publish npm 54 | run: npm publish 55 | env: 56 | NODE_AUTH_TOKEN: ${{secrets.npm_token}} 57 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.yml: -------------------------------------------------------------------------------- 1 | name: Report a bug 2 | description: Tell us about a bug or issue you may have identified in HTML5 Boilerplate. 3 | title: "Provide a general summary of the issue" 4 | labels: [bug] 5 | assignees: "-" 6 | body: 7 | - type: checkboxes 8 | attributes: 9 | label: Prerequisites 10 | description: Take a couple minutes to help our maintainers work faster. 11 | options: 12 | - label: I have [searched](https://github.com/h5bp/html5-boilerplate/issues?utf8=%E2%9C%93&q=is%3Aissue) for duplicate or closed issues 13 | required: true 14 | - label: I have read the [contributing guidelines](https://github.com/h5bp/html5-boilerplate/blob/main/.github/CONTRIBUTING.md) 15 | required: true 16 | - type: textarea 17 | id: what-happened 18 | attributes: 19 | label: Describe the issue 20 | description: Provide a summary of the issue and what you expected to happen, including specific steps to reproduce. 21 | validations: 22 | required: true 23 | - type: textarea 24 | id: reduced-test-case 25 | attributes: 26 | label: Reduced test cases 27 | description: Include links [reduced test case](https://css-tricks.com/reduced-test-cases/) links. 28 | validations: 29 | required: false 30 | - type: dropdown 31 | id: os 32 | attributes: 33 | label: What operating system(s) are you seeing the problem on? 34 | multiple: true 35 | options: 36 | - Windows 37 | - macOS 38 | - Android 39 | - iOS 40 | - Linux 41 | validations: 42 | required: true 43 | - type: dropdown 44 | id: browser 45 | attributes: 46 | label: What browser(s) are you seeing the problem on? 47 | multiple: true 48 | options: 49 | - Chrome 50 | - Safari 51 | - Firefox 52 | - Microsoft Edge 53 | - Opera 54 | - Development Environment 55 | - type: input 56 | id: version 57 | attributes: 58 | label: What version of HTML% Boilerplate are you using? 59 | placeholder: "e.g., v8.0.0 or v7.1.0" 60 | validations: 61 | required: true 62 | -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | - Using welcoming and inclusive language 12 | - Being respectful of differing viewpoints and experiences 13 | - Gracefully accepting constructive criticism 14 | - Focusing on what is best for the community 15 | - Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | - The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | - Trolling, insulting/derogatory comments, and personal or political attacks 21 | - Public or private harassment 22 | - Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | - Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at h5bp@htmlcssjavascript.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: https://contributor-covenant.org 46 | [version]: https://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /test/file_existence.mjs: -------------------------------------------------------------------------------- 1 | import assert from 'assert'; 2 | import fs from 'fs'; 3 | import path from 'path'; 4 | import { globSync } from 'glob'; 5 | import { createRequire } from 'module'; 6 | const require = createRequire(import.meta.url); 7 | const pkg = require('../package.json'); 8 | const dirs = pkg['h5bp-configs'].directories; 9 | 10 | const expectedFilesInArchiveDir = [`${pkg.name}_v${pkg.version}.zip`]; 11 | 12 | const expectedFilesInDistDir = [ 13 | '.editorconfig', 14 | '.gitattributes', 15 | '.gitignore', 16 | '404.html', 17 | 'package.json', 18 | 19 | 'webpack.common.js', 20 | 'webpack.config.dev.js', 21 | 'webpack.config.prod.js', 22 | 23 | 'css/', // for directories, a `/` character 24 | // should be included at the end 25 | 'css/style.css', 26 | 27 | 'favicon.ico', 28 | 29 | 'icon.png', 30 | 'icon.svg', 31 | 32 | 'img/', 33 | 'img/.gitkeep', 34 | 35 | 'index.html', 36 | 37 | 'js/', 38 | 'js/app.js', 39 | 'js/vendor/', 40 | 'js/vendor/.gitkeep', 41 | 'LICENSE.txt', 42 | 'robots.txt', 43 | 'site.webmanifest', 44 | ]; 45 | 46 | // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 47 | 48 | function checkFiles(directory, expectedFiles) { 49 | // Get the list of files from the specified directory 50 | const files = globSync('**/*', { 51 | cwd: directory, 52 | ignore: [ 53 | '**/node_modules/**', 54 | 'package-lock.json', 55 | '**/dist/**', 56 | '**/.cache/**', 57 | ], 58 | dot: true, // include hidden files 59 | mark: true, // add a `/` character to directory matches, 60 | posix: true, //https://github.com/isaacs/node-glob/issues/467 61 | }); 62 | 63 | // Check if all expected files are present in the 64 | // specified directory, and are of the expected type 65 | expectedFiles.forEach((file) => { 66 | let ok = false; 67 | const expectedFileType = 68 | file.slice(-1) !== '/' ? 'regular file' : 'directory'; 69 | 70 | // If file exists 71 | if (files.indexOf(file) !== -1) { 72 | // Check if the file is of the correct type 73 | if (file.slice(-1) !== '/') { 74 | // Check if the file is really a regular file 75 | ok = fs.statSync(path.resolve(directory, file)).isFile(); 76 | } else { 77 | // Check if the file is a directory 78 | // (Since glob adds the `/` character to directory matches, 79 | // we can simply check if the `/` character is present) 80 | ok = files[files.indexOf(file)].slice(-1) === '/'; 81 | } 82 | } 83 | 84 | it(`"${file}" should be present and it should be a ${expectedFileType}`, () => { 85 | assert.equal(true, ok); 86 | }); 87 | }); 88 | 89 | // List all files that should be NOT 90 | // be present in the specified directory 91 | files 92 | .filter((file) => { 93 | return expectedFiles.indexOf(file) === -1; 94 | }) 95 | .forEach((file) => { 96 | it(`"${file}" should NOT be present`, () => { 97 | assert(false); 98 | }); 99 | }); 100 | } 101 | 102 | // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 103 | 104 | function runTests() { 105 | describe('Test if all the expected files, and only them, are present in the build directories', () => { 106 | describe(dirs.archive, () => { 107 | checkFiles(dirs.archive, expectedFilesInArchiveDir); 108 | }); 109 | 110 | describe(dirs.dist, () => { 111 | checkFiles(dirs.dist, expectedFilesInDistDir); 112 | }); 113 | }); 114 | } 115 | 116 | runTests(); 117 | -------------------------------------------------------------------------------- /src/.gitattributes: -------------------------------------------------------------------------------- 1 | ## GITATTRIBUTES FOR WEB PROJECTS 2 | # 3 | # These settings are for any web project. 4 | # 5 | # Details per file setting: 6 | # text These files should be normalized (i.e. convert CRLF to LF). 7 | # binary These files are binary and should be left untouched. 8 | # 9 | # Note that binary is a macro for -text -diff. 10 | ###################################################################### 11 | 12 | ## AUTO-DETECT 13 | ## Handle line endings automatically for files detected as 14 | ## text and leave all files detected as binary untouched. 15 | ## This will handle all files NOT defined below. 16 | * text=auto 17 | 18 | ## SOURCE CODE 19 | *.bat text eol=crlf 20 | *.coffee text 21 | *.css text 22 | *.htm text 23 | *.html text 24 | *.inc text 25 | *.ini text 26 | *.js text 27 | *.json text 28 | *.jsx text 29 | *.less text 30 | *.od text 31 | *.onlydata text 32 | *.php text 33 | *.pl text 34 | *.py text 35 | *.rb text 36 | *.sass text 37 | *.scm text 38 | *.scss text 39 | *.sh text eol=lf 40 | *.sql text 41 | *.styl text 42 | *.tag text 43 | *.ts text 44 | *.tsx text 45 | *.xml text 46 | *.xhtml text 47 | 48 | ## DOCKER 49 | *.dockerignore text 50 | Dockerfile text 51 | 52 | ## DOCUMENTATION 53 | *.markdown text 54 | *.md text 55 | *.mdwn text 56 | *.mdown text 57 | *.mkd text 58 | *.mkdn text 59 | *.mdtxt text 60 | *.mdtext text 61 | *.txt text 62 | AUTHORS text 63 | CHANGELOG text 64 | CHANGES text 65 | CONTRIBUTING text 66 | COPYING text 67 | copyright text 68 | *COPYRIGHT* text 69 | INSTALL text 70 | license text 71 | LICENSE text 72 | NEWS text 73 | readme text 74 | *README* text 75 | TODO text 76 | 77 | ## TEMPLATES 78 | *.dot text 79 | *.ejs text 80 | *.haml text 81 | *.handlebars text 82 | *.hbs text 83 | *.hbt text 84 | *.jade text 85 | *.latte text 86 | *.mustache text 87 | *.njk text 88 | *.phtml text 89 | *.tmpl text 90 | *.tpl text 91 | *.twig text 92 | 93 | ## LINTERS 94 | .babelrc text 95 | .csslintrc text 96 | .eslintrc text 97 | .htmlhintrc text 98 | .jscsrc text 99 | .jshintrc text 100 | .jshintignore text 101 | .prettierrc text 102 | .stylelintrc text 103 | 104 | ## CONFIGS 105 | *.bowerrc text 106 | *.cnf text 107 | *.conf text 108 | *.config text 109 | .browserslistrc text 110 | .editorconfig text 111 | .gitattributes text 112 | .gitconfig text 113 | .gitignore text 114 | .htaccess text 115 | *.npmignore text 116 | *.yaml text 117 | *.yml text 118 | browserslist text 119 | Makefile text 120 | makefile text 121 | 122 | ## HEROKU 123 | Procfile text 124 | .slugignore text 125 | 126 | ## GRAPHICS 127 | *.ai binary 128 | *.bmp binary 129 | *.eps binary 130 | *.gif binary 131 | *.ico binary 132 | *.jng binary 133 | *.jp2 binary 134 | *.jpg binary 135 | *.jpeg binary 136 | *.jpx binary 137 | *.jxr binary 138 | *.pdf binary 139 | *.png binary 140 | *.psb binary 141 | *.psd binary 142 | *.svg text 143 | *.svgz binary 144 | *.tif binary 145 | *.tiff binary 146 | *.wbmp binary 147 | *.webp binary 148 | 149 | ## AUDIO 150 | *.kar binary 151 | *.m4a binary 152 | *.mid binary 153 | *.midi binary 154 | *.mp3 binary 155 | *.ogg binary 156 | *.ra binary 157 | 158 | ## VIDEO 159 | *.3gpp binary 160 | *.3gp binary 161 | *.as binary 162 | *.asf binary 163 | *.asx binary 164 | *.fla binary 165 | *.flv binary 166 | *.m4v binary 167 | *.mng binary 168 | *.mov binary 169 | *.mp4 binary 170 | *.mpeg binary 171 | *.mpg binary 172 | *.ogv binary 173 | *.swc binary 174 | *.swf binary 175 | *.webm binary 176 | 177 | ## ARCHIVES 178 | *.7z binary 179 | *.gz binary 180 | *.jar binary 181 | *.rar binary 182 | *.tar binary 183 | *.zip binary 184 | 185 | ## FONTS 186 | *.ttf binary 187 | *.eot binary 188 | *.otf binary 189 | *.woff binary 190 | *.woff2 binary 191 | 192 | ## EXECUTABLES 193 | *.exe binary 194 | *.pyc binary 195 | -------------------------------------------------------------------------------- /dist/.gitattributes: -------------------------------------------------------------------------------- 1 | ## GITATTRIBUTES FOR WEB PROJECTS 2 | # 3 | # These settings are for any web project. 4 | # 5 | # Details per file setting: 6 | # text These files should be normalized (i.e. convert CRLF to LF). 7 | # binary These files are binary and should be left untouched. 8 | # 9 | # Note that binary is a macro for -text -diff. 10 | ###################################################################### 11 | 12 | ## AUTO-DETECT 13 | ## Handle line endings automatically for files detected as 14 | ## text and leave all files detected as binary untouched. 15 | ## This will handle all files NOT defined below. 16 | * text=auto 17 | 18 | ## SOURCE CODE 19 | *.bat text eol=crlf 20 | *.coffee text 21 | *.css text 22 | *.htm text 23 | *.html text 24 | *.inc text 25 | *.ini text 26 | *.js text 27 | *.json text 28 | *.jsx text 29 | *.less text 30 | *.od text 31 | *.onlydata text 32 | *.php text 33 | *.pl text 34 | *.py text 35 | *.rb text 36 | *.sass text 37 | *.scm text 38 | *.scss text 39 | *.sh text eol=lf 40 | *.sql text 41 | *.styl text 42 | *.tag text 43 | *.ts text 44 | *.tsx text 45 | *.xml text 46 | *.xhtml text 47 | 48 | ## DOCKER 49 | *.dockerignore text 50 | Dockerfile text 51 | 52 | ## DOCUMENTATION 53 | *.markdown text 54 | *.md text 55 | *.mdwn text 56 | *.mdown text 57 | *.mkd text 58 | *.mkdn text 59 | *.mdtxt text 60 | *.mdtext text 61 | *.txt text 62 | AUTHORS text 63 | CHANGELOG text 64 | CHANGES text 65 | CONTRIBUTING text 66 | COPYING text 67 | copyright text 68 | *COPYRIGHT* text 69 | INSTALL text 70 | license text 71 | LICENSE text 72 | NEWS text 73 | readme text 74 | *README* text 75 | TODO text 76 | 77 | ## TEMPLATES 78 | *.dot text 79 | *.ejs text 80 | *.haml text 81 | *.handlebars text 82 | *.hbs text 83 | *.hbt text 84 | *.jade text 85 | *.latte text 86 | *.mustache text 87 | *.njk text 88 | *.phtml text 89 | *.tmpl text 90 | *.tpl text 91 | *.twig text 92 | 93 | ## LINTERS 94 | .babelrc text 95 | .csslintrc text 96 | .eslintrc text 97 | .htmlhintrc text 98 | .jscsrc text 99 | .jshintrc text 100 | .jshintignore text 101 | .prettierrc text 102 | .stylelintrc text 103 | 104 | ## CONFIGS 105 | *.bowerrc text 106 | *.cnf text 107 | *.conf text 108 | *.config text 109 | .browserslistrc text 110 | .editorconfig text 111 | .gitattributes text 112 | .gitconfig text 113 | .gitignore text 114 | .htaccess text 115 | *.npmignore text 116 | *.yaml text 117 | *.yml text 118 | browserslist text 119 | Makefile text 120 | makefile text 121 | 122 | ## HEROKU 123 | Procfile text 124 | .slugignore text 125 | 126 | ## GRAPHICS 127 | *.ai binary 128 | *.bmp binary 129 | *.eps binary 130 | *.gif binary 131 | *.ico binary 132 | *.jng binary 133 | *.jp2 binary 134 | *.jpg binary 135 | *.jpeg binary 136 | *.jpx binary 137 | *.jxr binary 138 | *.pdf binary 139 | *.png binary 140 | *.psb binary 141 | *.psd binary 142 | *.svg text 143 | *.svgz binary 144 | *.tif binary 145 | *.tiff binary 146 | *.wbmp binary 147 | *.webp binary 148 | 149 | ## AUDIO 150 | *.kar binary 151 | *.m4a binary 152 | *.mid binary 153 | *.midi binary 154 | *.mp3 binary 155 | *.ogg binary 156 | *.ra binary 157 | 158 | ## VIDEO 159 | *.3gpp binary 160 | *.3gp binary 161 | *.as binary 162 | *.asf binary 163 | *.asx binary 164 | *.fla binary 165 | *.flv binary 166 | *.m4v binary 167 | *.mng binary 168 | *.mov binary 169 | *.mp4 binary 170 | *.mpeg binary 171 | *.mpg binary 172 | *.ogv binary 173 | *.swc binary 174 | *.swf binary 175 | *.webm binary 176 | 177 | ## ARCHIVES 178 | *.7z binary 179 | *.gz binary 180 | *.jar binary 181 | *.rar binary 182 | *.tar binary 183 | *.zip binary 184 | 185 | ## FONTS 186 | *.ttf binary 187 | *.eot binary 188 | *.otf binary 189 | *.woff binary 190 | *.woff2 binary 191 | 192 | ## EXECUTABLES 193 | *.exe binary 194 | *.pyc binary 195 | -------------------------------------------------------------------------------- /gulpfile.mjs: -------------------------------------------------------------------------------- 1 | import fs from 'fs'; 2 | import path from 'path'; 3 | import gulp from 'gulp'; 4 | import gulpAutoPrefixer from 'gulp-autoprefixer'; 5 | import gulpEslint from 'gulp-eslint-new'; 6 | import gulpHeader from 'gulp-header'; 7 | import gulpRename from 'gulp-rename'; 8 | import archiver from 'archiver'; 9 | import { globSync } from 'glob'; 10 | import { deleteSync } from 'del'; 11 | import { createRequire } from 'module'; 12 | const require = createRequire(import.meta.url); 13 | const pkg = require('./package.json'); 14 | 15 | const dirs = pkg['h5bp-configs'].directories; 16 | 17 | // --------------------------------------------------------------------- 18 | // | Helper tasks | 19 | // --------------------------------------------------------------------- 20 | 21 | gulp.task('archive:create_archive_dir', (done) => { 22 | fs.mkdirSync(path.resolve(dirs.archive), '0755'); 23 | done(); 24 | }); 25 | 26 | gulp.task('archive:zip', (done) => { 27 | const archiveName = path.resolve( 28 | dirs.archive, 29 | `${pkg.name}_v${pkg.version}.zip`, 30 | ); 31 | const zip = archiver('zip'); 32 | const files = globSync('**/*.*', { 33 | cwd: dirs.dist, 34 | ignore: [ 35 | '**/node_modules/**', 36 | 'package-lock.json', 37 | '**/dist/**', 38 | '**/.cache/**', 39 | ], 40 | dot: true, // include hidden files 41 | }); 42 | const output = fs.createWriteStream(archiveName); 43 | 44 | zip.on('error', (error) => { 45 | done(); 46 | throw error; 47 | }); 48 | 49 | output.on('close', done); 50 | 51 | files.forEach((file) => { 52 | const filePath = path.resolve(dirs.dist, file); 53 | 54 | // `zip.bulk` does not maintain the file 55 | // permissions, so we need to add files individually 56 | zip.append(fs.createReadStream(filePath), { 57 | name: file, 58 | mode: fs.statSync(filePath).mode, 59 | }); 60 | }); 61 | 62 | zip.pipe(output); 63 | zip.finalize(); 64 | done(); 65 | }); 66 | 67 | gulp.task('clean', (done) => { 68 | deleteSync([dirs.archive, dirs.dist]); 69 | done(); 70 | }); 71 | 72 | gulp.task('copy:index.html', () => { 73 | return gulp.src(`${dirs.src}/index.html`).pipe(gulp.dest(dirs.dist)); 74 | }); 75 | 76 | gulp.task('copy:license', () => 77 | gulp.src('LICENSE.txt').pipe(gulp.dest(dirs.dist)), 78 | ); 79 | 80 | gulp.task('copy:style', () => { 81 | const banner = `/*! HTML5 Boilerplate v${pkg.version} | ${pkg.license} License | ${pkg.homepage} */\n\n`; 82 | 83 | return gulp 84 | .src('node_modules/main.css/dist/main.css') 85 | .pipe(gulpHeader(banner)) 86 | .pipe( 87 | gulpAutoPrefixer({ 88 | cascade: false, 89 | }), 90 | ) 91 | .pipe( 92 | gulpRename({ 93 | basename: 'style', 94 | }), 95 | ) 96 | .pipe(gulp.dest(`${dirs.dist}/css`)); 97 | }); 98 | 99 | gulp.task('copy:misc', () => 100 | gulp 101 | .src( 102 | [ 103 | // Copy all files 104 | `${dirs.src}/**/*`, 105 | 106 | // Exclude the following files 107 | // (other tasks will handle the copying of these files) 108 | `!${dirs.src}/css/main.css`, 109 | `!${dirs.src}/index.html`, 110 | `!**/.DS_Store`, 111 | ], 112 | { 113 | encoding: false, 114 | // Include hidden files by default 115 | dot: true, 116 | }, 117 | ) 118 | .pipe(gulp.dest(dirs.dist)), 119 | ); 120 | 121 | gulp.task('lint:js', () => 122 | gulp 123 | .src([`${dirs.src}/js/*.js`, `${dirs.src}/*.js`, `${dirs.test}/*.mjs`]) 124 | .pipe(gulpEslint()) 125 | .pipe(gulpEslint.failOnError()), 126 | ); 127 | 128 | // --------------------------------------------------------------------- 129 | // | Main tasks | 130 | // --------------------------------------------------------------------- 131 | gulp.task( 132 | 'copy', 133 | gulp.series('copy:index.html', 'copy:license', 'copy:style', 'copy:misc'), 134 | ); 135 | 136 | gulp.task('build', gulp.series(gulp.parallel('clean', 'lint:js'), 'copy')); 137 | 138 | gulp.task( 139 | 'archive', 140 | gulp.series('build', 'archive:create_archive_dir', 'archive:zip'), 141 | ); 142 | 143 | gulp.task('default', gulp.series('build')); 144 | -------------------------------------------------------------------------------- /docs/usage.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # Usage 5 | 6 | The most basic usage of HTML5 Boilerplate is to create a static site or simple 7 | app. Once you've downloaded or cloned the project, that process looks something 8 | like this: 9 | 10 | 1. Set up the basic structure of the site. 11 | 2. Add some content, style, and functionality. 12 | 3. Run your site locally to see how it looks. 13 | 4. Deploy your site. 14 | 15 | Cool, right? _It is_. That said, the smart defaults, baseline elements, default 16 | attribute values and various other utilities that HTML5 Boilerplate offers can 17 | serve as the foundation for whatever you're interested in building. 18 | 19 | Even the basic use-case of a simple static site can be enhanced by manipulating 20 | the code through an automated build process. Moving up in complexity HTML5 21 | Boilerplate can be integrated with whatever front-end framework, CMS or 22 | e-commerce platform you're working with. Mix-and-match to your heart's content. 23 | Use what you need (toss it in a blender if you need to) and discard the rest. 24 | HTML5 Boilerplate is a starting point, not a destination. 25 | 26 | ## Basic structure 27 | 28 | A basic HTML5 Boilerplate site initially looks something like this: 29 | 30 | ``` 31 | . 32 | ├── css 33 | │ └── style.css 34 | ├── doc 35 | ├── img 36 | ├── js 37 | │ ├── app.js 38 | └── vendor 39 | ├── .editorconfig 40 | ├── 404.html 41 | ├── favicon.ico 42 | ├── icon.png 43 | ├── icon.svg 44 | ├── index.html 45 | ├── package.json 46 | ├── robots.txt 47 | ├── site.webmanifest 48 | └── webpack.common.js 49 | └── webpack.config.dev.js 50 | └── webpack.config.prod.js 51 | ``` 52 | 53 | What follows is a general overview of each major part and how to use them. 54 | 55 | ### css 56 | 57 | This directory should contain all your project's CSS files. It includes some 58 | initial CSS to help get you started from a solid foundation. [About the 59 | CSS](css.md). 60 | 61 | ### doc 62 | 63 | This directory contains all the HTML5 Boilerplate documentation. You can use it 64 | as the location and basis for your own project's documentation. 65 | 66 | ### js 67 | 68 | This directory should contain all your project's JS files. Libraries, plugins, 69 | and custom code can all be included here. It includes some initial JS to help 70 | get you started. [About the JavaScript](js.md). 71 | 72 | ### 404.html 73 | 74 | A helpful custom 404 to get you started. 75 | 76 | ### .editorconfig 77 | 78 | The `.editorconfig` file is provided in order to encourage and help you and your 79 | team to maintain consistent coding styles between different editors and IDEs. 80 | [Read more about the `.editorconfig` file](misc.md#editorconfig). 81 | 82 | ### index.html 83 | 84 | This is the default HTML skeleton that should form the basis of all pages on 85 | your site. If you are using a server-side templating framework, then you will 86 | need to integrate this starting HTML with your setup. 87 | 88 | Make sure that you update the URLs for the referenced CSS and JavaScript if you 89 | modify the directory structure at all. 90 | 91 | ### package.json 92 | 93 | Edit this file to describe your application, add dependencies, scripts and 94 | other properties related to node based development and the npm registry 95 | 96 | ### robots.txt 97 | 98 | Edit this file to include any pages you need hidden from search engines. 99 | 100 | ### Icons 101 | 102 | Replace the default `favicon.ico` and Apple Touch Icon with your own. 103 | 104 | If you want to use different Apple Touch Icons for different resolutions please 105 | refer to the [according documentation](extend.md#apple-touch-icons). 106 | 107 | ### Webpack 108 | 109 | The project contains a simple [webpack](https://webpack.js.org/) configuration. 110 | 111 | To get started developing a site with a development server, run the following 112 | commands from within the `/dist/` folder in the project's repo or within the 113 | root folder of the dowloaded project files, the folder created by `npm install` 114 | or the project folder created by running [create\-html5\-boilerplate](https://github.com/h5bp/create-html5-boilerplate) 115 | 116 | ``` 117 | npm install 118 | npm run start 119 | ``` 120 | 121 | This will start a Webpack development server with hot reloading of edited files. 122 | 123 | To package a site for production run 124 | 125 | ``` 126 | npm run build 127 | ``` 128 | 129 | This command will bundle up the site's JavaScript and copy over static assets to 130 | the newly created `dist` folder. 131 | 132 | There are three files: 133 | 134 | #### webpack.common.js 135 | 136 | Both the production and development scripts inherit from this common script. 137 | 138 | #### webpack.config.dev.js 139 | 140 | This development configuration defines the behavior of development server. 141 | 142 | #### webpack.config.prod.js 143 | 144 | This production configuration defines the behavior of the production build. 145 | 146 | It copies the following files and folders to the dist folder: 147 | 148 | - css 149 | - img 150 | - js/vendor 151 | - 404.html 152 | - favicon.ico 153 | - icon.png 154 | - icon.svg 155 | - index.html 156 | - robots.txt 157 | - site.webmanifest 158 | 159 | `js/vendor` is copied over in order to allow you to use unprocessed JS files 160 | in addition to the files bundled based on the project's entry point `app.js.` 161 | -------------------------------------------------------------------------------- /docs/misc.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # Miscellaneous 5 | 6 | - [.gitignore](#gitignore) 7 | - [.editorconfig](#editorconfig) 8 | - [robots.txt](#robotstxt) 9 | - [package.json](#packagejson) 10 | 11 | -- 12 | 13 | ## .gitignore 14 | 15 | HTML5 Boilerplate includes a basic project-level `.gitignore`. This should 16 | primarily be used to avoid certain project-level files and directories from 17 | being kept under source control. Different development-environments will 18 | benefit from different collections of ignores. 19 | 20 | OS-specific and editor-specific files should be ignored using a "global 21 | ignore" that applies to all repositories on your system. 22 | 23 | For example, add the following to your `~/.gitconfig`, where the `.gitignore` 24 | in your HOME directory contains the files and directories you'd like to 25 | globally ignore: 26 | 27 | ```gitignore 28 | [core] 29 | excludesfile = ~/.gitignore 30 | ``` 31 | 32 | - More on global ignores: [https://help.github.com/articles/ignoring-files/](https://help.github.com/en/github/using-git/ignoring-files) 33 | - Comprehensive set of ignores on GitHub: https://github.com/github/gitignore 34 | 35 | ## .editorconfig 36 | 37 | The `.editorconfig` file is provided in order to encourage and help you and 38 | your team define and maintain consistent coding styles between different 39 | editors and IDEs. 40 | 41 | By default, `.editorconfig` includes some basic 42 | [properties](https://editorconfig.org/#supported-properties) that reflect the 43 | coding styles from the files provided by default, but you can easily change 44 | them to better suit your needs. 45 | 46 | In order for your editor/IDE to apply the 47 | [properties](https://editorconfig.org/#supported-properties) from the 48 | `.editorconfig` file, you may need to [install a 49 | plugin](https://editorconfig.org/#download). 50 | 51 | **N.B.** If you aren't using the server configurations provided by HTML5 52 | Boilerplate, we highly encourage you to configure your server to block 53 | access to `.editorconfig` files, as they can disclose sensitive information! 54 | 55 | For more details, please refer to the [EditorConfig 56 | project](https://editorconfig.org/). 57 | 58 | ## robots.txt 59 | 60 | The `robots.txt` file is used to give instructions to web robots on what can 61 | be crawled from the website. 62 | 63 | By default, the file provided by this project includes the next two lines: 64 | 65 | - `User-agent: *` - the following rules apply to all web robots 66 | - `Disallow:` - everything on the website is allowed to be crawled 67 | 68 | If you want to disallow certain pages you will need to specify the path in a 69 | `Disallow` directive (e.g.: `Disallow: /path`) or, if you want to disallow 70 | crawling of all content, use `Disallow: /`. 71 | 72 | The `/robots.txt` file is not intended for access control, so don't try to 73 | use it as such. Think of it as a "No Entry" sign, rather than a locked door. 74 | URLs disallowed by the `robots.txt` file might still be indexed without being 75 | crawled, and the content from within the `robots.txt` file can be viewed by 76 | anyone, potentially disclosing the location of your private content! So, if 77 | you want to block access to private content, use proper authentication instead. 78 | 79 | For more information about `robots.txt`, please see: 80 | 81 | - [robotstxt.org](https://www.robotstxt.org/) 82 | - [How Google handles the `robots.txt` file](https://developers.google.com/search/reference/robots_txt) 83 | 84 | ## package.json 85 | 86 | `package.json` is used to define attributes of your site or application for 87 | use in modern JavaScript development. [The full documentation is available](https://docs.npmjs.com/files/package.json) 88 | if you're interested. The fields we provide are as follows: 89 | 90 | - `title` - the title of your project. If you expect to publish your application 91 | to npm, then the name needs to follow [certain guidelines](https://docs.npmjs.com/files/package.json#name) 92 | and be unique. 93 | - `version` - indicates the version of your site application using semantic 94 | versioning ([SemVer](https://semver.org/)) 95 | - `description` - describes your site. 96 | - `scripts` - is a JavaScript object containing commands that can be run in a 97 | node environment. There are many [built-in keys](https://docs.npmjs.com/misc/scripts) 98 | related to the package lifecycle that node understands automatically. You can 99 | also define custom scripts for use with your application development. We 100 | provide three custom scripts that work with webpack to get you up and running 101 | quickly with a bundler for your assets and a simple development server. 102 | 103 | - `start` serves your `index.html` with a simple development server 104 | 105 | - `keywords` - an array of keywords used to discover your app in the npm 106 | registry 107 | - `author` - defines the author of a package. There is also an alternative 108 | [contributors](https://docs.npmjs.com/files/package.json#people-fields-author-contributors) 109 | field if there's more than one author. 110 | - `license` - the license for your application. Must conform to 111 | [specific rules](https://docs.npmjs.com/files/package.json#license) 112 | - `devDependencies` - development dependencies for your package. In our case 113 | we have several dependencies used by webpack, which we use as a simple development server. 114 | -------------------------------------------------------------------------------- /docs/html.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # The HTML 5 | 6 | By default, HTML5 Boilerplate provides two `html` pages: 7 | 8 | - [`index.html`](#indexhtml) - a default HTML skeleton that should form the 9 | basis of all pages on your website 10 | - `404.html` - a placeholder 404 error page 11 | 12 | ## `index.html` 13 | 14 | ### Language Attribute 15 | 16 | Please consider specifying the language of your content by adding a 17 | [value](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry) 18 | to the `lang` attribute in the `` as in this example: 19 | 20 | ```html 21 | 22 | ``` 23 | 24 | ### The order of the `` and `<meta>` tags 25 | 26 | The charset declaration (`<meta charset="utf-8">`) must be included completely 27 | within the 28 | [first 1024 bytes of the document](https://html.spec.whatwg.org/multipage/semantics.html#charset) 29 | and should be specified as early as possible. 30 | 31 | ### Meta Description 32 | 33 | The `description` meta tag provides a short description of the page. In some 34 | situations this description is used as a part of the snippet shown in the search 35 | results. 36 | 37 | ```html 38 | <meta name="description" content="This is a description"> 39 | ``` 40 | 41 | Google's 42 | [Create good meta descriptions](https://support.google.com/webmasters/answer/35624?hl=en#meta-descriptions) 43 | documentation has useful tips on creating an effective description. 44 | 45 | ### Mobile Viewport 46 | 47 | There are a few different options that you can use with the 48 | [`viewport` meta tag](https://docs.google.com/present/view?id=dkx3qtm_22dxsrgcf4 "Viewport and Media Queries - The Complete Idiot's Guide"). 49 | You can find out more in [ 50 | the MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag). 51 | HTML5 Boilerplate comes with a simple setup that strikes a good balance for general use cases. 52 | 53 | ```html 54 | <meta name="viewport" content="width=device-width, initial-scale=1"> 55 | ``` 56 | 57 | If you want to take advantage of edge-to-edge displays of iPhone X/XS/XR you 58 | can do so with additional viewport parameters. 59 | [Check the WebKit blog](https://webkit.org/blog/7929/designing-websites-for-iphone-x/) for 60 | details. 61 | 62 | ### Open Graph Metadata 63 | 64 | The [Open Graph Protocol](https://ogp.me) allows you to define the way your 65 | site is presented when referenced on third party sites and applications 66 | (Facebook, Twitter, LinkedIn). The protocol provides a series of meta elements 67 | that define the details of your site. The required attributes define the title, 68 | preview image, URL, and [type](https://ogp.me/#types) (e.g., video, music, 69 | website, article). 70 | 71 | ```html 72 | <meta property="og:title" content=""> 73 | <meta property="og:type" content=""> 74 | <meta property="og:url" content=""> 75 | <meta property="og:image" content=""> 76 | <meta property="og:image:alt" content=""> 77 | ``` 78 | 79 | In addition to these four attributes there are many more attributes you can use 80 | to add more richness to the description of your site. This just represents the 81 | most basic implementation. 82 | 83 | To see a working example, the following is the open graph metadata for the HTML5 84 | Boilerplate site. In addition to the required fields we add `og:description` to 85 | describe the site in more detail. 86 | 87 | ```html 88 | <meta property="og:url" content="https://html5boilerplate.com/"> 89 | <meta property="og:title" content="HTML5 ★ BOILERPLATE"> 90 | <meta property="og:type" content="website"> 91 | <meta property="og:description" content="The web’s most popular front-end template which helps you build fast, robust, and adaptable web apps or sites."> 92 | <meta property="og:image" content="https://html5boilerplate.com/icon.png"> 93 | <!-- Empty for decorative images. --> 94 | <meta property="og:image:alt" content=""> 95 | ``` 96 | 97 | ### Web App Manifest 98 | 99 | HTML5 Boilerplate includes a simple web app manifest file. 100 | 101 | The web app manifest is a simple JSON file that allows you to control how your 102 | app appears on a device's home screen, what it looks like when it launches in 103 | that context and what happens when it is launched. This allows for much greater 104 | control over the UI of a saved site or web app on a mobile device. 105 | 106 | It's linked to from the HTML as follows: 107 | 108 | ```html 109 | <link rel="manifest" href="site.webmanifest"> 110 | ``` 111 | 112 | Our 113 | [site.webmanifest](https://github.com/h5bp/html5-boilerplate/blob/main/src/site.webmanifest) 114 | contains a very skeletal "app" definition, just to show the basic usage. You 115 | should fill this file out with 116 | [more information about your site or application](https://developer.mozilla.org/en-US/docs/Web/Manifest) 117 | 118 | ### Favicons and Touch Icon 119 | 120 | The shortcut icons should be put in the root directory of your site. 121 | `favicon.ico` is automatically picked up by browsers if it's placed in the root. 122 | HTML5 Boilerplate comes with a default set of icons (include favicon and one 123 | Apple Touch Icon) that you can use as a baseline to create your own. 124 | 125 | Please refer to the more detailed description in the [Extend section](extend.md) 126 | of these docs. 127 | 128 | ### The Content Area 129 | 130 | The central part of the boilerplate template is pretty much empty. This is 131 | intentional, in order to make the boilerplate suitable for both web page and web 132 | app development. 133 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [HTML5 Boilerplate](https://html5boilerplate.com/) 2 | 3 | [![Build status](https://github.com/h5bp/html5-boilerplate/workflows/Build%20status/badge.svg)](https://github.com/h5bp/html5-boilerplate/actions?query=workflow%3A%22Build+status%22+branch%3Amain) 4 | [![LICENSE](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://github.com/h5bp/html5-boilerplate/blob/main/LICENSE.txt) 5 | [![NPM Downloads](https://img.shields.io/npm/dt/html5-boilerplate.svg)](https://www.npmjs.com/package/html5-boilerplate) 6 | [![github-stars-image](https://img.shields.io/github/stars/h5bp/html5-boilerplate.svg?label=github%20stars)](https://github.com/h5bp/html5-boilerplate) 7 | 8 | HTML5 Boilerplate is a professional front-end template for building 9 | fast, robust, and adaptable web apps or sites. 10 | 11 | This project is the product of over 10 years of iterative development and 12 | community knowledge. It does not impose a specific development 13 | philosophy or framework, so you're free to architect your code in the 14 | way that you want. 15 | 16 | - [Homepage](https://html5boilerplate.com/) 17 | - [Source Code](https://github.com/h5bp/html5-boilerplate) 18 | 19 | ## About This Repository 20 | 21 | This repository is where HTML5-Boilerplate is authored. Some of the tools, 22 | files and processes that you see here are solely for the _production_ of 23 | HTML5 Boilerplate and are not _part_ of HTML5 Boilerplate. For one example, the 24 | [gulpfile.mjs](https://github.com/h5bp/html5-boilerplate/blob/main/gulpfile.mjs) 25 | script is used to _build_ the project. It's not part of the project itself. 26 | 27 | The project we publish is represented by the contents of the `/dist/` 28 | folder. Everything else in this repository is used to author the project. 29 | 30 | Think of it this way, in the same way that you don't clone [vuejs/core](https://github.com/vuejs/core) 31 | to create a Vue.js app, you don't need to clone this repository to start a new 32 | site or app based on HTML5 Boilerplate. 33 | 34 | So, if you're looking for a quick start template to build a website or 35 | application, look at the options in the 36 | [Quick Start](https://github.com/h5bp/html5-boilerplate#quick-start) section of this document. 37 | 38 | If you want to help us _improve_ HTML5 Boilerplate then you can start with the documentation [here](.github/CONTRIBUTING.md), which includes steps to clone this repo in order to get it set up for development. 39 | 40 | ## Quick Start 41 | 42 | Choose one of the following options: 43 | 44 | - Using the [create-html5-boilerplate](https://github.com/h5bp/create-html5-boilerplate) 45 | script, instantly fetch the latest npm published package (or any version 46 | available on npm) with `npx`, `npm init` or `yarn create` without having to 47 | install any dependencies. Running the following `npx` command installs the 48 | latest version into a folder called `new-site` 49 | 50 | ```bash 51 | npx create-html5-boilerplate new-site 52 | cd new-site 53 | npm install 54 | npm run start 55 | ``` 56 | 57 | - Using our new [Template Repository](https://github.com/h5bp/html5-boilerplate-template) 58 | create a new GitHub repository based on the latest code from the main branch of HTML5 59 | Boilerplate. 60 | 61 | - Install with [npm](https://www.npmjs.com/): `npm install html5-boilerplate` 62 | or [yarn](https://yarnpkg.com/): `yarn add html5-boilerplate`. The resulting 63 | `node_modules/html5-boilerplate/dist` folder represents the latest version of 64 | the project for end users. Depending on what you want to use and how you want 65 | to use it, you may have to copy and paste the contents of that folder into 66 | your project directory. 67 | 68 | - Download the latest stable release from 69 | [here](https://github.com/h5bp/html5-boilerplate/releases/download/v9.0.0/html5-boilerplate_v9.0.0.zip). This zip file is a 70 | snapshot of the `dist` folder. On Windows, Mac and from the file manager on 71 | Linux unzipping this folder will output to a folder named something like 72 | `html5-boilerplate_v9.0.0`. From the command-line, you will need to create a 73 | folder and unzip the contents into that folder. 74 | 75 | ```bash 76 | mkdir html5-boilerplate 77 | unzip html5-boilerplate*.zip -d html5-boilerplate 78 | ``` 79 | 80 | ## Features 81 | 82 | - A finely-tuned starter template: Reap the benefits of 10 years of analysis, 83 | research and experimentation by over 200 contributors. 84 | - Designed with progressive enhancement in mind. 85 | - Includes: 86 | - Placeholder Open Graph elements and attributes. 87 | - An example package.json file with [WebPack](https://webpack.js.org/) commands 88 | built in to jumpstart application development. 89 | - Placeholder CSS Media Queries. 90 | - Useful CSS helper classes. 91 | - Default print styles, performance optimized. 92 | - "Delete-key friendly." Easy to strip out parts you don't need. 93 | - Extensive documentation. 94 | 95 | ## Browser Support 96 | 97 | HTML5-Boilerplate supports the latest, stable releases of all major browsers. 98 | 99 | Check the `default` configuration from [Browserslist](https://browsersl.ist/#q=defaults) 100 | for more details on browsers and versions covered. 101 | 102 | ## Documentation 103 | 104 | Take a look at the [documentation table of contents](docs/TOC.md). This 105 | documentation is bundled with the project which makes it available for offline 106 | reading and provides a useful starting point for any documentation you want to 107 | write about your project. 108 | 109 | ## Contributing 110 | 111 | Hundreds of developers have helped to make the HTML5 Boilerplate. Anyone is 112 | welcome to [contribute](.github/CONTRIBUTING.md). However, if you decide to get 113 | involved, please take a moment to review the [guidelines](.github/CONTRIBUTING.md): 114 | 115 | - [Bug reports](.github/CONTRIBUTING.md#bugs) 116 | - [Feature requests](.github/CONTRIBUTING.md#features) 117 | - [Pull requests](.github/CONTRIBUTING.md#pull-requests) 118 | 119 | ## License 120 | 121 | The code is available under the [MIT license](LICENSE.txt). 122 | -------------------------------------------------------------------------------- /docs/about-this-repo.md: -------------------------------------------------------------------------------- 1 | # About This Repo 2 | 3 | This document outlines the configuration of this repo as well as the basic 4 | process we use to manage the project. As GitHub has matured as a platform 5 | and HTML5 Boilerplate has matured as a project there are a lot of lessons 6 | to be learned from the way we run the show here. 7 | 8 | ## GitHub configuration 9 | 10 | This section will go through the way we configure the repo in GitHub. 11 | Open source projects get the full power of the platform and as a project 12 | we like to experiment with new GitHub features. Our current configuration 13 | might help you figure out some things you want to do in your own projects. 14 | 15 | ### General Configuration 16 | 17 | This section outlines the basic configuration options we use. 18 | 19 | - We have a stub of a Wiki still, so we have wikis turned on. The most 20 | interesting page that remains is a history of the project written several 21 | years ago. 22 | - We use the Issues feature heavily. We don't yet have Issue Templates set 23 | up, but we do have adding them as an issue, so we'll take advantage of them 24 | at some point. 25 | - Discussions are enabled, but they haven't been very useful so far. 26 | 27 | ### Pull Requests 28 | 29 | The most visible portion of our configuration is the way we handle pull 30 | requests. At the most basic level, we require pull requests to add code 31 | to the repo and require a review to merge code. In addition we run several 32 | code quality checks on every pull request to make sure we're not introducing 33 | anything we don't want into the codebase. 34 | 35 | We take advantage of the "draft" feature for PRs. This way we have visibility 36 | throughout the life of the PR. 37 | 38 | Let's take a look at how we configure our `main` branch. 39 | 40 | #### `main` 41 | 42 | `main` is the default branch and is our only protected branch. We use feature 43 | branches to add features and/or fix issues in the codebase. Other project 44 | configurations might require a long-running, similarly protected, `development` 45 | branch but for us the single protected `main` branch is enough for our 46 | purposes. 47 | 48 | Our branch protection rules are as follows: 49 | 50 | - We require a pull request (PR) with one approving reviewer to merge code 51 | - In addition to the PR and approving reviewer, we require three status checks 52 | to pass before code can be merged 53 | _ Build with Node 20 54 | _ Build with Node 22 55 | _ Build with Node 24 56 | - We _allow_ force pushes for project admins. While force pushes can create 57 | some head scratching moments for people who have cloned the repo and update 58 | before and after the force push, the ability to clean up the `HEAD` of a 59 | public branch like this in an emergency is useful. 60 | 61 | #### GitHub Actions and Other Checks That Run on `main` 62 | 63 | - We run a simple _build status_ check. This is the most basic test you can run 64 | and is absolutely vital. If you can't build your project you're in trouble. 65 | Currently we're testing against Node 16 and 18. 66 | - We take advantage of our access to _CodeQL analysis_ Free for research and 67 | open source don't you know :) We don't have a ton of surface area to cover, 68 | but it's nice to have this powerful code scanning tool available to us. 69 | - We run a _dependency review_ scan to see if any newly added dependencies add 70 | known security flaws. This is important for even us, but for a project that 71 | uses a larger number of third party dependencies, this sort of check is vital. 72 | - We also run a CodeQL scans to check for security issues and problems. 73 | - We push any changes to `main` to our [HTML5\-Boilerplate Template Repo](https://github.com/h5bp/html5-boilerplate-template) 74 | 75 | Since we've talked about some of our Actions, let's look at the full configuration 76 | of our `.github` folder. 77 | 78 | ### .github Folder 79 | 80 | - workflows 81 | - `build-dist.yml` is currently broken. We can't push to `main` without a 82 | code review, so this task is blocked. What I would like, (are you there, 83 | GitHub, it's me, Rob) is to allow Actions to bypass branch protection 84 | rules. I think we'll have to basically write a mini-bot that opens a PR 85 | whenever there are changes to `main` and then pushes to the same branch 86 | until the PR is closed. In some ways that will be better as it will be less 87 | noisy in terms of bot pushes to main. 88 | - `codeql-analysis.yml` controls our CodeQL action. We use the defaults. If 89 | you're building something with more JavaScript footprint, you can tweak 90 | the settings for this job. 91 | - `dependency-review.yml` does what it says on the tin- it tests newly 92 | introduced dependencies for vulnerabilities. 93 | - `publish.yml` is the action that publishes all the various versions of 94 | the project. When we create a new tag and push it to GitHub, this script 95 | publishes our npm package and creates a GitHub release and attaches a zip 96 | file of our `dist` folder. 97 | - `push-to-template.yml` pushes the `HEAD` of `main` to our template repo 98 | - `spellcheck.yml` automatically checks markdown files for typos with cSpell. 99 | - `test.yml` runs our test suite on Ubuntu. 100 | - `test-windows.yml` runs our test suite on Windows. 101 | - `CODE_OF_CONDUCT.md` is our Code of Conduct, based on 102 | [Contributor Covenant.](https://www.contributor-covenant.org/) 103 | - `CONTRIBUTING.md` contains our contribution guidelines. 104 | - `ISSUE_TEMPLATE.md` is our new issue boilerplate. 105 | - `PULL_REQUEST_TEMPLATE.md` is our new PR boilerplate. 106 | - `SUPPORT.md` points people to different (non-HTML5-Boilerplate) support 107 | resources 108 | - `dependabot.yml` is our Dependabot configuration. We do `npm`, monthly on 109 | two separate `package.json` files, one in `src` and one in project root. 110 | 111 | --- 112 | 113 | That covers most of the interesting GitHub features and functionality that we 114 | use. We're going to continue to keep this document up to date as we change 115 | things or new GitHub features. 116 | -------------------------------------------------------------------------------- /dist/css/style.css: -------------------------------------------------------------------------------- 1 | /*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */ 2 | 3 | /* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */ 4 | /* 5 | * What follows is the result of much research on cross-browser styling. 6 | * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal, 7 | * Kroc Camen, and the H5BP dev community and team. 8 | */ 9 | 10 | /* ========================================================================== 11 | Base styles: opinionated defaults 12 | ========================================================================== */ 13 | 14 | html { 15 | color: #222; 16 | font-size: 1em; 17 | line-height: 1.4; 18 | } 19 | 20 | /* 21 | * Remove text-shadow in selection highlight: 22 | * https://twitter.com/miketaylr/status/12228805301 23 | * 24 | * Customize the background color to match your design. 25 | */ 26 | 27 | ::-moz-selection { 28 | background: #b3d4fc; 29 | text-shadow: none; 30 | } 31 | 32 | ::selection { 33 | background: #b3d4fc; 34 | text-shadow: none; 35 | } 36 | 37 | /* 38 | * A better looking default horizontal rule 39 | */ 40 | 41 | hr { 42 | display: block; 43 | height: 1px; 44 | border: 0; 45 | border-top: 1px solid #ccc; 46 | margin: 1em 0; 47 | padding: 0; 48 | } 49 | 50 | /* 51 | * Remove the gap between audio, canvas, iframes, 52 | * images, videos and the bottom of their containers: 53 | * https://github.com/h5bp/html5-boilerplate/issues/440 54 | */ 55 | 56 | audio, 57 | canvas, 58 | iframe, 59 | img, 60 | svg, 61 | video { 62 | vertical-align: middle; 63 | } 64 | 65 | /* 66 | * Remove default fieldset styles. 67 | */ 68 | 69 | fieldset { 70 | border: 0; 71 | margin: 0; 72 | padding: 0; 73 | } 74 | 75 | /* 76 | * Allow only vertical resizing of textareas. 77 | */ 78 | 79 | textarea { 80 | resize: vertical; 81 | } 82 | 83 | /* ========================================================================== 84 | Author's custom styles 85 | ========================================================================== */ 86 | 87 | /* ========================================================================== 88 | Helper classes 89 | ========================================================================== */ 90 | 91 | /* 92 | * Hide visually and from screen readers 93 | */ 94 | 95 | .hidden, 96 | [hidden] { 97 | display: none !important; 98 | } 99 | 100 | /* 101 | * Hide only visually, but have it available for screen readers: 102 | * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility 103 | * 104 | * 1. For long content, line feeds are not interpreted as spaces and small width 105 | * causes content to wrap 1 word per line: 106 | * https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe 107 | */ 108 | 109 | .visually-hidden { 110 | border: 0; 111 | clip: rect(0, 0, 0, 0); 112 | height: 1px; 113 | margin: -1px; 114 | overflow: hidden; 115 | padding: 0; 116 | position: absolute; 117 | white-space: nowrap; 118 | width: 1px; 119 | /* 1 */ 120 | } 121 | 122 | /* 123 | * Extends the .visually-hidden class to allow the element 124 | * to be focusable when navigated to via the keyboard: 125 | * https://www.drupal.org/node/897638 126 | */ 127 | 128 | .visually-hidden.focusable:active, 129 | .visually-hidden.focusable:focus { 130 | clip: auto; 131 | height: auto; 132 | margin: 0; 133 | overflow: visible; 134 | position: static; 135 | white-space: inherit; 136 | width: auto; 137 | } 138 | 139 | /* 140 | * Hide visually and from screen readers, but maintain layout 141 | */ 142 | 143 | .invisible { 144 | visibility: hidden; 145 | } 146 | 147 | /* 148 | * Clearfix: contain floats 149 | * 150 | * The use of `table` rather than `block` is only necessary if using 151 | * `::before` to contain the top-margins of child elements. 152 | */ 153 | 154 | .clearfix::before, 155 | .clearfix::after { 156 | content: ""; 157 | display: table; 158 | } 159 | 160 | .clearfix::after { 161 | clear: both; 162 | } 163 | 164 | /* ========================================================================== 165 | EXAMPLE Media Queries for Responsive Design. 166 | These examples override the primary ('mobile first') styles. 167 | Modify as content requires. 168 | ========================================================================== */ 169 | 170 | @media only screen and (min-width: 35em) { 171 | /* Style adjustments for viewports that meet the condition */ 172 | } 173 | 174 | @media print, 175 | (-webkit-min-device-pixel-ratio: 1.25), 176 | (min-resolution: 1.25dppx), 177 | (min-resolution: 120dpi) { 178 | /* Style adjustments for high resolution devices */ 179 | } 180 | 181 | /* ========================================================================== 182 | Print styles. 183 | Inlined to avoid the additional HTTP request: 184 | https://www.phpied.com/delay-loading-your-print-css/ 185 | ========================================================================== */ 186 | 187 | @media print { 188 | *, 189 | *::before, 190 | *::after { 191 | background: #fff !important; 192 | color: #000 !important; 193 | /* Black prints faster */ 194 | box-shadow: none !important; 195 | text-shadow: none !important; 196 | } 197 | 198 | a, 199 | a:visited { 200 | text-decoration: underline; 201 | } 202 | 203 | a[href]::after { 204 | content: " (" attr(href) ")"; 205 | } 206 | 207 | abbr[title]::after { 208 | content: " (" attr(title) ")"; 209 | } 210 | 211 | /* 212 | * Don't show links that are fragment identifiers, 213 | * or use the `javascript:` pseudo protocol 214 | */ 215 | a[href^="#"]::after, 216 | a[href^="javascript:"]::after { 217 | content: ""; 218 | } 219 | 220 | pre { 221 | white-space: pre-wrap !important; 222 | } 223 | 224 | pre, 225 | blockquote { 226 | border: 1px solid #999; 227 | page-break-inside: avoid; 228 | } 229 | 230 | tr, 231 | img { 232 | page-break-inside: avoid; 233 | } 234 | 235 | p, 236 | h2, 237 | h3 { 238 | orphans: 3; 239 | widows: 3; 240 | } 241 | 242 | h2, 243 | h3 { 244 | page-break-after: avoid; 245 | } 246 | } 247 | 248 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to HTML5 Boilerplate 2 | 3 | ♥ [HTML5 Boilerplate](https://html5boilerplate.com/) and want to get involved? 4 | Thanks! We're actively looking for folks interested in helping out and there 5 | are plenty of ways you can help! 6 | 7 | Please take a moment to review this document in order to make the contribution 8 | process easy and effective for everyone involved. 9 | 10 | Following these guidelines helps to communicate that you respect the time of 11 | the developers managing and developing this open source project. In return, 12 | they should reciprocate that respect in addressing your issue or assessing 13 | patches and features. 14 | 15 | ## Using the issue tracker 16 | 17 | The [issue tracker](https://github.com/h5bp/html5-boilerplate/issues) is 18 | the preferred channel for [bug reports](#bugs), [features requests](#features) 19 | and [submitting pull requests](#pull-requests), but please respect the following 20 | restrictions: 21 | 22 | - Please **do not** use the issue tracker for personal support requests (use 23 | [Stack Overflow](https://stackoverflow.com/questions/tagged/html5boilerplate)). 24 | 25 | - Please **do not** derail or troll issues. Keep the discussion on topic and 26 | respect the opinions of others. 27 | 28 | <a name="bugs"></a> 29 | 30 | ## Bug reports 31 | 32 | A bug is a _demonstrable problem_ that is caused by the code in the repository. 33 | Good bug reports are extremely helpful - thank you! 34 | 35 | Guidelines for bug reports: 36 | 37 | 1. **Use the GitHub issue search** — check if the issue has already been 38 | reported. 39 | 40 | 2. **Check if the issue has been fixed** — try to reproduce it using the 41 | latest `main` or development branch in the repository. 42 | 43 | 3. **Isolate the problem** — ideally create a [reduced test 44 | case](https://css-tricks.com/reduced-test-cases/) and a live example. 45 | 46 | A good bug report shouldn't leave others needing to chase you up for more 47 | information. Please try to be as detailed as possible in your report. What is 48 | your environment? What steps will reproduce the issue? What browser(s) and OS 49 | experience the problem? What would you expect to be the outcome? All these 50 | details will help people to fix any potential bugs. 51 | 52 | Example: 53 | 54 | > Short and descriptive example bug report title 55 | > 56 | > A summary of the issue and the browser/OS environment in which it occurs. If 57 | > suitable, include the steps required to reproduce the bug. 58 | > 59 | > 1. This is the first step 60 | > 2. This is the second step 61 | > 3. Further steps, etc. 62 | > 63 | > `<url>` - a link to the reduced test case 64 | > 65 | > Any other information you want to share that is relevant to the issue being 66 | > reported. This might include the lines of code that you have identified as 67 | > causing the bug, and potential solutions (and your opinions on their 68 | > merits). 69 | 70 | <a name="features"></a> 71 | 72 | ## Feature requests 73 | 74 | Feature requests are welcome. But take a moment to find out whether your idea 75 | fits with the scope and aims of the project. It's up to _you_ to make a strong 76 | case to convince the project's developers of the merits of this feature. Please 77 | provide as much detail and context as possible. 78 | 79 | <a name="pull-requests"></a> 80 | 81 | ## Pull requests 82 | 83 | Good pull requests - patches, improvements, new features - are a fantastic 84 | help. They should remain focused in scope and avoid containing unrelated 85 | commits. 86 | 87 | **Please ask first** before embarking on any significant pull request (e.g. 88 | implementing features, refactoring code, porting to a different language), 89 | otherwise you risk spending a lot of time working on something that the 90 | project's developers might not want to merge into the project. 91 | 92 | Please adhere to the coding conventions used throughout a project (indentation, 93 | accurate comments, etc.) and any other requirements (such as test coverage). 94 | 95 | Adhering to the following process is the best way to get your work 96 | included in the project: 97 | 98 | 1. [Fork](https://help.github.com/articles/fork-a-repo/) the project, clone your 99 | fork, and configure the remotes: 100 | 101 | ```bash 102 | # Clone your fork of the repo into the current directory 103 | git clone https://github.com/<your-username>/html5-boilerplate.git 104 | # Navigate to the newly cloned directory 105 | cd html5-boilerplate 106 | # Assign the original repo to a remote called "upstream" 107 | git remote add upstream https://github.com/h5bp/html5-boilerplate.git 108 | ``` 109 | 110 | 2. If you cloned a while ago, get the latest changes from upstream: 111 | 112 | ```bash 113 | git checkout main 114 | git pull upstream main 115 | ``` 116 | 117 | 3. Create a new topic branch (off the main project development branch) to 118 | contain your feature, change, or fix: 119 | 120 | ```bash 121 | git checkout -b <topic-branch-name> 122 | ``` 123 | 124 | 4. Install locked dependencies: 125 | 126 | ```bash 127 | npm ci 128 | ``` 129 | 130 | Ensure that your `node` and `npm` versions are compatible with the `engines` 131 | specification in `package.json`. 132 | 133 | 5. Commit your changes in logical chunks. Please adhere to these [git commit 134 | message guidelines](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) 135 | or your code is unlikely be merged into the main project. Use Git's 136 | [interactive rebase](https://help.github.com/articles/about-git-rebase/) 137 | feature to tidy up your commits before making them public. 138 | 139 | 6. Locally merge (or rebase) the upstream development branch into your topic branch: 140 | 141 | ```bash 142 | git pull [--rebase] upstream main 143 | ``` 144 | 145 | 7. Update any applicable test cases and run tests: 146 | 147 | ```bash 148 | npm run test 149 | ``` 150 | 151 | Tests must cover changes and pass to be accepted. 152 | 153 | 8. Run build and commit changes to dist: 154 | 155 | ```bash 156 | npm run build 157 | git add dist/ 158 | git commit 159 | ``` 160 | 161 | 9. Push your topic branch up to your fork: 162 | 163 | ```bash 164 | git push origin <topic-branch-name> 165 | ``` 166 | 167 | 10. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) 168 | with a clear title and description. 169 | 170 | **IMPORTANT**: By submitting a patch, you agree to allow the project 171 | owners to license your work under the terms of the [MIT License](LICENSE.txt). 172 | -------------------------------------------------------------------------------- /docs/extend.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](https://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # Extend and customize HTML5 Boilerplate 5 | 6 | Here is some useful advice for how you can make your project with HTML5 7 | Boilerplate even better. We don't want to include it all by default, as not 8 | everything fits with everyone's needs. 9 | 10 | - [Server Configuration](#server-configuration) 11 | - [App Stores](#app-stores) 12 | - [DNS prefetching](#dns-prefetching) 13 | - [Miscellaneous](#miscellaneous) 14 | - [News Feeds](#news-feeds) 15 | - [Search](#search) 16 | - [Social Networks](#social-networks) 17 | - [URLs](#urls) 18 | - [Web Apps](#web-apps) 19 | - [security.txt](#securitytxt) 20 | 21 | ## Server Configuration 22 | 23 | We no longer include a [`.htaccess`](#htaccess) file for the [Apache HTTP 24 | server](https://httpd.apache.org/docs/) in HTML5 Boilerplate by default, however if you are 25 | using a web server, then we encourage you to checkout out the [server configuration](https://github.com/h5bp/server-configs) 26 | that corresponds to your web server and environment. 27 | 28 | These repos offer a collection of configuration snippets that can help your server improve the 29 | website's performance and security, while also ensuring that resources are served with the 30 | correct content-type and are accessible, if needed, even cross-domain. 31 | 32 | ## App Stores 33 | 34 | ### Smart App Banners in iOS 6+ Safari 35 | 36 | Stop bothering everyone with gross modals advertising your entry in the App 37 | Store. Including the following [meta 38 | tag](https://developer.apple.com/documentation/webkit/promoting_apps_with_smart_app_banners) 39 | will unobtrusively give the user the option to download your iOS app, or open it 40 | with some data about the user's current state on the website. 41 | 42 | ```html 43 | <meta name="apple-itunes-app" content="app-id=APP_ID,app-argument=SOME_TEXT"> 44 | ``` 45 | 46 | ## DNS prefetching 47 | 48 | In short, DNS Prefetching is a method of informing the browser of domain names 49 | referenced on a site so that the client can resolve the DNS for those hosts, 50 | cache them, and when it comes time to use them, have a faster turn around on the 51 | request. 52 | 53 | ### Implicit prefetches 54 | 55 | There is a lot of prefetching done for you automatically by the browser. When 56 | the browser encounters an anchor in your HTML that does not share the same 57 | domain name as the current location the browser requests, from the client OS, 58 | the IP address for this new domain. The client first checks its cache and then, 59 | lacking a cached copy, makes a request from a DNS server. These requests happen 60 | in the background and are not meant to block the rendering of the page. 61 | 62 | The goal of this is that when the foreign IP address is finally needed it will 63 | already be in the client cache and will not block the loading of the foreign 64 | content. Fewer requests result in faster page load times. The perception of this 65 | is increased on a mobile platform where DNS latency can be greater. 66 | 67 | ### Explicit prefetches 68 | 69 | Typically the browser only scans the HTML for foreign domains. If you have 70 | resources that are outside of your HTML (a JavaScript request to a remote server 71 | or a CDN that hosts content that may not be present on every page of your site, 72 | for example) then you can queue up a domain name to be prefetched. 73 | 74 | ```html 75 | <link rel="dns-prefetch" href="//example.com"> 76 | <link rel="dns-prefetch" href="https://ajax.googleapis.com"> 77 | ``` 78 | 79 | You can use as many of these as you need, but it's best if they are all 80 | immediately after the [Meta 81 | Charset](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset) 82 | element (which should go right at the top of the `head`), so the browser can act 83 | on them ASAP. 84 | 85 | ### Further reading about DNS prefetching 86 | 87 | - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-DNS-Prefetch-Control 88 | - https://dev.chromium.org/developers/design-documents/dns-prefetching 89 | 90 | ## Search 91 | 92 | ### Direct search spiders to your sitemap 93 | 94 | After creating a [sitemap](https://www.sitemaps.org/protocol.html) 95 | 96 | Submit it to search engine tool: 97 | 98 | - [Google](https://www.google.com/webmasters/tools/sitemap-list) 99 | - [Bing](https://www.bing.com/toolbox/webmaster) 100 | - [Yandex](https://webmaster.yandex.com/) 101 | - [Baidu](https://zhanzhang.baidu.com/) OR Insert the following line anywhere in 102 | your robots.txt file, specifying the path to your sitemap: 103 | 104 | ``` 105 | Sitemap: https://example.com/sitemap_location.xml 106 | ``` 107 | 108 | ### Hide pages from search engines 109 | 110 | According to Heather Champ, former community manager at Flickr, you should not 111 | allow search engines to index your "Contact Us" or "Complaints" page if you 112 | value your sanity. This is an HTML-centric way of achieving that. 113 | 114 | ```html 115 | <meta name="robots" content="noindex"> 116 | ``` 117 | 118 | **_WARNING:_** DO NOT INCLUDE ON PAGES THAT SHOULD APPEAR IN SEARCH ENGINES. 119 | 120 | ### Search Plugins 121 | 122 | Sites with in-site search functionality should be strongly considered for a 123 | browser search plugin. A "search plugin" is an XML file which defines how your 124 | plugin behaves in the browser. [How to make a browser search 125 | plugin](https://developer.mozilla.org/en-US/docs/Web/OpenSearch). 126 | 127 | ```html 128 | <link rel="search" title="" type="application/opensearchdescription+xml" href=""> 129 | ``` 130 | 131 | ## Miscellaneous 132 | 133 | - Use [Microformats](https://microformats.org/wiki/Main_Page) (via 134 | [microdata](https://microformats.org/wiki/microdata)) for optimum search 135 | results 136 | [visibility](https://developers.google.com/search/blog/2009/05/introducing-rich-snippets). 137 | 138 | - If you want to disable the translation prompt in Chrome or block Google 139 | Translate from translating your web page, use [`<meta name="google" 140 | content="notranslate">`](https://developers.google.com/search/docs/crawling-indexing/special-tags). 141 | To disable translation for a particular section of the web page, add 142 | [`class="notranslate"`](https://support.google.com/translate/?hl=en#2641276). 143 | 144 | - If you want to disable the automatic detection and formatting of possible 145 | phone numbers in Safari on iOS, use [`<meta name="format-detection" 146 | content="telephone=no">`](https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html). 147 | 148 | - Avoid development/stage websites "leaking" into SERPs (search engine results 149 | page) by [implementing X-Robots-tag 150 | headers](https://github.com/h5bp/html5-boilerplate/issues/804). 151 | 152 | - Apply JavaScript-dependent CSS styles using [the `scripting` media 153 | feature](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/scripting). 154 | Use `@media (scripting: none) { ... }` to target browsers with JavaScript 155 | disabled, or `@media (scripting: enabled) { ... }` to target browsers with 156 | JavaScript enabled. Using this technique also helps [avoid the 157 | FOUC](https://www.paulirish.com/2009/avoiding-the-fouc-v3/). 158 | 159 | ## News Feeds 160 | 161 | ### RSS 162 | 163 | Have an RSS feed? Link to it here. Want to [learn how to write an RSS feed from 164 | scratch](https://www.rssboard.org/rss-specification)? 165 | 166 | ```html 167 | <link rel="alternate" type="application/rss+xml" title="RSS" href="/rss.xml"> 168 | ``` 169 | 170 | ### Atom 171 | 172 | Atom is similar to RSS, and you might prefer to use it instead of or in addition 173 | to it. [See what Atom's all 174 | about](<https://en.wikipedia.org/wiki/Atom_(Web_standard)>). 175 | 176 | ```html 177 | <link rel="alternate" type="application/atom+xml" title="Atom" href="/atom.xml"> 178 | ``` 179 | 180 | ### Pingbacks 181 | 182 | Your server may be notified when another site links to yours. The href attribute 183 | should contain the location of your pingback service. 184 | 185 | ```html 186 | <link rel="pingback" href=""> 187 | ``` 188 | 189 | - High-level explanation: 190 | https://codex.wordpress.org/Introduction_to_Blogging#Pingbacks 191 | - Step-by-step example case: 192 | https://www.hixie.ch/specs/pingback/pingback-1.0#TOC5 193 | - PHP pingback service: 194 | https://web.archive.org/web/20131211032834/http://blog.perplexedlabs.com/2009/07/15/xmlrpc-pingbacks-using-php/ 195 | 196 | ## Social Networks 197 | 198 | ### Facebook Open Graph data 199 | 200 | You can control the information that Facebook and others display when users 201 | share your site. Below are just the most basic data points you might need. For 202 | specific content types (including "website"), see [Facebook's built-in Open 203 | Graph content 204 | templates](https://developers.facebook.com/docs/sharing/opengraph/using-objects). 205 | Take full advantage of Facebook's support for complex data and activity by 206 | following the [Open Graph 207 | tutorial](https://developers.facebook.com/docs/sharing/webmasters/getting-started). 208 | 209 | For a reference of Open Graph's markup and properties, you may check [Facebook's 210 | Open Graph Protocol reference](https://ogp.me). Finally, you can validate your 211 | markup with the [Facebook Object 212 | Debugger](https://developers.facebook.com/tools/debug/) (needs registration to 213 | Facebook). 214 | 215 | ```html 216 | <meta property="fb:app_id" content="123456789"> 217 | <meta property="og:url" content="https://www.example.com/path/to/page.html"> 218 | <meta property="og:type" content="website"> 219 | <meta property="og:title" content=""> 220 | <meta property="og:image" content="https://www.example.com/path/to/image.jpg"> 221 | <!-- Empty for decorative images. --> 222 | <meta property="og:image:alt" content="Example image depicting..."> 223 | <meta property="og:description" content=""> 224 | <meta property="og:site_name" content=""> 225 | <meta property="article:author" content=""> 226 | ``` 227 | 228 | ### Twitter Cards 229 | 230 | Twitter provides a snippet specification that serves a similar purpose to Open 231 | Graph. In fact, Twitter will use Open Graph when Cards is not available. You can 232 | read more about the various snippet formats in the 233 | [official Twitter Cards 234 | documentation](https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards). 235 | 236 | ```html 237 | <meta name="twitter:card" content="summary"> 238 | <meta name="twitter:site" content="@site_account"> 239 | <meta name="twitter:creator" content="@individual_account"> 240 | <meta name="twitter:url" content="https://www.example.com/path/to/page.html"> 241 | <meta name="twitter:title" content=""> 242 | <meta name="twitter:description" content=""> 243 | <meta name="twitter:image" content="https://www.example.com/path/to/image.jpg"> 244 | ``` 245 | 246 | ### Schema.org 247 | 248 | Google also provides a snippet specification that serves a similar purpose to 249 | Facebook's Open Graph or Twitter Cards. This metadata is a subset of 250 | [schema.org's microdata vocabulary](https://schema.org/), which covers many 251 | other schemas that can describe the content of your pages to search engines. For 252 | this reason, this metadata is more generic for SEO, notably for Google's 253 | search-engine, although this vocabulary is also used by Microsoft, Pinterest and 254 | Yandex. 255 | 256 | You can validate your markup with the [Structured Data Testing 257 | Tool](https://developers.google.com/search/docs/appearance/structured-data). Also, please 258 | note that this markup requires to add attributes to your top `html` tag. 259 | 260 | ```html 261 | <html lang="" itemscope itemtype="https://schema.org/Article"> 262 | <head> 263 | 264 | <link rel="author" href=""> 265 | <link rel="publisher" href=""> 266 | <meta itemprop="name" content=""> 267 | <meta itemprop="description" content=""> 268 | <meta itemprop="image" content=""> 269 | ``` 270 | 271 | ## URLs 272 | 273 | ### Canonical URL 274 | 275 | Signal to search engines and others "Use this URL for this page!" Useful when 276 | parameters after a `#` or `?` is used to control the display state of a page. 277 | `https://www.example.com/cart.html?shopping-cart-open=true` can be indexed as 278 | the cleaner, more accurate `https://www.example.com/cart.html`. 279 | 280 | ```html 281 | <link rel="canonical" href=""> 282 | ``` 283 | 284 | ## Web Apps 285 | 286 | There are a couple of meta tags that provide information about a web app when 287 | added to the Home Screen on iOS: 288 | 289 | - Adding `apple-mobile-web-app-capable` will make your web app chrome-less and 290 | provide the default iOS app view. You can control the color scheme of the 291 | default view by adding `apple-mobile-web-app-status-bar-style`. 292 | 293 | ```html 294 | <meta name="apple-mobile-web-app-capable" content="yes"> 295 | <meta name="apple-mobile-web-app-status-bar-style" content="black"> 296 | ``` 297 | 298 | - You can use `apple-mobile-web-app-title` to add a specific sites name for the 299 | Home Screen icon. 300 | 301 | ```html 302 | <meta name="apple-mobile-web-app-title" content=""> 303 | ``` 304 | 305 | For further information please read the [official 306 | documentation](https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html) 307 | on Apple's site. 308 | 309 | ### Apple Touch Icons 310 | 311 | Apple touch icons are used as icons when a user adds your webapp to the home 312 | screen of an iOS devices. 313 | 314 | Though the dimensions of the icon can vary between iOS devices and versions one 315 | `180×180px` touch icon named `icon.png` and including the following in the 316 | `<head>` of the page is enough: 317 | 318 | ```html 319 | <link rel="apple-touch-icon" href="icon.png"> 320 | ``` 321 | 322 | For a more comprehensive overview, please refer to Mathias' [article on Touch 323 | Icons](https://mathiasbynens.be/notes/touch-icons). 324 | 325 | ### Apple Touch Startup Image 326 | 327 | Apart from that it is possible to add start-up screens for web apps on iOS. This 328 | basically works by defining `apple-touch-startup-image` with an according link 329 | to the image. Since iOS devices have different screen resolutions it maybe 330 | necessary to add media queries to detect which image to load. Here is an example 331 | for an iPhone: 332 | 333 | ```html 334 | <link rel="apple-touch-startup-image" media="(max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)" href="img/startup.png"> 335 | ``` 336 | 337 | ### Theme Color 338 | 339 | You can add the [`theme-color` meta 340 | extension](https://html.spec.whatwg.org/multipage/semantics.html#meta-theme-color) 341 | in the `<head>` of your pages to suggest the color that browsers and OSes should 342 | use if they customize the display of individual pages in their UIs with varying 343 | colors. 344 | 345 | ```html 346 | <meta name="theme-color" content="#ff69b4"> 347 | ``` 348 | 349 | The `content` attribute extension can take any valid CSS color. 350 | 351 | For browser support details, refer to [Can I Use](https://caniuse.com/meta-theme-color). 352 | 353 | ### security.txt 354 | 355 | When security risks in web services are discovered by users they often lack the 356 | channels to disclose them properly. As a result, security issues may be left 357 | unreported. 358 | 359 | Security.txt defines a standard to help organizations define the process for 360 | users to disclose security vulnerabilities securely. Include a text file on your 361 | server at `.well-known/security.txt` with the relevant contact details. 362 | 363 | Check [https://securitytxt.org/](https://securitytxt.org/) for more details. 364 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## 9.0.1 (April 11, 2024) 4 | 5 | - Fixed tests on Windows, adds Windows Testing Action [#3110](https://github.com/h5bp/html5-boilerplate/pull/3110) 6 | - Add og:image:alt for accessibility [#3066](https://github.com/h5bp/html5-boilerplate/pull/3066) 7 | - Upgrade to Gulp 5 [#3100](https://github.com/h5bp/html5-boilerplate/pull/3100) [#3105](https://github.com/h5bp/html5-boilerplate/pull/3105) 8 | - ci: Use GITHUB_OUTPUT envvar instead of set-output command [#3068](https://github.com/h5bp/html5-boilerplate/pull/3068) 9 | - Readme and Changelog updates [#3055](https://github.com/h5bp/html5-boilerplate/pull/3055) [#3057](https://github.com/h5bp/html5-boilerplate/pull/3057) [#3064](https://github.com/h5bp/html5-boilerplate/pull/3064) 10 | 11 | ## 9.0.0 (December 6, 2023) 12 | 13 | - Removing tile images [#3023](https://github.com/h5bp/html5-boilerplate/pull/3023) 14 | - Add Prettier [#3011](https://github.com/h5bp/html5-boilerplate/pull/3011) 15 | - Remove Modernizr [#3002](https://github.com/h5bp/html5-boilerplate/issues/3002) 16 | - Drop Normalize.css [#2960](https://github.com/h5bp/html5-boilerplate/pull/2960) 17 | - Create WebPack build to ship with the project [#2650](https://github.com/h5bp/html5-boilerplate/issues/2650) 18 | - Sets package to private by default [#2888](https://github.com/h5bp/html5-boilerplate/pull/2888) 19 | - Removes Babel and upgrades our gulpfile to use ES Modules [#2831](https://github.com/h5bp/html5-boilerplate/pull/2831) 20 | - Farewell Internet Explorer! [#2773](https://github.com/h5bp/html5-boilerplate/issues/2773) 21 | - Remove apache-server-configs/.htaccess [#2779](https://github.com/h5bp/html5-boilerplate/pull/2779) 22 | - Moving docs out of src and dist [#2655](https://github.com/h5bp/html5-boilerplate/pull/2655) 23 | - Replace Parcel with Webpack [#2641](https://github.com/h5bp/html5-boilerplate/pull/2641) 24 | - Add SVG Favicon [#2554](https://github.com/h5bp/html5-boilerplate/issues/2554) 25 | - Remove Google Analytics [#2547](https://github.com/h5bp/html5-boilerplate/issues/2547) 26 | - Rename master branch to main [#2583](https://github.com/h5bp/html5-boilerplate/issues/2583) 27 | - Remove humans.txt [#2584](https://github.com/h5bp/html5-boilerplate/pull/2584) 28 | - Add a template repository [#2391](https://github.com/h5bp/html5-boilerplate/pull/2391) 29 | - Remove plugins js [#2346](https://github.com/h5bp/html5-boilerplate/pull/2346) 30 | - Rename CSS file [#2342](https://github.com/h5bp/html5-boilerplate/pull/2342) and JS file [#2341](https://github.com/h5bp/html5-boilerplate/pull/2341) 31 | 32 | ## 8.0.0 (June 04, 2020) 33 | 34 | - Add a sample package.json with basic Parcel commands ([#2227](https://github.com/h5bp/html5-boilerplate/pull/2229)), ([231e047](https://github.com/h5bp/html5-boilerplate/commit/231e047d270316b454156dc261e6e04da660e2a2)) 35 | - Add sample Open Graph metadata ([#2235](https://github.com/h5bp/html5-boilerplate/pull/2235)) 36 | - Update Modernizr to 3.11.2 ([84ae9cc](https://github.com/h5bp/html5-boilerplate/commit/84ae9cc91188bea4edb8ec91e2a25a2a7f7837a6)) 37 | - Remove jQuery ([#2225](https://github.com/h5bp/html5-boilerplate/pull/2225)) 38 | - Set anonymizeIp to true in Google Analytics snippet ([#2219](https://github.com/h5bp/html5-boilerplate/pull/2219)) 39 | - Update main.css to 2.1.0 ([#2234](https://github.com/h5bp/html5-boilerplate/pull/2234)) 40 | - Remove Browser Upgrade Prompt ([23c4112](https://github.com/h5bp/html5-boilerplate/commit/23c4112db067262c715ebad861ec892c29c3cdaa)) 41 | - Create new publish action ([#2260](https://github.com/h5bp/html5-boilerplate/pull/2260)), ([#2241](https://github.com/h5bp/html5-boilerplate/pull/2241)) 42 | - Docs updates ([#2251](https://github.com/h5bp/html5-boilerplate/pull/2251)), ([#2253](https://github.com/h5bp/html5-boilerplate/pull/2253)), ([#2245](https://github.com/h5bp/html5-boilerplate/pull/2245)), ([#2220](https://github.com/h5bp/html5-boilerplate/pull/2220)), ([#2263](https://github.com/h5bp/html5-boilerplate/pull/2263)), ([#2262](https://github.com/h5bp/html5-boilerplate/pull/2262)) 43 | 44 | ## 7.3.0 (November 19, 2019) 45 | 46 | - Update Modernizr to 3.8 ([2b2bb45](https://github.com/h5bp/html5-boilerplate/commit/2b2bb453916b4b09a6f0929340290dc2505f7ce9)) 47 | - Update to Gulp 4 ([#2151](https://github.com/h5bp/html5-boilerplate/pull/2151)) 48 | - Update package.json ([#2162](https://github.com/h5bp/html5-boilerplate/pull/#2162)) and enable package-lock.json ([abe2087](https://github.com/h5bp/html5-boilerplate/commit/abe20877fdb569c84aa0a1f8ae12c51c51e41250)),([#2145](https://github.com/h5bp/html5-boilerplate/pull/#2145)) 49 | - Remove redundant rules from .editorconfig ([#2157](https://github.com/h5bp/html5-boilerplate/pull/2157)) 50 | - Small docs maintenance updates ([#2155](https://github.com/h5bp/html5-boilerplate/pull/2155)), ([#2164](https://github.com/h5bp/html5-boilerplate/pull/2164)), ([#2165](https://github.com/h5bp/html5-boilerplate/pull/2165)), ([#2167](https://github.com/h5bp/html5-boilerplate/pull/2167)) & ([#2168](https://github.com/h5bp/html5-boilerplate/pull/2168)) 51 | - Bump lowest supported version of node to 8.x ([#2142](https://github.com/h5bp/html5-boilerplate/pull/2142)) 52 | - Remove .jscsrc config and remove gulp-jscs from package.json ([#2153](https://github.com/h5bp/html5-boilerplate/pull/2153)) 53 | 54 | ## 7.2.0 (June 4, 2019) 55 | 56 | - Remove `defer` from Google Analytics snippet ([#2132](https://github.com/h5bp/html5-boilerplate/pull/2132)) 57 | - Update jQuery to v3.4.1 ([#2126](https://github.com/h5bp/html5-boilerplate/pull/2126)) 58 | - Update Apache Server Configs to 3.2.1 ([#2128](https://github.com/h5bp/html5-boilerplate/pull/2128)) 59 | - Update main.css to v2.0.0 ([#2135](https://github.com/h5bp/html5-boilerplate/pull/2135)) 60 | - Docs updates ([#2122](https://github.com/h5bp/html5-boilerplate/pull/2122)), ([#2125](https://github.com/h5bp/html5-boilerplate/pull/2125)), ([#2134](https://github.com/h5bp/html5-boilerplate/pull/2134)), ([#2137](https://github.com/h5bp/html5-boilerplate/pull/2137)), ([#2138](https://github.com/h5bp/html5-boilerplate/pull/2138)) 61 | 62 | ## 7.1.0 (March 18, 2019) 63 | 64 | - Update Modernizr to 3.7.1 ([#2121](https://github.com/h5bp/html5-boilerplate/pull/2121)) 65 | - Update Analytics docs and snippet ([#2118](https://github.com/h5bp/html5-boilerplate/pull/2118)) 66 | - Minor docs updates ([#2115](https://github.com/h5bp/html5-boilerplate/pull/2115)) 67 | - Minor devdeps updates ([#2114](https://github.com/h5bp/html5-boilerplate/pull/2114)) 68 | - More succinct way of writing the IE conditional statement ([#2113](https://github.com/h5bp/html5-boilerplate/pull/2113)) 69 | 70 | ## 7.0.1 (February 11, 2019) 71 | 72 | - Bumps main.css to current version ([#2112](https://github.com/h5bp/html5-boilerplate/pull/2112)) 73 | 74 | ## 7.0.0 (February 8, 2019) 75 | 76 | - Drop support for IE9/IE10 (usage of these versions is tiny and Microsoft officially ended support back in 2016). ([#2074](https://github.com/h5bp/html5-boilerplate/pull/2074)) 77 | - Move the CSS to a separate repo ([#2066](https://github.com/h5bp/html5-boilerplate/pull/2066)) 78 | - Add theme-color meta tag to index.html ([#2074](https://github.com/h5bp/html5-boilerplate/pull/2074)) 79 | - Add 'install with yarn' steps to README ([#2063](https://github.com/h5bp/html5-boilerplate/pull/2063)) 80 | - Improved Webmanifest ([#2060](https://github.com/h5bp/html5-boilerplate/pull/2060)) 81 | - Upgrade Normalize to 8.0.1 ([#2104](https://github.com/h5bp/html5-boilerplate/pull/2104)) 82 | - Update .htaccess ([#2110](https://github.com/h5bp/html5-boilerplate/pull/2110)) 83 | - Remove instances of `shrink-to-fit=no` ([#2103](https://github.com/h5bp/html5-boilerplate/pull/2103)) 84 | - Removes "display": "standalone" from manifest ([#2096](https://github.com/h5bp/html5-boilerplate/pull/2096)) 85 | - Big Docs update - Fixed links, removed IE9/IE10 specific info, made touch icons section more concise, add details on security.txt and more tidying up ([#2074](https://github.com/h5bp/html5-boilerplate/pull/2031), [#2065](https://github.com/h5bp/html5-boilerplate/pull/2065), [#2062](https://github.com/h5bp/html5-boilerplate/pull/2062)) 86 | 87 | ## 6.1.0 (May 1, 2018) 88 | 89 | - [Update Apache Server Configs to `v3.0.0`.](https://github.com/h5bp/html5-boilerplate/pull/2042) 90 | - Migrate to eslint ([#2037](https://github.com/h5bp/html5-boilerplate/pull/2037)) 91 | - Update to jQuery 3.3.1 ([#2018](https://github.com/h5bp/html5-boilerplate/pull/2018)) 92 | - Update to Modernizr v3.6 and Normalize v8 ([#2028](https://github.com/h5bp/html5-boilerplate/pull/2028)) 93 | - Update Dev Dependencies ([#2032](https://github.com/h5bp/html5-boilerplate/pull/2032)) ([#2017](https://github.com/h5bp/html5-boilerplate/pull/2017)) ([#2010](https://github.com/h5bp/html5-boilerplate/pull/2010)) ([#2009](https://github.com/h5bp/html5-boilerplate/pull/2009)) 94 | - Replace 'node-sri' with 'ssri' ([#2031](https://github.com/h5bp/html5-boilerplate/pull/2031)) 95 | - Add .babelrc and .prettierrc to .gitattributes ([#2030](https://github.com/h5bp/html5-boilerplate/pull/2030)) 96 | - Update .htaccess ([#2003](https://github.com/h5bp/html5-boilerplate/pull/2003)) 97 | - Fixed JSHint errors ([#1994](https://github.com/h5bp/html5-boilerplate/pull/1994)) 98 | - Add CODE_OF_CONDUCT.md ([#2011](https://github.com/h5bp/html5-boilerplate/pull/2011)) 99 | - Update Documentation ([#2029](https://github.com/h5bp/html5-boilerplate/pull/2029)) ([#2015](https://github.com/h5bp/html5-boilerplate/pull/2015)) ([#2007](https://github.com/h5bp/html5-boilerplate/pull/2007)) ([#2006](https://github.com/h5bp/html5-boilerplate/pull/2006)) ([#1996](https://github.com/h5bp/html5-boilerplate/pull/1996)) 100 | 101 | ## 6.0.1 (August 20, 2017) 102 | 103 | - Reverts .visuallyhidden (see [#1985](https://github.com/h5bp/html5-boilerplate/issues/1985)) 104 | 105 | ## 6.0.0 (August 17, 2017) 106 | 107 | - Fix Bug: .visuallyhidden on macOS VO fixes #1985 ([#1989](https://github.com/h5bp/html5-boilerplate/pull/1989)) 108 | - Adds web app manifest file ([#1963](https://github.com/h5bp/html5-boilerplate/pull/1963)) 109 | - Update to jQuery 3.2.1 ([#1942](https://github.com/h5bp/html5-boilerplate/pull/1942)) 110 | - Improve ::selection documentation which became confusing after c7057be ([#1955](https://github.com/h5bp/html5-boilerplate/pull/1955)) 111 | - refactor(html): update browsehappy to https instead of http ([#1952](https://github.com/h5bp/html5-boilerplate/pull/1952)) 112 | - Fix links to CONTRIBUTING.md ([#1951](https://github.com/h5bp/html5-boilerplate/pull/1951)) 113 | - Adds .github folder and contents Fixes ([#1948](https://github.com/h5bp/html5-boilerplate/pull/1948)) 114 | - Modernizr 3, modernizr.config and ([#1940](https://github.com/h5bp/html5-boilerplate/pull/1940)) 115 | - Housekeeping by @coliff (#1968 #1969 #1965 #1964 #1958 #1957 #1956) 116 | - Update .gitattributes for Web Projects ([#1935](https://github.com/h5bp/html5-boilerplate/pull/1935)) 117 | - Add the link for useful .gitignore templates ([#1936](https://github.com/h5bp/html5-boilerplate/pull/1936)) 118 | - Node plumbing updated ([#1925](https://github.com/h5bp/html5-boilerplate/pull/1925)) ([#1928](https://github.com/h5bp/html5-boilerplate/pull/1928)) ([#1931](https://github.com/h5bp/html5-boilerplate/pull/1931)) 119 | - Use es2015 syntax in mocha tests ([#1788](https://github.com/h5bp/html5-boilerplate/pull/1788)) 120 | - Scope :first-letter selector for print styles ([#1904](https://github.com/h5bp/html5-boilerplate/pull/1904)) 121 | - Add SRI Hash for jQuery ([#1904](https://github.com/h5bp/html5-boilerplate/pull/1904)) 122 | - Update .jshintrc ([#1903](https://github.com/h5bp/html5-boilerplate/pull/1903)) 123 | - Improve accessibility with visuallyhidden content ([#1900](https://github.com/h5bp/html5-boilerplate/pull/1900)) 124 | - Tell users that IE 8 and 9 are outdated 125 | ([#1747](https://github.com/h5bp/html5-boilerplate/issues/1747)). 126 | - Removed IE8 Support (upgrades jQuery and normalize.css to latest) 127 | ([#1524](https://github.com/h5bp/html5-boilerplate/issues/1524)). 128 | - Fix print styles for Internet Explorer 11 129 | ([#1799](https://github.com/h5bp/html5-boilerplate/issues/1799)). 130 | - Update doc links to https 131 | ([#1889](https://github.com/h5bp/html5-boilerplate/issues/1889)). 132 | - Delete crossdomain.xml 133 | ([#1881](https://github.com/h5bp/html5-boilerplate/issues/1881)). 134 | - Adds pre-wrap to PRE 135 | ([#1742](https://github.com/h5bp/html5-boilerplate/issues/1742)). 136 | - Change license format to SPDX format 137 | ([#1814](https://github.com/h5bp/html5-boilerplate/pull/1814)). 138 | - Simplify the Google Analytics snippet using `async` & `defer` ([#1660](https://github.com/h5bp/html5-boilerplate/pull/1660#issuecomment-89285678)). 139 | 140 | ## 5.3.0 (January 12, 2016) 141 | 142 | - Update jQuery to `v1.12.0`. 143 | - Fetch `jQuery` from jQuery's CDN instead of Google's 144 | ([#1737](https://github.com/h5bp/html5-boilerplate/issues/1737), 145 | [#1739](https://github.com/h5bp/html5-boilerplate/issues/1739)). 146 | - Change print color for `:first-letter` and `:first-line` 147 | pseudo-elements 148 | ([#1715](https://github.com/h5bp/html5-boilerplate/pull/1715)). 149 | 150 | ## 5.2.0 (May 1, 2015) 151 | 152 | - Update jQuery to `v1.11.3` 153 | ([#1699](https://github.com/h5bp/html5-boilerplate/issues/1699)). 154 | - Deprecate protocol-relative URLs 155 | ([#1694](https://github.com/h5bp/html5-boilerplate/issues/1694)). 156 | - Update high resolution media query 157 | ([#1474](https://github.com/h5bp/html5-boilerplate/issues/1474)). 158 | - Update Apache Server Configs to `v2.14.0`. 159 | 160 | ## 5.1.0 (April 1, 2015) 161 | 162 | - Update Normalize.css to `v3.0.3`. 163 | - Use `https://` in the Google Universal Analytics snippet 164 | ([eee759b](https://github.com/h5bp/html5-boilerplate/commit/eee759bfe175e850bbc8e4ad0682ec4fe4bd05d6)). 165 | - Remove the `visibility: hidden` declaration from `.hidden` 166 | ([#1663](https://github.com/h5bp/html5-boilerplate/issues/1663)). 167 | - Use `<meta http-equiv="x-ua-compatible" content="ie=edge">`<br> 168 | instead of `<meta http-equiv="X-UA-Compatible" content="IE=edge">` 169 | ([#1656](https://github.com/h5bp/html5-boilerplate/issues/1656)). 170 | - Update Apache Server Configs to `v2.13.0`. 171 | 172 | ## 5.0.0 (February 1, 2015) 173 | 174 | - Update to jQuery 1.11.2. 175 | - Update Apache Server Configs to v2.11.0. 176 | - Rename Apple touch icon to `apple-touch-icon.png` and add 177 | `<link>` in `index.html` 178 | ([#1622](https://github.com/h5bp/html5-boilerplate/issues/1622)). 179 | - Add vertical centering for `iframe` 180 | ([#1613](https://github.com/h5bp/html5-boilerplate/issues/1613)). 181 | - Change the outdated browser prompt classname to `browserupgrade` 182 | ([#1608](https://github.com/h5bp/html5-boilerplate/issues/1608)). 183 | - Update to Normalize.css 3.0.2. 184 | ([#1050](https://github.com/h5bp/html5-boilerplate/issues/1050)). 185 | - Update `apple-touch-icon-precomposed.png` and the _"Apple touch 186 | icons"_ related documentation 187 | ([#1599](https://github.com/h5bp/html5-boilerplate/pull/1599)). 188 | - Add pseudo-elements to universal selector in print media query 189 | ([#1585](https://github.com/h5bp/html5-boilerplate/pull/1585)). 190 | - Update to Modernizr 2.8.3. 191 | - Remove need to readjust margins in `404.html` 192 | ([#1567](https://github.com/h5bp/html5-boilerplate/pull/1567)). 193 | - Add `/.editorconfig` file 194 | ([#1561](https://github.com/h5bp/html5-boilerplate/issues/1561), 195 | [#1564](https://github.com/h5bp/html5-boilerplate/issues/1564)). 196 | - Add `auto` to the Google Universal Analytics tracker create method 197 | ([#1562](https://github.com/h5bp/html5-boilerplate/issues/1562)). 198 | - Add `timeline` and `timelineEnd` to the list of `console` methods 199 | ([#1559](https://github.com/h5bp/html5-boilerplate/issues/1559)). 200 | - Add `lang=""` to `<html>` 201 | ([#1542](https://github.com/h5bp/html5-boilerplate/issues/1542)). 202 | - Use `<!doctype html>` instead of `<!DOCTYPE html>` 203 | ([#1522](https://github.com/h5bp/html5-boilerplate/issues/1522)). 204 | - Add `/browserconfig.xml` file and tile images 205 | ([#1481](https://github.com/h5bp/html5-boilerplate/issues/1481)). 206 | - Add `Disallow:` to `robots.txt` 207 | ([#1487](https://github.com/h5bp/html5-boilerplate/issues/1487)). 208 | - Remove default foreground color from form elements 209 | ([#1390](https://github.com/h5bp/html5-boilerplate/issues/1390)). 210 | - Remove default margin from print styles 211 | ([#1477](https://github.com/h5bp/html5-boilerplate/issues/1477)). 212 | - Remove image replacement helper class `.ir` 213 | ([#1472](https://github.com/h5bp/html5-boilerplate/issues/1472), 214 | [#1475](https://github.com/h5bp/html5-boilerplate/issues/1475)). 215 | - Add vertical centering for `svg` 216 | ([#1453](https://github.com/h5bp/html5-boilerplate/issues/1453)). 217 | - Redesign 404 page 218 | ([#1443](https://github.com/h5bp/html5-boilerplate/pull/1443)). 219 | - Remove IE 6/7 hacks from `main.css` 220 | ([#1050](https://github.com/h5bp/html5-boilerplate/issues/1050)). 221 | - Remove IE conditional classes 222 | ([#1187](https://github.com/h5bp/html5-boilerplate/issues/1187), 223 | [#1290](https://github.com/h5bp/html5-boilerplate/issues/1290)). 224 | 225 | ## 4.3.0 (September 10, 2013) 226 | 227 | - Use one `apple-touch-icon` instead of six 228 | ([#1367](https://github.com/h5bp/html5-boilerplate/issues/1367)). 229 | - Move font-related declarations from `body` to `html` 230 | ([#1411](https://github.com/h5bp/html5-boilerplate/issues/1411)). 231 | - Update to Apache Server Configs 1.1.0. 232 | - Add `initial-scale=1` to the viewport `meta` 233 | ([#1398](https://github.com/h5bp/html5-boilerplate/pull/1398)). 234 | - Vertical centering for audio, canvas and video-tags 235 | ([#1326](https://github.com/h5bp/html5-boilerplate/issues/1326)). 236 | - Remove Google Chrome Frame related code 237 | ([#1379](https://github.com/h5bp/html5-boilerplate/pull/1379), 238 | [#1396](https://github.com/h5bp/html5-boilerplate/pull/1396)). 239 | - Update to Google Universal Analytics 240 | ([#1347](https://github.com/h5bp/html5-boilerplate/issues/1347)). 241 | - Update to jQuery 1.10.2. 242 | - Update to Normalize.css 1.1.3. 243 | 244 | ## 4.2.0 (April 8, 2013) 245 | 246 | - Remove Google Analytics protocol check 247 | ([#1319](https://github.com/h5bp/html5-boilerplate/pull/1319)). 248 | - Update to Normalize.css 1.1.1. 249 | - Update Apache configurations to include the latest changes in the 250 | canonical [`.htaccess`](https://github.com/h5bp/server-configs-apache) 251 | file. 252 | - Use a protocol relative URL for the 404 template script. 253 | - Update to jQuery 1.9.1. 254 | 255 | ## 4.1.0 (January 21, 2013) 256 | 257 | - Update to Normalize.css 1.1.0. 258 | - Update to jQuery 1.9.0. 259 | 260 | ## 4.0.3 (January 12, 2013) 261 | 262 | - Use 32x32 favicon.ico 263 | ([#1286](https://github.com/h5bp/html5-boilerplate/pull/1286)). 264 | - Remove named function expression in plugins.js 265 | ([#1280](https://github.com/h5bp/html5-boilerplate/pull/1280)). 266 | - Adjust CSS image-replacement code 267 | ([#1239](https://github.com/h5bp/html5-boilerplate/issues/1239)). 268 | - Update HiDPI example media query 269 | ([#1127](https://github.com/h5bp/html5-boilerplate/issues/1127)). 270 | 271 | ## 4.0.2 (December 9, 2012) 272 | 273 | - Update placeholder icons. 274 | - Update to Normalize.css 1.0.2. 275 | - Update to jQuery 1.8.3. 276 | 277 | ## 4.0.1 (October 20, 2012) 278 | 279 | - Further improvements to `console` method stubbing 280 | ([#1206](https://github.com/h5bp/html5-boilerplate/issues/1206), 281 | [#1229](https://github.com/h5bp/html5-boilerplate/pull/1229)). 282 | - Update to jQuery 1.8.2. 283 | - Update to Modernizr 2.6.2. 284 | - Minor additions to the documentation. 285 | 286 | ## 4.0.0 (August 28, 2012) 287 | 288 | - Improve the Apache compression configuration 289 | ([#1012](https://github.com/h5bp/html5-boilerplate/issues/1012), 290 | [#1173](https://github.com/h5bp/html5-boilerplate/issues/1173)). 291 | - Add a HiDPI example media query 292 | ([#1127](https://github.com/h5bp/html5-boilerplate/issues/1127)). 293 | - Add bundled docs 294 | ([#1154](https://github.com/h5bp/html5-boilerplate/issues/1154)). 295 | - Add MIT license 296 | ([#1139](https://github.com/h5bp/html5-boilerplate/issues/1139)). 297 | - Update to Normalize.css 1.0.1. 298 | - Separate Normalize.css from the rest of the CSS 299 | ([#1160](https://github.com/h5bp/html5-boilerplate/issues/1160)). 300 | - Improve `console.log` protection 301 | ([#1107](https://github.com/h5bp/html5-boilerplate/issues/1107)). 302 | - Replace hot pink text selection color with a neutral color. 303 | - Change image replacement technique 304 | ([#1149](https://github.com/h5bp/html5-boilerplate/issues/1149)). 305 | - Code format and consistency changes 306 | ([#1112](https://github.com/h5bp/html5-boilerplate/issues/1112)). 307 | - Rename CSS file and rename JS files and subdirectories. 308 | - Update to jQuery 1.8 309 | ([#1161](https://github.com/h5bp/html5-boilerplate/issues/1161)). 310 | - Update to Modernizr 2.6.1 311 | ([#1086](https://github.com/h5bp/html5-boilerplate/issues/1086)). 312 | - Remove uncompressed jQuery 313 | ([#1153](https://github.com/h5bp/html5-boilerplate/issues/1153)). 314 | - Remove superfluous inline comments 315 | ([#1150](https://github.com/h5bp/html5-boilerplate/issues/1150)). 316 | 317 | ## 3.0.2 (February 19, 2012) 318 | 319 | - Update to Modernizr 2.5.3. 320 | 321 | ## 3.0.1 (February 08, 2012) 322 | 323 | - Update to Modernizr 2.5.2 (includes html5shiv 3.3). 324 | 325 | ## 3.0.0 (February 06, 2012) 326 | 327 | - Improvements to `.htaccess`. 328 | - Improve 404 design. 329 | - Simplify JS folder structure. 330 | - Change `html` IE class names changed to target ranges rather than 331 | specific versions of IE. 332 | - Update CSS to include latest normalize.css changes and better 333 | typographic defaults 334 | ([#825](https://github.com/h5bp/html5-boilerplate/issues/825)). 335 | - Update to Modernizr 2.5 (includes yepnope 1.5 and html5shiv 3.2). 336 | - Update to jQuery 1.7.1. 337 | - Revert to async snippet for the Google Analytics script. 338 | - Remove the ant build script 339 | ([#826](https://github.com/h5bp/html5-boilerplate/issues/826)). 340 | - Remove Respond.js 341 | ([#816](https://github.com/h5bp/html5-boilerplate/issues/816)). 342 | - Remove the `demo/` directory 343 | ([#808](https://github.com/h5bp/html5-boilerplate/issues/808)). 344 | - Remove the `test/` directory 345 | ([#808](https://github.com/h5bp/html5-boilerplate/issues/808)). 346 | - Remove Google Chrome Frame script for IE6 users; replace with links 347 | to Chrome Frame and options for alternative browsers. 348 | - Remove `initial-scale=1` from the viewport `meta` 349 | ([#824](https://github.com/h5bp/html5-boilerplate/issues/824)). 350 | - Remove `defer` from all scripts to avoid legacy IE bugs. 351 | - Remove explicit Site Speed tracking for Google Analytics. It's now 352 | enabled by default. 353 | 354 | ## 2.0.0 (August 10, 2011) 355 | 356 | - Change starting CSS to be based on normalize.css instead of reset.css 357 | ([#500](https://github.com/h5bp/html5-boilerplate/issues/500)). 358 | - Add Respond.js media query polyfill. 359 | - Add Google Chrome Frame script prompt for IE6 users. 360 | - Simplify the `html` conditional comments for modern browsers and add 361 | an `oldie` class. 362 | - Update clearfix to use "micro clearfix". 363 | - Add placeholder CSS MQs for mobile-first approach. 364 | - Add `textarea { resize: vertical; }` to only allow vertical resizing. 365 | - Add `img { max-width: 100%; }` to the print styles; prevents images 366 | being truncated. 367 | - Add Site Speed tracking for Google Analytics. 368 | - Update to jQuery 1.6.2 (and use minified by default). 369 | - Update to Modernizr 2.0 Complete, Production minified (includes 370 | yepnope, html5shiv, and Respond.js). 371 | - Use `Modernizr.load()` to load the Google Analytics script. 372 | - Much faster build process. 373 | - Add build script options for CSSLint, JSLint, JSHint tools. 374 | - Build script now compresses all images in subfolders. 375 | - Build script now versions files by SHA hash. 376 | - Many `.htaccess` improvements including: disable directory browsing, 377 | improved support for all versions of Apache, more robust and extensive 378 | HTTP compression rules. 379 | - Remove `handheld.css` as it has very poor device support. 380 | - Remove touch-icon `link` elements from the HTML and include improved 381 | touch-icon support. 382 | - Remove the cache-busting query parameters from files references in 383 | the HTML. 384 | - Remove IE6 PNGFix. 385 | 386 | ## 1.0.0 (March 21, 2011) 387 | 388 | - Rewrite build script to make it more customizable and flexible. 389 | - Add a humans.txt. 390 | - Numerous `.htaccess` improvements (including inline documentation). 391 | - Move the alternative server configurations to the H5BP server configs 392 | repo. 393 | - Use a protocol-relative url to reference jQuery and prevent mixed 394 | content warnings. 395 | - Optimize the Google Analytics snippet. 396 | - Use Eric Meyer's recent CSS reset update and the HTML5 Doctor reset. 397 | - More robust `sub`/`sup` CSS styles. 398 | - Add keyboard `.focusable` helper class that extends `.visuallyhidden`. 399 | - Print styles no longer print hash or JavaScript links. 400 | - Add a print reset for IE's proprietary filters. 401 | - Remove IE9-specific conditional class on the `html` element. 402 | - Remove margins from lists within `nav` elements. 403 | - Remove YUI profiling. 404 | --------------------------------------------------------------------------------