Required | Tag Specific | Core | Focus | Events | Language |
---|---|---|---|---|---|
href | target | id1 | |||
Notes: 1. XHTML only. |
Attribute | Description |
---|---|
href | The href attribute holds the base URL for the document. HTML <base> example using the href attribute. <head>
<title>HTML Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<base href="http://www.littlewebhut.com">
</head> XHTML <base> example using the href attribute. <head>
<title>HTML Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<base href="http://www.littlewebhut.com" />
</head> Note: This is a required attribute. |
target | The target attribute specifies a default target window for the links within the current document. HTML <base> example using the target attribute to open all links in a new tab or window. <head>
<title>HTML Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<base href="http://www.littlewebhut.com" target="_blank">
</head> XHTML <base> example using the target attribute to open all links in a new tab or window. <head>
<title>HTML Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<base href="http://www.littlewebhut.com" target="_blank" />
</head> HTML <base> example that will open all links in an iframe pointed to by the target attribute. <head>
<title>HTML Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<base href="http://www.littlewebhut.com" target="sample1">
</head>
<body>
<p>
Open web page in an iframe by <a href="/html/">clicking here.</a>
<iframe id="sample1" name="sample1" height="50%" width="100%" title="sample"></iframe>
</p>
</body> XHTML <base> example that will open all links in an iframe pointed to by the target attribute. <head>
<title>HTML Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<base href="http://www.littlewebhut.com" target="sample1" />
</head>
<body>
<p>
Open web page in an iframe by <a href="/html/">clicking here.</a>
<iframe id="sample1" name="sample1" height="50%" width="100%" title="sample"></iframe>
</p>
</body> Note: This attribute has been deprecated. |
id | The id attribute assigns a unique name to a tag. This allows style sheets or scripts to reference the tag. See id Example Note: XHTML only. |