ReasonJun

HTML : Favicon / Reset.css 본문

Frontend/HTML

HTML : Favicon / Reset.css

ReasonJun 2023. 6. 5. 13:33
728x90

Favicon

A favicon, short for "favorite icon," is a small icon that represents a website or webpage. It is typically displayed in the browser's address bar, next to the page title, and in browser tabs. Favicon files are generally saved in the ICO (icon) format, but other image formats like PNG can also be used.

 

To add a favicon to an HTML document, you need to include a <link> element in the <head> section of the document. Here's an example:

In this example, the rel attribute is set to "icon" to indicate that the linked resource is a favicon. The href attribute specifies the path to the favicon file, which should be located in the same directory as the HTML file or in a specified location.

 

It's important to note that different browsers may have specific requirements or fallback behaviors for favicons. For example, if a favicon.ico file is not found, some browsers may fall back to searching for other favicon formats, such as PNG or GIF. Additionally, some browsers may automatically resize the favicon to fit their display requirements.

 

Including a favicon in your HTML document helps in branding and recognition, as it provides a visual representation of your website in the browser interface. It also contributes to the overall user experience by making it easier for users to identify and distinguish your website among multiple tabs or bookmarks.

 

  • favicon.ico 64 x 64 (px) or 32 x 32 or 16 x 16
  • favicon.png 500 x 500 (px)

 

Reset.css

'Reset.css' is a CSS file that is commonly used to reset or normalize the default styles and behavior of HTML elements across different web browsers. It is intended to provide a consistent starting point for building web pages by removing or neutralizing browser-specific default styles.

 

To add a favicon to an HTML document, you need to include a <link> element in the <head> section of the document. Here's an example:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/reset-css@5.0.1/reset.min.css" />

 

https://www.jsdelivr.com/package/npm/reset-css 

 

jsDelivr - A free, fast, and reliable CDN for JS and Open Source

Optimized for JS and ESM delivery from npm and GitHub. Works with all web formats. Serving more than 150 billion requests per month.

www.jsdelivr.com

 

728x90
Comments