HTML5 Boilerplate

网络上最受欢迎的前端模板。(The web’s most popular front-end template.)

Github星跟踪图

HTML5 Boilerplate 是专业的前端模板,用于构建快速,强大和适应性强的Web应用程序或网站。通过100位开发人员的综合知识和努力,启动您的项目,所有这一切都在一个小包中。

这个项目是多年的迭代开发和社区知识的产物。 它不强加具体的开发理念或框架,因此您可以按需要的方式构建您的代码。

HTML5 Boilerplate特征:
  • HTML5已准备好。放心使用新元素。
  • 在设计时考虑到渐进增强。
  • 包括:
    • Normalize.css用于CSS规范化和常见错误修复
    • jQuery通过CDN与SRI哈希和本地后备
    • Modernizr的自定义构建功能检测
    • Apache服务器配置,以提高网站的性能和安全性
  • 占位符CSS媒体查询。
  • 有用的CSS助手类。
  • 默认打印样式,性能优化。
  • Google Universal Analytics片段的优化版本。
  • 防止任何流行的控制台声明导致旧版浏览器中的JavaScript错误。
  • “删除键友好”。很容易去掉你不需要的部分。
  • 广泛的内联和随附的文档。
浏览器支持
  • Chrome(最新2)
  • Edge(最新2)
  • Firefox(最新的2)
  • Internet Explorer 9+
  • Opera (最新2)
  • Safari(最新2)
这并不意味着HTML5 Boilerplate不能在旧版浏览器中使用,只是我们将确保与上述浏览器的兼容性。
如果您需要旧版浏览器支持,您可以使用HTML5 Boilerplate v4(IE 6+,Firefox 3.6+,Safari 4+)或HTML5 Boilerplate v5(IE8 +)。他们不再积极发展。

主要指标

概览
名称与所有者h5bp/html5-boilerplate
主编程语言JavaScript
编程语言HTML (语言数: 2)
平台
许可证MIT License
所有者活动
创建于2010-01-24 18:03:24
推送于2025-05-08 04:46:51
最后一次提交
发布数42
最新版本名称v9.0.1 (发布于 2024-04-16 14:34:47)
第一版名称v0.9 (发布于 2010-08-10 10:01:26)
用户参与
星数56.9k
关注者数2.5k
派生数12.3k
提交数2.6k
已启用问题?
问题数1353
打开的问题数9
拉请求数784
打开的拉请求数6
关闭的拉请求数991
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?

HTML5 Boilerplate

LICENSE
Build Status
devDependency Status
NPM Downloads
github-stars-image

HTML5 Boilerplate is a professional front-end template for building
fast, robust, and adaptable web apps or sites.

This project is the product of years of iterative development and
community knowledge. It does not impose a specific development
philosophy or framework, so you're free to architect your code in the
way that you want.

Quick start

Choose one of the following options:

  • Download the latest stable release from
    html5boilerplate.com. This zip file is a snapshot of the dist folder. On Windows, Mac and from the file manager on Linux unzipping this folder will output to a folder named something like html5-boilerplate_v7.3.0. From the command line will need to create a folder and unzip the contents into that folder.

    mkdir html5-boilerplate
    unzip html5-boilerplate*.zip -d html5-boilerplate
    
  • Clone the git repo — git clone https://github.com/h5bp/html5-boilerplate.git - and checkout the
    tagged release
    you'd like to use. The dist folder represents the latest version of the project for end users.

  • Install with npm: npm install html5-boilerplate or yarn: yarn add html5-boilerplate. The resulting node_modules/html5-boilerplate/dist folder represents the latest version of the project for end users. Depending on what you want to use and how you want to use it, you may have to copy and paste the contents of that folder into your project directory.

Features

  • HTML5 ready. Use the new elements with confidence.
  • Designed with progressive enhancement in mind.
  • Includes:
  • Placeholder CSS Media Queries.
  • Useful CSS helper classes.
  • Default print styles, performance optimized.
  • An optimized version of the Google Universal Analytics snippet.
  • Protection against any stray console statements causing JavaScript
    errors in older browsers.
  • "Delete-key friendly." Easy to strip out parts you don't need.
  • Extensive inline and accompanying documentation.

Browser support

  • Chrome (latest 2)
  • Edge (latest 2)
  • Firefox (latest 2)
  • Internet Explorer 11
  • Opera (latest 2)
  • Safari (latest 2)

This doesn't mean that HTML5 Boilerplate cannot be used in older browsers,
just that we'll ensure compatibility with the ones mentioned above.

If you need legacy browser support you can use HTML5 Boilerplate v6 (IE9/IE10)
or HTML5 Boilerplate v5 (IE 8). They are no longer actively developed.

Documentation

Take a look at the documentation table of contents.
This documentation is bundled with the project which makes it
available for offline reading and provides a useful starting point for
any documentation you want to write about your project.

Contributing

Hundreds of developers have helped to make the HTML5 Boilerplate. Anyone is welcome to contribute,
however, if you decide to get involved, please take a moment to review
the guidelines:

License

The code is available under the MIT license.