Web Front-end/html & css

a태그 연관 속성 target

develop_study 2022. 1. 19. 10:37
반응형

사용 예 ) 

<a href="https://www.google.com" target="_self">

 

_self: URL을 현재 페이지에 로드함. <기본 값>
_blank: 새 창을 열어 URL을 페이지에 로드함. 
_parent: 현재 URL의 부모페이지 에 URL을 로드함. 상위 항목이 없는 경우 _self와 동일한 방식으로 동작함.

_top: URL을 최상위 페이지로 로드함. 상위 항목이 없는 경우 _self와 동일한 방식으로 동작함.

(즉, 더 이상의 parent 페이지가 존재하지 않는 "가장 최상위" 페이지)

 

 

  • _self: Load the URL into the same browsing context as the current one. This is the default behavior.
  • _blank: Load the URL into a new browsing context. This is usually a tab, but users can configure browsers to use new windows instead.
  • _parent: Load the URL into the parent browsing context of the current one. If there is no parent, this behaves the same way as _self.
  • _top: Load the URL into the top-level browsing context (that is, the "highest" browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this behaves the same way as _self.
반응형