• HOME
  • PROJECTS
  • ABOUT
  • POSTS
  • GAMES
  • HOME
  • PROJECTS
  • ABOUT
  • POSTS
  • GAMES
[HTML] a 태그 대표 이미지

[HTML] a 태그

#HTML#CSS·2023.2.19

<a> 태그는 특정 URL로 연결시켜 주는 하이퍼링크를 만들어주는 태그라고 합니다.


| 속성


1. href


<a> 태그에 필수로 들어가는 속성으로 연결하고 싶은 주소를 작성하면 됩니다.


<a href="https://2yh-develop4jeon.tistory.com">블로그 홈페이지로 이동</a>

<a href="./index.html">해당 파일로 이동</a>


2. target


<a> 태그로 연결된 창이 어떤 식으로 열릴지 설정하는 속성입니다.


<a href="https://2yh-develop4jeon.tistory.com" target="_self">현재 창에서 열림(기본값)</a>

<a href="https://2yh-develop4jeon.tistory.com" target="_blank">새창에서 열림</a>

<a href="https://2yh-develop4jeon.tistory.com" target="_parent">현재 창의 부모창에서열림(없으면 _self와 같음)</a>

<a href="https://2yh-develop4jeon.tistory.com" target="_top">전체 창에서 가장 최상단에서 열림</a>


글이 도움됐나요?
글이 도움됐나요?