Skip to content

add favicon html content #1418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Jan 30, 2023
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
93b43a7
add favicon html content
that-cisco-guy Jan 2, 2023
6372fb3
add favicon to tag.md, update verbiage and remove header in favicon.md
that-cisco-guy Jan 3, 2023
a6ddb29
Merge branch 'Codecademy:main' into anderson_html_contribution
that-cisco-guy Jan 3, 2023
fc7b5d1
add favicon html content
that-cisco-guy Jan 2, 2023
69b4a7b
add favicon to tag.md, update verbiage and remove header in favicon.md
that-cisco-guy Jan 3, 2023
6b860ba
fix format issues
that-cisco-guy Jan 3, 2023
cd76da4
bold first mention of favicon as per documentation
that-cisco-guy Jan 3, 2023
980a003
Merge branch 'Codecademy:main' into anderson_html_contribution
that-cisco-guy Jan 3, 2023
e310e9d
resolve merge conflicts
that-cisco-guy Jan 3, 2023
a8d4967
replaced quotes to resolve failed test issue
that-cisco-guy Jan 3, 2023
2ffed08
Merge branch 'main' into anderson_html_contribution
that-cisco-guy Jan 3, 2023
796dd07
remove small as per instruction
that-cisco-guy Jan 4, 2023
87875c2
Merge branch 'Codecademy:main' into anderson_html_contribution
that-cisco-guy Jan 4, 2023
2964f20
Merge branch 'Codecademy:main' into anderson_html_contribution
that-cisco-guy Jan 4, 2023
73eeb58
suggested format and verbiage change
that-cisco-guy Jan 4, 2023
9ff1c03
Merge branch 'Codecademy:main' into anderson_html_contribution
that-cisco-guy Jan 5, 2023
3c21513
Merge branch 'main' into anderson_html_contribution
SSwiniarski Jan 7, 2023
39969d7
Update content/html/concepts/favicon/favicon.md
SSwiniarski Jan 30, 2023
de305ea
Update content/html/concepts/favicon/favicon.md
SSwiniarski Jan 30, 2023
ae5f254
Update content/html/concepts/favicon/favicon.md
SSwiniarski Jan 30, 2023
afb801a
Update content/html/concepts/favicon/favicon.md
SSwiniarski Jan 30, 2023
5738ae8
Update content/html/concepts/favicon/favicon.md
SSwiniarski Jan 30, 2023
16d0b6b
Update content/html/concepts/favicon/favicon.md
SSwiniarski Jan 30, 2023
6b8c961
Update content/html/concepts/favicon/favicon.md
SSwiniarski Jan 30, 2023
e863768
Update content/html/concepts/favicon/favicon.md
SSwiniarski Jan 30, 2023
a5101c6
Update favicon.md
SSwiniarski Jan 30, 2023
cafe7c1
Merge branch 'main' into anderson_html_contribution
SSwiniarski Jan 30, 2023
96b5b3a
prettier formatting
SSwiniarski Jan 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions content/html/concepts/favicon/favicon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
Title: 'Favicon'
Description: 'A favicon is an icon that is displayed in the address bar for a browser and tab title for a website.'
Subjects:
- 'Web Development'
- 'Web Design'
Tags:
- 'Favicon'
- 'Documentation'
- 'Icons'
CatalogContent:
- 'learn-html'
- 'paths/front-end-engineer-career-path'
---

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.

## Syntax

```pseudo
<head>
<link rel="shortcut icon" type="image/x-icon" href="/path/to/favicon.ico" />
</head>
```

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.

The following attributes are used in the `<link>` element for favicons:

- 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.
- The `type` attribute specifies the format of the linked resource (i.e., `"image/x-icon"` for favicons).
- The `href` attribute specifies the [file path](https://www.codecademy.com/resources/docs/general/file-paths) of the favicon file.

> **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.
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.
1 change: 1 addition & 0 deletions documentation/tags.md
Original file line number Diff line number Diff line change
@@ -107,6 +107,7 @@ Events
Exceptions
Expo
Express
Favicon
Files
Finance
Firebase