Showing posts with label html head. Show all posts
Showing posts with label html head. Show all posts

Saturday, July 9, 2022

html head Tag

 

 Head section


head section html


Head section


   The head section is the container of a set of elements that provide metadata for the document. This metadata can specify the title (title element), character set, author, description or keywords of the web page (meta element), a style sheet or relational information (link element) or embedded style declarations (style element), among others. The presence of the title element is mandatory inside the head section of an HTML document. Most metadata are not displayed in the browser (although the title usually appears in the browser's title bar) but it can be useful for the functionality of the page.

Syntax:

 The <head> tag is written as <head></head> with the metadata content enclosed between the start and end tags. The <head> tag is placed between the opening and closing <html> tags. Most HTML pages must have a <title> tag within the <head> tag.


<!doctype html>

<html>

<head>

<title> Page ...</title>

</head>

<body>

Page body...

</body>

</html>


Within the HEAD element, only certain elements are allowed. Information in the HEAD element may include the following elements (arranged alphabetically):


1. Base Element  

The <base> element specifies the base URL and/or target for all relative URLs in a page. It is used either a href or a target attribute present, or both.

 Syntax

<base> is written as <base href="" target="">. It is used either a href attribute or


Example

Specify a default URL and a default target for all links on a page: 

<html>

<head>

<base href="http://google.com/docs/mypage.html" target="_blank">

</head>

<body>

<h1>The base element</h1>

<P>the head section</p>

<p>Notice that we have only specified a relative address.Since we have specified a base URL in head section</p>

<img src="images/about.gif">

</body>

</html>


2. ISINDEX

The ISINDEX element informs the HTML user agent that the document is an index document. As well as reading it, the reader may use a keyword search. The document can be queried with a keyword search by adding a question mark to the end of the document address, followed by a list of keywords separated by plus signs.The URL used for processing queries can be overridden with the HREF attribute. You can also use the PROMPT attribute to change the default prompt supplied by the browser, e.g.

 <ISINDEX HREF="Personal.db" PROMPT="Enter Surname : ">


3. LINK

The LINK element indicates a relationship between the current document and an external LINK The LINK element indicates a relationship between the current document and an external resource. The <link> tag is most often used to link to external style sheets:

 LINK element is empty (does not have a closing tag), but takes the same attributes as the anchor element.

<head>

<title> Linking stylesheet</title>

<link rel="ess stylesheet" href="style.css">

 </head>

The syntax is <link rel=" " href=" ">. The rel attribute specifies the relationship between the document containing the hyperlink and the destination resources. The href attributes specifies the address of the hyperlink.

visit link



mean html tag

dynamic website

advantage-and-disadvantage-internet

how to create table tag in html

advantage-and-disadvantage

HTML Ordered List

HTML insert a background

html anchor tag

html/css customer login form