HTML 사전

base

Base URL

설명

The HTML Base element (<base>) specifies the base URL to use for all relative URLs contained within a document.

기반 요소 (<base>)는 문서가 포함한 모든 상대 URL 주소들의 기준이 될 URL 주소를 정해준다.

참고

  • Support of relative URIs for href was added in Gecko 2.0 (Firefox 4.0)
  • HTML 2.0 and 3.2 define only the href attribute
  • XHTML requires a trailing slash: <base />
  • If multiple <base> elements are specified, only the first href and first target value are used; all others are ignored

참고

  • href을 위한 상대적인 URI의 지원은 Gecko 2.0 (Firefox 4.0)에서 추가 되었다.
  • HTML 2.0, 3.2는 단 href요소를 지정한다.
  • XHTML 끝나는 / 요구한다.: <base />
  • 멀티 <base> 요소가 지정될 경우, 하나의 href와 첫번째 타겟 값은 사용한다.; 다른 모두는 무시된다.

Usage Context

Permitted content Empty; this is a void element.
Tag omission Must have a start tag, and must not have an end tag.
Permitted parent elements <head>
Normative document HTML 5, section 4.2.3HTML 4.01, section 12.4

Usage Context

Permitted content 빈; 이것은 void 엘리먼트 이다.
Tag omission 시작태그는 반스시 가져야 한다, 끝 태그는 가질 필요가 없다.
Permitted parent elements <head>
Normative document HTML 5, section 4.2.3,  HTML 4.01, section 12.4

속성

Like all other HTML elements, this element supports the global attributes.

 

속성

다른 모든 HTML elements 처럼, 이 엘리먼트는 global attributes을 지원한다.

href

The base URL to be used throughout the document for relative URL addresses. If this attribute is specified, this element must come before any other elements with attributes whose values are URLs.
Absolute and relative URIs are allowed (but see note section below).

href

base URL은 상대적인 URL 주소를 위해 문서 내내 사용되어 진다. 이 속성을 지정할 경우, 이 엘리먼트는 속성 전체 값과 함께 다른 어떤 엘리먼트가 URL이 되기 전에 먼저 와야 한다. 절대적, 상대적 URIs은 허락된다. (그러나 아래 note section를 보여라).

target

A name or keyword indicating the default location to display the result when hyperlinks or forms cause navigation, for elements that do not have an explicit target reference. In HTML4, this is the name of, or a keyword for, a frame. In HTML5, it is a name of, or keyword for, a browsing context (for example, tab, window, or inline frame). The following keywords have special meanings:

  • _self: Load the result into the same HTML4 frame (or HTML5 browsing context) as the current one. This value is the default if the attribute is not specified.
  • _blank: Load the result into a new unnamed HTML4 window or HTML5 browsing context.
  • _parent: Load the result into the HTML4 frameset parent of the current frame or HTML5 parent browsing context of the current one. If there is no parent, this option behaves the same way as _self.
  • _top: In HTML4: Load the result into the full, original window, canceling all other frames. In HTML5: Load the result into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as _self.

target

 이름 또는 키워드는 하이퍼 링크 또는 양식 탐색을 일으킬 때 명시적 대상 참조가없는 요소에 결과를 표시하려면 기본 위치를 나타냅니다.  HTML4안에서, 이것은  하나의 프레임의 이름 또는 키워드 이다.  HTML5안에서, 이것은 이름또는 키워드 또는 검색된 맥락(예, tab, window, or inline frame)이다. 따라오는 키워드들은 특별한 의미를 가졌다:

 

  • _self : 현재 문서가 위치한 윈도우에서 페이지가 로드된다.
  • _blank : 탭 브라우징이 지원되는 브라우저에서는 새탭에서 페이지가 로드되고, 그렇지 않을 경우 새 창에서 페이지가 로드된다.
  • _parent : 현재 페이지가 프레임 안에 위치하고 있다면 현재 페이지를 로드 한 부모 페이지에 페이지가 로드된다.
  • _top : 현재 윈도우에 페이지가 로드된다. 만약 현재 페이지가 프레임에의해 로드된 것이라면 모든 프레임을 없애고 현재 윈도우에 페이지가 로드된다.

예제

<base href="http://www.yourdomain.com/">  
<base target="_blank" href="http://www.yourdomain.com/">  

DOM Interface

HTMLBaseElement

호환성

Desktop
기능 구글크롬 파이어폭스Gecko) 인터넷 익스플로러 Opera Safari
기본적인 지원          
Mobile
기능 안드로이드 파이어폭스 모바일(Gecko) 인터넷 익스플로러 모바일 오페라 모바일 사파리 모바일
기본적인 지원          
 

댓글

댓글 본문
  1. Silvester
    href
    The base URL to be used throughout the document for relative URL addresses. If this attribute is specified, this element must come before any other elements with attributes whose values are URLs.
    - base URL은 상대 URL 주소를 위한 문서에 광범위하게 쓰입니다. 만약 이 속성이 명시가 된다면, 이 엘리먼트는 반드시 URL을 값을 속성으로 갖고 있는 다른 엘리먼트들 보다 먼저 와야합니다.
    Absolute and relative URIs are allowed (but see note section below).
    - 절대 혹은 상대 URI들은 허용됩니다. (그러나 아래의 노트 섹션을 보아 주시길 바랍니다.)
  2. Silvester
    1. Like all other HTML elements, this element supports the global attributes.
    1. 다른 모든 HTML 엘리먼트처럼, 이 엘리먼트는 전역 속성을 지원합니다.
  3. Silvester
    1.Support of relative URIs for href was added in Gecko 2.0 (Firefox 4.0)
    2.HTML 2.0 and 3.2 define only the href attribute
    3.XHTML requires a trailing slash: <base>
    4.If multiple <base> elements are specified, only the first href and first target value are used; all others are ignored
    1.href를 위한 상대 URI들의 지원은 Firefox 4.0(즉 Gecko 2.0 부터) 추가되었습니다.
    2.HTML 2.0과 3.2는 href 속성의 정의만을 합니다.
    3.XTML은 뒤에 따라오는 슬래시를 요구합니다 : <base>
    4.만약 여러개의 <base> 엘리먼트를 명시한다면, 첫번째 href와 첫번째 target 값만 사용됩니다. 다른 모든 것들은 무시됩니다.
버전 관리
happydeveloper
현재 버전
선택 버전
graphittie 자세히 보기