Skip to content

Commit ec41377

Browse files
that-cisco-guyyangc95SSwiniarskiDusch4593
authored
add favicon html content (#1418)
* add favicon html content * add favicon to tag.md, update verbiage and remove header in favicon.md * add favicon html content * add favicon to tag.md, update verbiage and remove header in favicon.md * fix format issues * bold first mention of favicon as per documentation * replaced quotes to resolve failed test issue * remove small as per instruction Co-authored-by: Christine Yang <72277593+yangc95@users.noreply.github.com> * suggested format and verbiage change * Update content/html/concepts/favicon/favicon.md Co-authored-by: Brandon Dusch <brandondusch@gmail.com> * Update content/html/concepts/favicon/favicon.md Co-authored-by: Brandon Dusch <brandondusch@gmail.com> * Update content/html/concepts/favicon/favicon.md Co-authored-by: Brandon Dusch <brandondusch@gmail.com> * Update content/html/concepts/favicon/favicon.md Co-authored-by: Brandon Dusch <brandondusch@gmail.com> * Update content/html/concepts/favicon/favicon.md Co-authored-by: Brandon Dusch <brandondusch@gmail.com> * Update content/html/concepts/favicon/favicon.md Co-authored-by: Brandon Dusch <brandondusch@gmail.com> * Update content/html/concepts/favicon/favicon.md Co-authored-by: Brandon Dusch <brandondusch@gmail.com> * Update content/html/concepts/favicon/favicon.md Co-authored-by: Brandon Dusch <brandondusch@gmail.com> * Update favicon.md * prettier formatting --------- Co-authored-by: Christine Yang <72277593+yangc95@users.noreply.github.com> Co-authored-by: SSwiniarski <86081858+SSwiniarski@users.noreply.github.com> Co-authored-by: Brandon Dusch <brandondusch@gmail.com>
1 parent adbfdd3 commit ec41377

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
Title: 'Favicon'
3+
Description: 'A favicon is an icon that is displayed in the address bar for a browser and tab title for a website.'
4+
Subjects:
5+
- 'Web Development'
6+
- 'Web Design'
7+
Tags:
8+
- 'Favicon'
9+
- 'Documentation'
10+
- 'Icons'
11+
CatalogContent:
12+
- 'learn-html'
13+
- 'paths/front-end-engineer-career-path'
14+
---
15+
16+
A **favicon** (short for "favorite icon") is an icon that is displayed in the browser's address bar and tab title for a website. It is used to help users quickly identify the website and distinguish it from other tabs or bookmarks.
17+
18+
## Syntax
19+
20+
```pseudo
21+
<head>
22+
<link rel="shortcut icon" type="image/x-icon" href="/path/to/favicon.ico" />
23+
</head>
24+
```
25+
26+
Favicons originate as small images (usually 16 x 16 pixels) that are added to a [`<link>`](https://www.codecademy.com/resources/docs/html/elements/link) element, which is included in the [`<head>`](https://www.codecademy.com/resources/docs/html/elements/head) of the HTML document.
27+
28+
The following attributes are used in the `<link>` element for favicons:
29+
30+
- The `rel` attribute tells the browser that the linked resource is a favicon; setting to `"shortcut icon"` should accommodate most versions of the major browsers.
31+
- The `type` attribute specifies the format of the linked resource (i.e., `"image/x-icon"` for favicons).
32+
- The `href` attribute specifies the [file path](https://www.codecademy.com/resources/docs/general/file-paths) of the favicon file.
33+
34+
> **Note:** The most common file format for favicons are files with the `.ico` extension. However, other image formats may be supported depending on the browser (e.g., `.png`, `.gif`, and `.jpeg`). An `.ico` file can be created using an image editor or online converter tool.
35+
36+
With the favicon file and the `link` element in the HTML, the favicon should be displayed in the browser's tab title for the website.

documentation/tags.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ Events
107107
Exceptions
108108
Expo
109109
Express
110+
Favicon
110111
Files
111112
Finance
112113
Firebase

0 commit comments

Comments
 (0)