Favicon and HTML Entities


What is Favicon in HTML?

  • A favicon is an image displayed before the title of web page.

  • <link> tag with attribute rel="icon" is used to add a favicon on the web page.


HTML Favicon Syntax

<link rel="icon" type="image/x-icon" href="./favicon.ico">


HTML Favicon Syntax Examples

<!DOCTYPE html>
<html>
<head>
    <title> Geeks Help </title>
    <link rel="icon" type="image/x-icon" href="./favicon.ico">
</head>
<body>
    <!-- Body Content Goes Here -->
</body>
</html>


What is HTML Entities?

  • HTM Entities are used to display reserved characters on web page.

  • HTML entities start with (&) and end with a semicolon (;).


HTML Entities list

Entity Name

Description

Result

&amp;

ampersand

&

&lt;

less than

<

&gt;

greater than

>

&nbsp;

non-breaking space

 

&pound;

pound

£

&copy;

copyright

©

&reg;

registered trademark

®

&cent;

cent

¢

&apos;

single quotation mark (apostrophe)

'

&yen;

yen

¥

&euro;

euro

&asymp;

almost equal to

&quot;

double quotation mark

"

&trade;

Trademark symbol

&deg;

Degree symbol

°

&raque;

Right angle quotation mark

»

&laquo;

Left angle quotation mark

«

&frac12;

One-half fraction

½

&sect;

Section sign

§

&ndash;

En dash

Code Described in the video

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> Favicon and HTML Entities </title>
    <link rel="shortcut icon" href="./assets/geekhelpIcon.png" type="image/x-icon">
</head>
<body>
    <!-- HTML Entities -->
    &lt;p&gt;
    &copy;
    &amp;
    &pound;
    &apos;
</body>
</html>

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

Top Post Ad

Below Post Ad