Saturday, 27 December 2014

head tag

21:04 Posted by Unknown No comments

Syntax

<head></head>

Definition and Usage

The <head> tag is a container for all the the tags and meta data that you do not want to show on your browser screen. The following tag can go inside the <head> tag:

<meta>:  The <meta> tag provides metadata(general information) about HTML document.
<title>:    The <title></title>  tag shows the title in title bar of the browser.
<link>:    The <link> tag is used to include other HTML or CSS document.
<style>:   The <style></style> tag is used to write CSS in HTML document.
<script>: The <script></script> tag is used to define a client-side script, like JavaScript.

Try it Yourself


<!DOCTYPE html>
<html>
<head>
     <meta charset="UTF-8">  <!-- Defines charset for html document -->
     <title>This is a title</title>
 <!--     <link rel="stylesheet" type="text/css" href="style.css"> Links external stylesheet -->
     <script type="text/javascript">
            console.log("Hello World");
     </script>
</head>
<body>
      <h1>Hello World!</h1>
</body>
</html>






0 comments:

Post a Comment