link tag

김수정·2020년 3월 15일
0

HTML 끝내기

목록 보기
4/10

초창기부터 존재해 온 태그이며, 웹을 가장 웹답게 만드는 요소지요!
웹페이지에 다른 문서 혹은 리소스들을 연결하는 기능을 제공해주는 태그입니다.

<a 
   href="https://velog.io/@susu1991" 
   title="웹개발 블로그"
>
  블로그로 이동하기
</a>

<a href="https://download.mozilla.org/?product=firefox-latest-ssl&os=win64&lang=en-US"
   download="firefox-latest-64bit-installer.exe">
  Download Latest Firefox for Windows (64-bit) (English, US)
</a>

링크의 기능은
첫 째, 다른 문서나 리소스를 연결합니다. 위의 예제처럼 리소스 연결이 다운로드라면 다운로드하는 파일 이름을 download 속성에 넣어 정할 수 있습니다.
둘 째, 문서안에서 일부 영역으로 이동할 수 있습니다. a 태그에는 해시태그를 붙이고 이동하는 특정 영역에는 id값을 부여합니다.

<a 
   href="https://velog.io/@susu1991#javascript" 
   title="웹개발 블로그"
>
  블로그로 이동하기
</a>

<!-- another file -->
<div id="javascript">lorem</div>

셋 째, 이메일로 연결 가능합니다.

<a href="mailto:nowhere@mozilla.org">Send email to nowhere</a>
<a href="mailto:">Send email to nowhere</a> <!-- share -->
<a href="mailto:nowhere@mozilla.org?cc=name2@rapidtables.com&bcc=name3@rapidtables.com&subject=The%20subject%20of%20the%20email&body=The%20body%20of%20the%20email">
  Send mail with cc, bcc, subject and body
</a>

링크태그 예제

profile
정리하는 개발자

0개의 댓글