Meta Tags For Html
The role of Meta Tags: They are the basic tags that provide information about the site to Web Page Browsers and Search Engines. It is located between the <HEAD> tags.
Example code layout.
<head>
<meta charset="UTF-8">
<meta name="description" content="Coding source free">
<meta name="author" content="Coder">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
Meanings and sample codes.
author:
It allows to specify the contact information about the Website Creator.
<meta name="Author" content="Your Name, E-Mail Address">
abstract:
It provides a brief summary of the entire page.
<meta name="Abstract" content="Site summary">
Language:
The tag that specifies your site's default Text language.
<meta http-equiv="content-language" content="en">
content-type:
It makes the Turkish characters on your page appear properly.
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859">
Indicates the character set is specified as UTF-8.
<meta http-equiv="content-type" content="text/html charset=utf-8" />
Copyright:
It is a label that provides information about the copyrights of the website.
<meta name="Copyright" content="copyright sentence">
Description:
We should give more detailed information about the content of the web page. In this way, the visitor will understand and visit without hesitation that what he is looking for is on our page:
<meta name="description" content="All about web programming tutorials" />
keywords:
Specifies comma-separated keywords to describe the content of the web page.
<meta name="keywords" content="html,php,css,Jquery,lessons,notes" />
publisher:
It allows to specify the name and version of the application that publishes the web page.
<meta name="publisher" content="VS 2023" />
reply to:
It allows specifying an e-mail address about the web page.
<meta name="reply-to" content="Email" />
revisit after:
Tag that tells search engines how many days the website is updated
<meta name="revisit-after" content="10" /> <meta name="revisit-after" content="10 days" />
refresh:
It ensures that a specified URL address is loaded after the specified time. If the URL address is not specified, the current page address is reloaded.
The example below shows a web page reloading every 90 seconds.
<meta name="refresh" content="90" />
The example below shows codingsource.net loading 90 seconds after the page is loaded.
<meta name="refresh" content="90;http://www.codingsource.net" />
robots:
It is the tag that indicates whether the search engine robots will follow the links within the site. The content property can take the following values. Multiple values can be specified, separated by commas.
- index : Indicates that the page should be indexed.
- follow : Indicates following links/links within the page.
- archive : Informs the creation of a screenshot of the page for preview.
- noindex : Prevents the page from being indexed.
- nofollow : Prevents links/links within the page from being followed.
- noarchive : Prevents the creation of a screenshot of the page for preview. If it was created before, it will be deleted. (Deletion of the preview may differ by search engines.)
- all : Applies all positive declarations. Search engines may also accept notifications other than index, follow and archive notifications. So check the search engine's help/support page.
- none : Informs that the page is ignored.
- noodp : If the page is registered in the DMOZ directory, it allows the page's own description to be used instead of the description in the DMOZ directory in the search results. This value is especially true for MSNBOT (live.com). A search engine robot can index a page, follow links on the page, and preview the page, unless stated otherwise. Therefore, the use of all, index, follow and archive values with the robots property has no special meaning. Instead of these, it would be more accurate to use none, noindex, nofollow and noarchive values for the purpose of blocking the robot only.
The following example shows the implementation of index, follow, and archive values.
<meta name="robots" content="all" />
The example below shows the search engine not to index the page, but to follow the linker on the page.
<meta name="robots" content="noindex, follow" />
The example below shows the search engine to index the page, but not to follow the linker on the page and not to generate a preview of the page.
<meta name="robots" content="index, nofollow, noarchive" />
Viewport;
<meta name="viewport" content="width=device-width, initial-scale=1.0">
The width=device-width part sets the width of the page to follow the screen-width of the device (which will vary depending on the device).
The initial-scale=1.0 part sets the initial zoom level when the page is first loaded by the browser.