Hello, world!

Header HTML

HTML Header demonstrates some tags in the HTML tutorial such as the base tag, meta tag, style tag, link tag, and the script tag.



HTML Header

The HTML Head Element <head> provides notable items about the HTML document known as the metadata.
The <head> tag holds different tags such as <title>, <link>, <meta>, etc.
This data includes its document title, styles, links, scripts, and other meta information.

HTML Title Element

The HTML <title> tag is used to indicate the HTML document title, which is mandatory in all HTML/XHTML documents.

HTML code example title element

<p>The text in the body element is showed in the browser window.</p>

HTML output title element:

The text in the body element is showed in the browser window.



The HTML <base> Tag

The HTML <base> tag defines the base URL and base for all relative hyper links in the body of the document.
This attribute has no ending tag and only one base element may appear in the header.

HTML code example html <base> Tag:

<!DOCTYPE html>
<html>
<head>
<title>How to create HTML Base Tag </title>
<base href="http://html-tutorial.eu/" />
</head>
<body>
 
<img src="http://html-tutorial.eu/images1/LoggaNYPE3.png" alt="Logo Image"/>
<a href="http://html-tutorial.eu/" title="HTML Base Tag"/>HTML Base Tag</a>
 
</body>
</html>

The HTML <meta> Tag

The <META> element allows you to set detailed metadata regarding the web page
It provides information such as the page expiry, page author, list of keywords, page description and other metadata to users and search engines.

HTML code example html <meta> Tag:

<!DOCTYPE html>
<html>
<head>
<title>How to create HTML Meta Tag</title>
 
<!-- Specifies the list of keywords -->
<meta name="keywords" content="C, C++, Java, PHP, Perl, Python">
 
<!-- Specifies the description of the page -->
<meta name="description" content="How to create HTML Meta Tag">
 
<!-- Specifies the Author information -->
<meta name="author" content="HTML Meta tag">
 
<!-- Specifies the Page content type -->
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
 
<!-- Specifies the Page refreshing delay -->
<meta http-equiv="refresh" content="40">
 
<!-- Specifies the Page expiry -->
<meta http-equiv="expires" content="Wed, 20 May 2015 12:25:27 GMT">

</head>
<body>
<p>HTML Meta tag</p>
</body>
</html>

HTML output html <meta> Tag:

How to create HTML Meta Tag

HTML Meta tag



The HTML <style> Tag

The HTML <style> tag is used to identify a style information in the HTML document.
You can indicate the appeanace of HTML elements in a browser within the <style> element.

HTML code example html <style> Tag:

<!DOCTYPE html>
<html>
<head>
<title>How use HTML style Tag </title>
<base href="http://html-tutorial.eu/" />
<style type="text/css">
.myclass{
   background-color: #aab;
   padding: 20px;
}
</style>
</head>
<body>
<p class="myclass">HTML style Tag</p>
</body>
</html>

HTML output html <style> Tag:

How use HTML style Tag

HTML style Tag



The HTML <link> Tag

The HTML <link> tag is applied to set page relationships of external resource with the current document.
Frequently, the <link> element is applied to link to style sheets.

HTML code example html <link> Tag:

<!DOCTYPE html>
<html>
<head>
<title>How to use HTML link Tag </title>
<base href="http://html-tutorial.eu/" />
<link rel="stylesheet" type="text/css" href="/css/style.css">
</head>
<body>
<p>HTML link Tag</p>
</body>
</html>

HTML output html <link> Tag:

How to use HTML link Tag

HTML link Tag



The HTML <script> Tag

The HTML <script> tag is applied to insert script in theheader of an HTML document.
It is also applied to specify client-side JavaScripts.

HTML code example html <script> Tag:

<!DOCTYPE html>
<html>
<head>
<title>How to use HTML script Tag</title>
<base href="http://html-tutorial.eu/" />
<script type="text/javascript">
function script_tag(){
   alert("HTML Script Tag");
}
</script>
</head>
<body>
<input type="button" onclick="script_tag();" name="click" value="Click"  />
</body>
</html>

HTML output html <script> Tag:

How to use HTML script Tag