THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML Head


The HTML <head> Element

HTML metadata is information about the HTML record. Metadata isn't shown in web page.

Metadata commonly characterize archive title, styles, connections, contents, and other meta information.


Omitting <html> and <body>

HTML5, the <html> tag, the <head> tag , and the <body> tag can be omitted.

The following example:

Example

<!DOCTYPE html>
<title>Page Title</title>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>
Try it Yourself »

The <html> component is the report root

<!DOCTYPE html>
<html lang="en-UK">

it is a language is vital for openness applications and hunt engines.

Omitting <html> and <body> can crash gravely composed DOM/XML software.

Finally, precluding <body> can create mistakes in more seasoned programs (IE9).


Omitting <head>

In the HTML5 standard, the <head> tag can likewise be omitted.

&It;head&It; component can be place all component before body elements

example of discarding the &It;head&It;

Example

<!DOCTYPE html>
<html>
<title>Page Title</title>
<body>

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

</body>
</html>
Try it Yourself »
.

The HTML <title> Element

The <title> component are vital for seo.

The <title> component show title of the document.

The <title> component is required in all HTML/XHTML documents.

The <title> element:

  • indecate a title in the program tab
  • Google and yippee take a shot at presentations a title for the page in web search tool results

A rearranged HTML document:

Example

<!DOCTYPE html>
<html>
<title>Page Title</title>

<body>
This is my web page
</body>

</html>
Try it Yourself »

The HTML <style> Element

The <style> component is utilized to characterize style data for a HTML document.

Inside the <style> component you indicate how HTML components should render in a browser:

Example

<style>
body {background-color:#CC927D;}
h1{color:#CC515A}
p {color:#424ECC;}
</style>
Try it Yourself »

The HTML <link> Element

The <link> component is use to connection to style sheets:

The <link> component is the page relationship to an outer resource.

Example

<link rel="stylesheet" href="mystyle.css">
Try it Yourself »

The HTML <meta> Element

The <meta> component is utilized to indicate page depiction, catchphrases, creator, and other metadata.

Metadata is imperative for website page it causes us to program via SEARCH ENGINE(GOOGLE,YAHOO,BING) catchphrase .

Understand watchwords for hunt engines:

<meta name="keywords" content="Android,c++,HTML, JavaScript">

Understand a portrayal of your web page:

<meta name="description" content="Free instructional exercises PROGAMMING">

Understand the character set used:

<meta charset="UTF-8">

Understand the creator of a page:

<meta name="author" content="Hege Refsnes">

Example of <meta> tags:

Example

<meta name="description" content="Free Web tutorials">
<meta name="keywords" content="HTML,CSS,XML,JavaScript">
<meta name="author" content="Hege Refsnes">
<meta charset="UTF-8">

The HTML <script> Element

The <script> component is utilized to characterize customer side JavaScripts.

The content beneath composes Hello JavaScript! into a HTML component with id="demo":

Example

<script>
function myFunction {
    document.getElementById("demo").innerHTML = "Hello JavaScript!";
}
</script>
Try it Yourself »
!

The HTML <base> Element

The <base> component indicates the base URL and base focus for every single relative Url in a page:

Example

<base href="http://www.welookups.com/pictures/" target="_blank">
Try it Yourself »