Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Metatag attributes – charset

This metatag can be placed anywhere in the head section, except between other tags. For example,
it cannot be placed between the <style> and </style> tags, or between <title> and </title>.

Metatag attributes – name, content

The content attribute is used with the name attribute and contains the value
assigned to the name. This value is in the form of text.

Web page description


To include a suitable description of the web page, the name attribute will
contain ‘description’ and the content will contain an appropriate description,

Keywords for a search engine


The keywords are used by search engines to try and find websites that match
a user’s search string. The more relevant keywords your website contains,
the better the chance of it appearing near the top of the search results. It is
therefore better to have lots of keywords in your metadata, using the sorts of
words or phrases that a user may type into their search engine.
Viewport settings
The viewport is the user’s visible area of the web page. Using the viewport
setting can make a significant difference when using a smaller display size to
view a web page, for example, on a mobile phone or tablet. There are two content
parts to the viewport, the first is the width, which should normally be set to the
width of the device, and the second part is the initial scaling for the web page,
which would usually be set to 1.0.

Set a default target window


If you have a web page with several hyperlinks that require the same type of action
(same target window/tab or a new window/tab) you can make this the default
setting for the page. To complete the task, you must set the web page so that
any hyperlink from the page will open in a new window or tab. The default
settings for this are also in the head section and are added using the <base> tag.

You might also like