WEB DEVELOPMENT NOTES
LECTURE#4:
1. <head>
2.<meta>
The meta data element represents various kinds of metadata (data about
some data or information about some information) that cannot be
expressed using the title , base, link, style, and script elements.
Mainly used in SEO (it is the way to increase web traffic). Metatags helps
Google, Bing or other web engines to display your website.
Different types of Meta Tags:
I. <meta charset = “UTF-8”>
This attribute declares the page character encoding. It must contain a
standard IANA MIME name for the characters encodings.
Although the standard doesn’t request a specific encoding, it suggests:
Authors are encouraged to use UTF-8.
Authors should not use ASCII-incompatible.
II. <meta name>
This attribute defines the name of a piece of document-level metadata. It
should not be set if one of the attributes itemprop, http-equiv or charset is
also set.
This metadata name is associated with the value contained by
the content attribute. The possible values for the name attribute are:
application-name which defines the name of the application running
in the web page.
Note:
o Browsers may use this to identify the application. It is different
from the <title> element, which usually contain the
application name, but may also contain information like the
document name or a status.
o Simple web pages shouldn't define an application-name.
author which defines the name of the document's author.
description which contains a short and accurate summary of the
content of the page. Several browsers, like Firefox and Opera, use
this as the default description of bookmarked pages.
III. <meta name="viewport" content="width=device-width, initial-
scale=1.0">
This meta tag encourages the responsive design. So that your page looks
good in laptops, phones, or in different sizes of screens.
IV. <meta edge>
It is for the IE users. “ie=edge” means, the content should be displayed in
highest compatibility mode.
V. <meta name=”description”>
It contains the description of the page.
VI. <meta name=”keyword”>
It will display your webpage when people searches for the keywords
you’ve added in its content.
V. < meta name=”robots”>
It decides that the search engines index or does not index your content.