+ 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.
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.
+ 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
+ 2
Vasiliki Bakoyanni What does name attribute do?
+ 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"
+ 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"
+ 2
Vasiliki Bakoyanni thanks 😊😊😊
+ 2
Abir Sheikh You are welcome mate 😃 Good luck with HTML
+ 1
Vasiliki Bakoyanni is this attribute important?