What is facicon and How to add a Favicon to a website❓
▪️ Favicon is a small image that appears beside the website name.
▪️ It is known by many names like tab icon, bookmark icon because it is displayed on a browser's tab, bookmark bar etc.
▪️ Most famous & widely used format for favicon is .ico
▪️ It is known by many names like tab icon, bookmark icon because it is displayed on a browser's tab, bookmark bar etc.
▪️ Most famous & widely used format for favicon is .ico
1. How to create a Favicon?
▪️ Any image can work but it should be small & simple with high contrast
▪️ Normally preferred sizes are 16 x 16 and 32 x 32.
▪️ You can also create & download a favicon using these sites →
• favicon.cc
• favicon.io
▪️ Any image can work but it should be small & simple with high contrast
▪️ Normally preferred sizes are 16 x 16 and 32 x 32.
▪️ You can also create & download a favicon using these sites →
• favicon.cc
• favicon.io
2. Adding Favicon to Website
▪️ a favicon is added via <link> tag
▪️ Just add the <link> tag inside <head> with the path to the favicon.
⬇️
▪️ a favicon is added via <link> tag
▪️ Just add the <link> tag inside <head> with the path to the favicon.
⬇️
Forwarded from Learn Python with Python Video Tutorial Python Course Python Note Python Book Python PDF Django Flask Python
Book shared in resources channel
Name: Web Design Playground - HTML and CSS the Interactive Way - Paul McFedries (Manning, 2019)
https://t.me/c/2109572262/888
Name: Web Design Playground - HTML and CSS the Interactive Way - Paul McFedries (Manning, 2019)
https://t.me/c/2109572262/888
What will be the output of the following JavaScript code
Undefined.
This is due to hoisting. The code behaves like this 👇
var a; //the variable got hoisted
console.log(a); // Outputs: undefined
a = 5;
[We know when a declare a variable the initial value is "undefined" until we assign a value]
This is due to hoisting. The code behaves like this 👇
var a; //the variable got hoisted
console.log(a); // Outputs: undefined
a = 5;
[We know when a declare a variable the initial value is "undefined" until we assign a value]
👍1
Forwarded from Learn Python with Python Video Tutorial Python Course Python Note Python Book Python PDF Django Flask Python
Answer: Exception
Solution:
class TV:
pass
creates a new data type called TV.
pass is just a no-operation statement, it doesn't add any data or functionality to the class.
Hence, this data type does not contain any attributes or functionality
obj = TV()
creates a new object named obj, of the data type TV.
obj.price = 200
creates a new variable named
The value of this variable is set to 200.
Finally, we have
print(self.price)
But there is no object named
Hence, we get an Exception stating that there is nothing called
But you'd have seen
It is simply a convention to use
the first parameter of the method.
The first parameter of a method is is the object through which the method was invoked.
Eg.
a = [1,2,3]
then
a.append(5)
is equivalent to
list.append(a, 5)
So here,
The name
conventionally used to refer to the implicit argument passed in methods.
Otherwise, the word
Hence, the code in the question gives an error, because
I hope this helped!
@python_assets
@javascript_resources
Solution:
class TV:
pass
creates a new data type called TV.
pass is just a no-operation statement, it doesn't add any data or functionality to the class.
Hence, this data type does not contain any attributes or functionality
obj = TV()
creates a new object named obj, of the data type TV.
obj.price = 200
creates a new variable named
price, within obj.The value of this variable is set to 200.
Finally, we have
print(self.price)
But there is no object named
self here!Hence, we get an Exception stating that there is nothing called
self.But you'd have seen
self in other programs elsewhere.self is not a keyword or pre-defined variable in Python.It is simply a convention to use
self WITHIN methods to denotethe first parameter of the method.
The first parameter of a method is is the object through which the method was invoked.
Eg.
a = [1,2,3]
then
a.append(5)
is equivalent to
list.append(a, 5)
So here,
a is implicitly passed to the method append.The name
self isconventionally used to refer to the implicit argument passed in methods.
Otherwise, the word
self has no special meaning in Python.Hence, the code in the question gives an error, because
self is not defined before use.I hope this helped!
@python_assets
@javascript_resources
❤4👍2