Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
9 views16 pages

Chapter 5

Chapter 6 covers HTML tags, focusing on the <head> element which contains metadata about the document, including the <title>, <style>, <link>, <meta>, and <script> elements. The <title> element is essential for defining the document's title, while <meta> tags provide important information for search engines. Additionally, examples illustrate the usage of these tags in HTML documents.

Uploaded by

lutfullah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views16 pages

Chapter 5

Chapter 6 covers HTML tags, focusing on the <head> element which contains metadata about the document, including the <title>, <style>, <link>, <meta>, and <script> elements. The <title> element is essential for defining the document's title, while <meta> tags provide important information for search engines. Additionally, examples illustrate the usage of these tags in HTML documents.

Uploaded by

lutfullah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Chapter 6

HTML TAGS
Title and Contents
• Head Tag Elements
HTML HEAD
• the <head> element is a container for metadata (data about
data) and is placed between the <html> tag and the <body>
tag.
• HTML metadata is data about the HTML document. Metadata
is not displayed.
• Metadata typically define the document title, character set,
styles, scripts, and other meta information.
• The following tags describe metadata: <title> , <style> ,
<meta> , <link> and <script>.
THE HTML <TITLE> ELEMENT
• The <title> element defines the title of the document, and is
required in all HTML documents.
• The <title> element:
• defines a title in the browser tab
• displays a title for the page in search engine results
EXAMPLE
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
The content of the document......
</body>
</html>
THE HTML <STYLE> ELEMENT
• The <style> element is used to define style information for a
single HTML page:
<style>
body {background-color: powderblue;}
h1 {color: red;}
p {color: blue;}
</style>
THE HTML <LINK> ELEMENT
• The <link> element is used to link to external style sheets:
<link rel="stylesheet" href="mystyle.css">
THE HTML <META> ELEMENT
• Meta tags provide information about the webpage in the
HTML document. This information is called "metadata" and
while it is not displayed on the page itself, it can be read by
search engines.
• Search engines such as Google use metadata from meta tags
to understand additional information about the webpage.
They can use this information for ranking purposes, to display
snippets in search results.
THE HTML <META> ELEMENT
• The <meta> element is used to specify which character set is
used, page description, keywords, author, and other
metadata.
• Define the character set used:
<meta charset="UTF-8">
THE HTML <META> ELEMENT
• Define a description of your web page:
<meta name="description" content="Free Web tutorials">
• Define keywords for search engines:
<meta name="keywords" content="HTML, CSS, XML, JavaScript">
THE HTML <META> ELEMENT
• Define the author of a page:
<meta name="author" content=“Ahmad">
• Refresh document every 30 seconds:
<meta http-equiv="refresh" content="30">
EXAMPLE

<meta charset="UTF-8">
<meta name="description" content="Free Web tutorials">
<meta name="keywords" content="HTML,CSS,XML,JavaScript">
<meta name="author" content="John Doe">
THE HTML <SCRIPT> ELEMENT
• The <script> element is used to define client-side JavaScripts.
• The following JavaScript writes "Hello JavaScript!" into an HTML
element with id="demo":
<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Hello JavaScript!";
}
</script>
THE HTML <BASE> ELEMENT
• The <base> element specifies the base URL and/or target for
all relative URLs in a page.
• There can only be one single <base> element in a document!
EXAMPLE
<!DOCTYPE html>
<html>
<head>
<title>Rana</title>
<base target="_blank">
</head>
<body>
<a href="ol2.html">Second Page</a>
</body>
</html>
THANK YOU.
Any Questions?

You might also like