HTML/Elements/base
https://www.w3.org/wiki/HTML/Elements/base
HTML/Elements/base
Contents
[hide]
<base>
The <base> element allows authors to specify the document base URL for the purposes of resolving relative URLs, and the name of the default browsing context for the purposes of following hyperlinks. The element does not represent any content beyond this information.
Point
- A base element must have either an href attribute, a target attribute, or both.
- There must be no more than one base element per document.
HTML Attributes
href= valid URL potentially surrounded by spaces
A base element, if it has an href attribute, must come before any other elements in the tree that have attributes defined as taking URLs, except the html element (its manifest attribute isn't affected by base elements). [Example A]
target= valid browsing context name or keyword ( _blank, _self, _parent, or _top)
The value of the target attribute is used as the default when hyperlinks and forms in the Document cause navigation.
See also global attributes.
Examples
Example A
In this example, a <base> element is used to set the document base URL.
The link in the this example would be a link to "http://www.example.com/news/archives.html" [try it]:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>This is an example for the <base> element</title>
<base href="http://www.example.com/news/index.html">
</head>
<body>
<p>Visit the <a href="archives.html">archives</a>.</p>
</body>
</html>

HTML Reference
The HTML5 specification defines the <base> element in 4.2.3 The base element.
HTML/Elements/base的更多相关文章
- WPF ListBox的进阶使用(二)
项目中经常使用需要根据搜索条件查询数据,然后用卡片来展示数据.用卡片展示数据时,界面的宽度发生变化,希望显示的卡片数量也跟随变化.WrapPanel虽然也可以实现这个功能,但是将多余的部分都留在行尾, ...
- GNU Emacs命令速查表
GNU Emacs命令速查表 第一章 Emacs的基本概念 表1-1:Emacs编辑器的主模式 模式 功能 基本模式(fundamental mode) 默认模式,无特殊行为 文本模式(text m ...
- AtCoder Beginner Contest 104
A - Rated for Me Time Limit: 2 sec / Memory Limit: 1024 MB Score : 100100 points Problem Statement A ...
- 【WPF学习】第六十七章 创建自定义面板
前面两个章节分别介绍了两个自定义控件:自定义的ColorPicker和FlipPanel控件.接下来介绍派生自定义面板以及构建自定义绘图控件. 创建自定义面板是一种特殊但较常见的自定义控件开发子集.前 ...
- WPF教程十三:自定义控件进阶可视化状态与自定义Panel
如果你敲了上一篇的代码,经过上一篇各种问题的蹂躏,我相信自定义控件基础部分其实已经了解的七七八八了.那么我们开始进阶,现在这篇讲的才是真正会用到的核心的东西.简化你的代码.给你提供更多的可能,掌握了这 ...
- 封装常用的js(Base.js)——【01】理解库,获取节点,连缀,
封装常用的js(Base.js)——[01]理解库,获取节点,连缀, youjobit07 2014-10-10 15:32:59 前言: 现如今有太多优秀的开源javascript库, ...
- jqeury.base
min.js //前台调用 var $ = function (args) { return new Base(args); } //基础库 function Base(args) { //创建一个数 ...
- google base库中的WaitableEvent
这个类说白了就是对windows event的封装,没有什么特别的,常规做法,等侍另一线程无非就是等侍事件置信waitsingleobject,通知事件无非就是setevent,一看就明白,不就详解, ...
- base库插件---拖动
/** * Created by Administrator on 2014/6/5 0005. Base-drag 基于Base库的拖拽插件 tags为你要拖拽的元素参数, 数组形式传入 */ $( ...
随机推荐
- Python基础四
1. 集合 主要作用: 去重 关系测试, 交集\差集\并集\反向(对称)差集 2. 元组 只读列表,只有count, index 2 个方法 作用:如果一些数据不想被人修改, 可以存成元组,比如身 ...
- PHP PDO的FETCH_NUM、FETCH_BOTH、FETCH_ASSOC
不容易混淆的有:FETCH_CLASS,FETCH_COLUMN,FETCH_OBJ... 数据库的连接准备部分 $dsn = 'mysql:host=127.0.0.1;port=3306;dbna ...
- 《sqoop安装和配置》
参考帖子http://blog.csdn.net/jiedushi/article/details/6663177 http://blog.csdn.net/ww1982_0_0_0/article/ ...
- %u编码
Escape/Unescape加密解码/编码解码,又叫%u编码,从以往经验看编码字符串出现有"u",它是unicode编码,那么Escape编码采用是那一种unicode实现形式呢 ...
- win8环境安装.net3.5
材料:光盘镜像(必须原版镜像) 1,以管理员身份运行CMD 2,打开镜像,找到盘符比如我的是G盘 3, 输入 X代表你的ISO镜像的盘符 dism.exe /online /enable-featur ...
- unity3d编辑器——检视面板部分(一)
最近在学习unity编辑器,so,记录总结一下. 以下介绍了一些简单的unity3d检视面板部分的使用技巧. using UnityEngine; using System.Collections; ...
- Select查询执行顺序
链接:http://blog.jobbole.com/55086/ 很多程序员视 SQL 为洪水猛兽.SQL 是一种为数不多的声明性语言,它的运行方式完全不同于我们所熟知的命令行语言.面向对象的程序语 ...
- 基于NPOI的报表引擎——ExcelReport
前言 其实现在说ExcelReport是报表引擎还为时尚早,但该组件我既然要决心维护下去,这便算是初衷吧! 1.现在,ExcelReport能为你做什么呢? 如果,你有导出数据到Excel的需求,Ex ...
- js 数据类型问题
1. alert(type of 变量名) console.log(type of 变量名); 可以答应数据类型 2.var cost_price=parseFloat(parseFloat($(&q ...
- ChannelPipeline
Netty的ChannelPipeline和ChannelHandler机制类似于Servlet和Filter过滤器,这类拦截器实际上是职责链模式的一种变形,主要是为了方便事件的拦截和用户业务逻辑的定 ...