+ 2

Someone, please explain <meta> tag and it's attributes with attributes's value.

I'm learning HTML. But sololearn didn't introduce us with <meta> tag. Please explain it's importance , attributes, attributes's value, & what each value exactly do. I've searched it in Google, Sololearn, W3schools but didn't understand well. So, please explain it.

15th Jul 2020, 4:30 PM
Abir Sheikh
Abir Sheikh - avatar
8 Antworten
+ 5
<meta> tag contains information about your document and more specifically content that is not visible to the user. It is not necessary but in case you decide to use it, you should place it inside the <head> tag. In html5, "charset" is probably the most important attribute, informing the browser about the encoding of the characters used in the document. Usually, you have <meta charset = "utf-8">. Another common use is <meta name = "viewport content = "width = device-width, initial-scale = 1.0">. It sets the width of the page to match that of the device' s screen and sets the initial zoom when the page is loaded.
15th Jul 2020, 5:01 PM
Vasiliki B.
Vasiliki B. - avatar
+ 4
Let me explain in more detail. This attribute contains hidden information that cannot be inserted in an http header. Some of the values we can assign to "name" are the following: - description: a short description included in content attribute about your document. Some search engines make use of it. - keywords: a list of keywords, separated by "," included in content attribute so that you can sort your documents - author: states the author of the page in the content attribute - copyright: the copyrights owned by the author stated by the content attribute
18th Jul 2020, 10:08 AM
Vasiliki B.
Vasiliki B. - avatar
+ 2
Vasiliki Bakoyanni What does name attribute do?
16th Jul 2020, 12:33 AM
Abir Sheikh
Abir Sheikh - avatar
+ 2
Sorry for delay. Well, it is the name of your metadata. Most of the times, you will have a pair of the attributes "name" and "content"
17th Jul 2020, 7:45 PM
Vasiliki B.
Vasiliki B. - avatar
+ 2
It is not an attribute of much importance, as some search engines ignore the values of content. For example Google ignores the values of the attribute name = "keywords"
18th Jul 2020, 10:11 AM
Vasiliki B.
Vasiliki B. - avatar
+ 2
Vasiliki Bakoyanni thanks 😊😊😊
18th Jul 2020, 11:50 AM
Abir Sheikh
Abir Sheikh - avatar
+ 2
Abir Sheikh You are welcome mate 😃 Good luck with HTML
18th Jul 2020, 12:25 PM
Vasiliki B.
Vasiliki B. - avatar
+ 1
Vasiliki Bakoyanni is this attribute important?
18th Jul 2020, 6:51 AM
Abir Sheikh
Abir Sheikh - avatar