Skip to content

Commit bbe9e8a

Browse files
authored
Merge pull request #2074 from h5bp/v7.0
v7.0 Docs Update
2 parents bad98c4 + cfc5f3a commit bbe9e8a

File tree

15 files changed

+125
-292
lines changed

15 files changed

+125
-292
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,15 @@ Choose one of the following options:
5757
* Chrome *(latest 2)*
5858
* Edge *(latest 2)*
5959
* Firefox *(latest 2)*
60-
* Internet Explorer 9+
60+
* Internet Explorer 11
6161
* Opera *(latest 2)*
6262
* Safari *(latest 2)*
6363

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

67-
If you need legacy browser support you
68-
can use [HTML5 Boilerplate v4](https://github.com/h5bp/html5-boilerplate/tree/v4) (IE 6+, Firefox 3.6+, Safari 4+),
69-
or [HTML5 Boilerplate v5](https://github.com/h5bp/html5-boilerplate/tree/v5.0.0) (IE8+). They are no longer actively developed.
67+
If you need legacy browser support you can use [HTML5 Boilerplate v6](https://github.com/h5bp/html5-boilerplate/releases/tag/6.1.0) (IE9/IE10)
68+
or [HTML5 Boilerplate v5](https://github.com/h5bp/html5-boilerplate/releases/tag/5.3.0) (IE 8). They are no longer actively developed.
7069

7170

7271
## Documentation

dist/doc/css.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ process, as well as make the printed pages easier to read.
132132
At printing time, these styles will:
133133

134134
* strip all background colors, change the font color to black, and remove the
135-
`text-shadow` — done in order to [help save printer ink and speed up the
136-
printing process](http://www.sanbeiji.com/archives/953)
135+
`text-shadow` — done in order to help save printer ink and speed up the
136+
printing process
137137
* underline and expand links to include the URL — done in order to allow users
138138
to know where to refer to<br>
139139
(exceptions to this are: the links that are

dist/doc/extend.md

Lines changed: 34 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ not everything fits with everyone's needs.
1818
* [Social Networks](#social-networks)
1919
* [URLs](#urls)
2020
* [Web Apps](#web-apps)
21-
21+
* [security.txt](#security.txt)
2222

2323
## App Stores
2424

2525
### Smart App Banners in iOS 6+ Safari
2626

2727
Stop bothering everyone with gross modals advertising your entry in the
28-
App Store. Including the following [meta tag](https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html) will unobtrusively give the user the option to download your iOS app,or open it with some data about the user's current state on the website.
28+
App Store. Including the following [meta tag](https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html) will unobtrusively give the user the option to download your iOS app, or open it with some data about the user's current state on the website.
2929

3030
```html
3131
<meta name="apple-itunes-app" content="app-id=APP_ID,app-argument=SOME_TEXT">
@@ -214,12 +214,12 @@ $(function(){
214214

215215
## Internet Explorer
216216

217-
### IE Pinned Sites (IE9+)
217+
### IE Pinned Sites
218218

219-
Enabling your application for pinning will allow IE9 users to add it to their
219+
Enabling your application for pinning will allow IE users to add it to their
220220
Windows Taskbar and Start Menu. This comes with a range of new tools that you
221-
can easily configure with the elements below. See more [documentation on IE9
222-
Pinned Sites](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/).
221+
can easily configure with the elements below. See more [documentation on IE
222+
Pinned Sites](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/samples/gg491731(v%3dvs.85)).
223223

224224
### Name the Pinned Site for Windows
225225

@@ -252,7 +252,7 @@ track the number of pinned users, like so:
252252

253253
### Recolor IE's controls manually for a Pinned Site
254254

255-
IE9+ will automatically use the overall color of your Pinned Site's favicon to
255+
IE will automatically use the overall color of your Pinned Site's favicon to
256256
shade its browser buttons. UNLESS you give it another color here. Only use
257257
named colors (`red`) or hex colors (`#ff0000`).
258258

@@ -297,7 +297,7 @@ blog](https://blogs.msdn.microsoft.com/ie/2012/06/08/high-quality-visuals-for-pi
297297

298298
### (Windows 8) Badges for Pinned Sites
299299

300-
IE10 will poll an XML document for badge information to display on your app's
300+
IE will poll an XML document for badge information to display on your app's
301301
tile in the Start screen. The user will be able to receive these badge updates
302302
even when your app isn't actively running. The badge's value can be a number,
303303
or one of a predefined list of glyphs.
@@ -373,7 +373,7 @@ plugin](https://www.google.com/search?ie=UTF-8&q=how+to+make+browser+search+plug
373373
[visibility](https://webmasters.googleblog.com/2009/05/introducing-rich-snippets.html).
374374

375375
* If you're building a web app you may want [native style momentum scrolling in
376-
iOS 5+](http://www.johanbrook.com/articles/native-style-momentum-scrolling-to-arrive-in-ios-5/)
376+
iOS 5+](https://www.johanbrook.com/writings/native-style-momentum-scrolling-to-arrive-in-ios-5/)
377377
using `-webkit-overflow-scrolling: touch`.
378378

379379
* If you want to disable the translation prompt in Chrome or block Google
@@ -460,12 +460,10 @@ registration to Facebook).
460460
### Twitter Cards
461461

462462
Twitter provides a snippet specification that serves a similar purpose to Open
463-
Graph. In fact, Twitter will use Open Graph when Cards is not available. Note
464-
that, as of this writing, Twitter requires that app developers activate Cards
465-
on a per-domain basis. You can read more about the various snippet formats
466-
and application process in the [official Twitter Cards
467-
documentation](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/abouts-cards), and you can validate
468-
your markup with the [Card validator](https://cards-dev.twitter.com/validator)
463+
Graph. In fact, Twitter will use Open Graph when Cards is not available. You
464+
can read more about the various snippet formats and application process in the
465+
[official Twitter Cards documentation](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/abouts-cards),
466+
and you can validate your markup with the [Card validator](https://cards-dev.twitter.com/validator)
469467
(needs registration to Twitter).
470468

471469
```html
@@ -487,7 +485,7 @@ of [schema.org's microdata vocabulary](https://schema.org/), which
487485
covers many other schemas that can describe the content of your pages
488486
to search engines. For this reason, this metadata is more generic for
489487
SEO, notably for Google's search-engine, although this vocabulary is
490-
also used by Microsoft, Pinterest or Yandex.
488+
also used by Microsoft, Pinterest and Yandex.
491489

492490
You can validate your markup with the [Structured Data Testing
493491
Tool](https://developers.google.com/structured-data/testing-tool/).
@@ -518,16 +516,6 @@ the cleaner, more accurate `https://www.example.com/cart.html`.
518516
<link rel="canonical" href="">
519517
```
520518

521-
### Official shortlink
522-
523-
Signal to the world "This is the shortened URL to use this page!" Poorly
524-
supported at this time. Learn more by reading the [article about shortlinks on
525-
the Microformats wiki](http://microformats.org/wiki/rel-shortlink).
526-
527-
```html
528-
<link rel="shortlink" href="h5bp.com">
529-
```
530-
531519
### Separate mobile URLs
532520

533521
If you use separate URLs for desktop and mobile users, you should consider
@@ -579,39 +567,17 @@ on Apple's site.
579567

580568
### Apple Touch Icons
581569

582-
The Apple touch icons can be seen as the favicons of iOS devices.
583-
584-
The main sizes of the Apple touch icons are:
585-
586-
* `57×57px` – iPhone with @1x display and iPod Touch
587-
* `72×72px` – iPad and iPad mini with @1x display running iOS ≤ 6
588-
* `76×76px` – iPad and iPad mini with @1x display running iOS ≥ 7
589-
* `114×114px` – iPhone with @2x display running iOS ≤ 6
590-
* `120×120px` – iPhone with @2x and @3x display running iOS ≥ 7
591-
* `144×144px` – iPad and iPad mini with @2x display running iOS ≤ 6
592-
* `152×152px` – iPad and iPad mini with @2x display running iOS 7
593-
* `180×180px` – iPad and iPad mini with @2x display running iOS 8
594-
595-
Displays meaning:
570+
Apple touch icons are used as icons when a user adds your webapp to the home
571+
screen of aniOS devices.
596572

597-
* @1x - non-Retina
598-
* @2x - Retina
599-
* @3x - Retina HD
600-
601-
More information about the displays of iOS devices can be found
602-
[here](https://en.wikipedia.org/wiki/List_of_iOS_devices#Display).
603-
604-
In most cases, one `180×180px` touch icon named `icon.png`
605-
and including:
573+
Though the dimensions of the icon can vary between iOS devices and versions
574+
one `180×180px` touch icon named `icon.png` and including the following in
575+
the `<head>` of the page is enough:
606576

607577
```html
608578
<link rel="apple-touch-icon" href="icon.png">
609579
```
610580

611-
in the `<head>` of the page is enough. If you use art-direction and/or
612-
want to have different content for each device, you can add more touch
613-
icons as written above.
614-
615581
For a more comprehensive overview, please refer to Mathias' [article on Touch
616582
Icons](https://mathiasbynens.be/notes/touch-icons).
617583

@@ -620,19 +586,14 @@ Icons](https://mathiasbynens.be/notes/touch-icons).
620586

621587
Apart from that it is possible to add start-up screens for web apps on iOS. This
622588
basically works by defining `apple-touch-startup-image` with an according link
623-
to the image. Since iOS devices have different screen resolutions it is
589+
to the image. Since iOS devices have different screen resolutions it maybe
624590
necessary to add media queries to detect which image to load. Here is an
625-
example for a retina iPhone:
591+
example for an iPhone:
626592

627593
```html
628-
<link rel="apple-touch-startup-image" media="(max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)" href="img/startup-retina.png">
594+
<link rel="apple-touch-startup-image" media="(max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)" href="img/startup.png">
629595
```
630596

631-
However, it is possible to detect which start-up image to use with JavaScript.
632-
The Mobile Boilerplate provides a useful function for this. Please see
633-
[helpers.js](https://github.com/h5bp/mobile-boilerplate/blob/v4.1.0/js/helper.js#L336-L383)
634-
for the implementation.
635-
636597

637598
### Chrome Mobile web apps
638599

@@ -665,3 +626,15 @@ The `content` attribute extension can take any valid CSS color.
665626

666627
Currently, the `theme-color` meta extension is supported by [Chrome 39+
667628
for Android Lollipop](https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android).
629+
630+
631+
## security.txt
632+
633+
When security risks in web services are discovered by users they often lack the
634+
channels to disclose them properly. As a result, security issues may be left unreported.
635+
636+
Security.txt defines a standard to help organizations define the process for
637+
users to disclose security vulnerabilities securely. Include a text
638+
file on your server at `.well-known/security.txt` with the relevant contact details.
639+
640+
Check [https://securitytxt.org/](https://securitytxt.org/) for more details.

dist/doc/faq.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,9 @@ reinforces that scripts at the bottom are the right move. (Usually I
3030
concatenate and minify all my scripts into one .js file — the GA snippet being
3131
the suffix.)
3232

33-
### How can I integrate [Bootstrap](https://getbootstrap.com/) with HTML5 Boilerplate?
34-
35-
Here's Nicolas Gallagher writing about how [HTML5 Boilerplate and Bootstrap complement each
36-
other](https://www.quora.com/Is-Bootstrap-a-complement-or-an-alternative-to-HTML5-Boilerplate-or-viceversa/answer/Nicolas-Gallagher).
37-
3833
### Do I need to upgrade my site each time a new version of HTML5 Boilerplate is released?
3934

40-
No, same as you don't normally replace the foundation of a house once it
35+
No, just as you don't normally replace the foundation of a house once it
4136
was built. However, there is nothing stopping you from trying to work in the
4237
latest changes, but you'll have to assess the costs/benefits of doing so.
4338

dist/doc/html.md

Lines changed: 18 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -32,71 +32,12 @@ attribute in the `<html>` as in this example:
3232

3333
### The order of the `<title>` and `<meta>` tags
3434

35-
The order in which the `<title>` and the `<meta>` tags are specified is
36-
important because:
37-
38-
1) the charset declaration (`<meta charset="utf-8">`):
39-
40-
* must be included completely within the [first 1024 bytes of the
41-
document](https://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#charset)
42-
43-
* should be specified as early as possible (before any content that could
44-
be controlled by an attacker, such as a `<title>` element) in order to
45-
avoid a potential [encoding-related security
46-
issue](https://code.google.com/p/doctype-mirror/wiki/ArticleUtf7) in
47-
Internet Explorer
48-
49-
2) the meta tag for compatibility mode
50-
(`<meta http-equiv="x-ua-compatible" content="ie=edge">`):
51-
52-
* [needs to be included before all other tags except for the `<title>` and
53-
the other `<meta>`
54-
tags](https://msdn.microsoft.com/en-us/library/cc288325.aspx)
55-
56-
57-
### `x-ua-compatible`
58-
59-
Internet Explorer 8/9/10 support [document compatibility
60-
modes](https://msdn.microsoft.com/en-us/library/cc288325.aspx) that affect the
61-
way webpages are interpreted and displayed. Because of this, even if your site's
62-
visitor is using, let's say, Internet Explorer 9, it's possible that IE will not
63-
use the latest rendering engine, and instead, decide to render your page using
64-
the Internet Explorer 5.5 rendering engine.
65-
66-
Specifying the `x-ua-compatible` meta tag:
67-
68-
```html
69-
<meta http-equiv="x-ua-compatible" content="ie=edge">
70-
```
71-
72-
or sending the page with the following HTTP response header
73-
74-
```
75-
X-UA-Compatible: IE=edge
76-
```
77-
78-
will force Internet Explorer 8/9/10 to render the webpage in the highest
79-
available mode in [the various cases when it may
80-
not](https://hsivonen.fi/doctype/#ie8), and therefore, ensure that anyone
81-
browsing your site is treated to the best possible user experience that
82-
browser can offer.
83-
84-
If possible, we recommend that you remove the `meta` tag and send only the
85-
HTTP response header as the `meta` tag will not always work if your site is
86-
served on a non-standard port, as Internet Explorer's preference option
87-
`Display intranet sites in Compatibility View` is checked by default.
88-
89-
If you are using Apache as your webserver, including the
90-
[`.htaccess`](https://github.com/h5bp/server-configs-apache) file takes care of
91-
the HTTP header. If you are using a different server, check out our [other
92-
server config](https://github.com/h5bp/server-configs).
93-
94-
Starting with Internet Explorer 11, [document modes are
95-
deprecated](https://msdn.microsoft.com/library/bg182625.aspx#docmode).
96-
If your business still relies on older web apps and services that were
97-
designed for older versions of Internet Explorer, you might want to consider
98-
enabling [Enterprise Mode](https://blogs.msdn.microsoft.com/ie/2014/04/02/stay-up-to-date-with-enterprise-mode-for-internet-explorer-11/) throughout your company.
99-
35+
The charset declaration (`<meta charset="utf-8">`) must be included completely
36+
within the [first 1024 bytes of the document](https://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#charset)
37+
and should be specified as early as possible (before any content that could
38+
be controlled by an attacker, such as a `<title>` element) in order to avoid a
39+
potential [encoding-related security issue](https://code.google.com/archive/p/doctype-mirror/wikis/ArticleUtf7.wiki)
40+
in Internet Explorer
10041

10142
## Meta Description
10243

@@ -108,20 +49,27 @@ shown in the search results.
10849
<meta name="description" content="This is a description">
10950
```
11051

52+
Google's [Create good meta descriptions](https://support.google.com/webmasters/answer/35624?hl=en#meta-descriptions)
53+
documentation has useful tips on creating an effective description.
11154

11255
## Mobile Viewport
11356

11457
There are a few different options that you can use with the [`viewport` meta
11558
tag](https://docs.google.com/present/view?id=dkx3qtm_22dxsrgcf4 "Viewport and
11659
Media Queries - The Complete Idiot's Guide"). You can find out more in [the
117-
Apple developer docs](https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html).
60+
MDN Web Docs](https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag).
11861
HTML5 Boilerplate comes with a simple setup that strikes a good balance for general use cases.
11962

12063
```html
121-
<meta name="viewport" content="width=device-width, initial-scale=1">
64+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
12265
```
12366

67+
If you want to take advantage of edge-to-edge displays of iPhone X/XS/XR you can do
68+
so with additional viewport parameters. [Check the WebKit blog](https://webkit.org/blog/7929/designing-websites-for-iphone-x/)
69+
for details.
70+
12471
## Web App Manifest
72+
12573
HTML5 Boilerplate includes a simple web app manifest file.
12674

12775
The web app manifest is a simple JSON file that allows you to control how your
@@ -156,8 +104,8 @@ web app development.
156104
### Browser Upgrade Prompt
157105

158106
The main content area of the boilerplate includes a prompt to install an up to
159-
date browser for users of IE 8 and lower. If you intended to support IE 8, then you
160-
should remove the snippet of code.
107+
date browser for users of IE 9 and lower. If you intended to support IE, then you
108+
should edit or remove the snippet of code.
161109

162110
## Modernizr
163111

@@ -176,7 +124,7 @@ Starting with version 3 Modernizr can be customized using the [modernizr-config.
176124

177125
If you need to include [polyfills](https://remysharp.com/2010/10/08/what-is-a-polyfill)
178126
in your project, you must make sure those load before any other JavaScript. If you're
179-
using some polyfill CDN service, like [cdn.polyfill.io](https://cdn.polyfill.io/),
127+
using a polyfill CDN service, like [cdn.polyfill.io](https://cdn.polyfill.io/),
180128
just put it before the other scripts in the bottom of the page:
181129

182130
```html

dist/doc/misc.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ the website.
147147

148148
The provided file contains three sections:
149149

150-
* `TEAM` - this is intented to list the group of people responsible for the website
150+
* `TEAM` - this is intended to list the group of people responsible for the website
151151
* `THANKS` - this is intended to list the group of people that have contributed
152-
to the webste
152+
to the website
153153
* `TECHNOLOGY COLOPHON` - the section lists technologies used to make the website
154154

155155
For more information about `humans.txt`, please see: http://humanstxt.org/
@@ -170,4 +170,4 @@ By default, the file points to 2 placeholder tile images:
170170
Notice that IE11 uses the same images when adding a site to the `favorites`.
171171

172172
For more in-depth information about the `browserconfig.xml` file, please
173-
see [MSDN](https://msdn.microsoft.com/library/dn320426.aspx).
173+
see [MSDN](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/dn320426(v=vs.85)).

dist/doc/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ A helpful custom 404 to get you started.
9292
This file contains all settings regarding custom tiles for IE11 and Edge.
9393

9494
For more info on this topic, please refer to
95-
[MSDN](https://msdn.microsoft.com/library/dn455106.aspx).
95+
[Microsoft's Docs](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/dn320426(v=vs.85)).
9696

9797
### .editorconfig
9898

0 commit comments

Comments
 (0)