The <head> element use number of metadata, which have important role for increase website on search engine result.

The following tags explain metadata: <title>, <style>, <meta>, <link>, <script>, and <base>.

<html> and <body> Tag

HTML standard, the <html> tag, the <body> tag, and the <head> tag could be omitted.

Example:-

<!DOCTYPE html>

<html>

<head>
<title>Page Title</title>

</head>

<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>

</html>

<head> Tag

The HTML standard, the <head> tag could also be omitted.

Example:-

<!DOCTYPE html>
<html>
<title>Page Title</title>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>

<title> Tag

The <title> tag defines the title of the document. That defines a title in the browser and displays a title for the page in search engine results.

Example:-

<!DOCTYPE html>
<html>
<title>Page Title</title>
<body>
The content of the document……
</body>
</html>

<style> Tag

The <style> tag is used to define style for an HTML document. Within the <style> tag you identify how HTML tag should render:

Example:-

<style>
body {background-color:yellow;}
p {color:blue;}
</style>

<link> Tag

The <link> tag defines the page connection to an external resource.

Example:-

<link rel=”stylesheet” href=”stylesheet.css”>

<meta> Tag

The <meta> tag is used to identify page description, keywords and other metadata.

Example:-

<meta name=”description” content=”Free Web tutorials”>
<meta name=”author” content=”Hege Refsnes”>
<meta charset=”UTF-8″>

<meta name=”keywords” content=”HTML,CSS,XML,JavaScript”>

<script> Tag

The <script> tag is used to describe client-side JavaScripts.

Example:-

<script>
function anyFunction {
document.getElementById(“testing”).innerHTML = “Hello India!”;
}
</script>

<base> Tag

The <base> tag identifies the base URL:

Example:-

<base href=”http://www.webetutorial.com/ “ target=”_blank”>

Related Article

0 thoughts on “HTML Head”

Leave a Reply