210401-2
HyperText의 Hyper는 컴퓨터 용어로서 텍스트 등의 정보가 동일 선상에 있는 것이 아니라 다중으로 연결되어 있는 상태를 의미
하이퍼링크(hyper link) - 텍스트에서 다른 텍스트로 건너뛰어 읽을 수 있는 기능
<a href="http://www.naver.com">Visit naver.com!</a>
1.href 어트리뷰트
이동하고자 하는 파일의 위치(경로)를 값으로 받는다.
http://www.mysite.com/index.html
/Users/leeungmo/Desktop/myImage.jpg
C:\users\leeungmo\Desktop\myImage.jpg
/index.html
Relative path./index.html
../dist/index.js
../../dist/index.js
index.html
html/index.html
href 어트리뷰트에 사용 가능한 값은 아래와 같다.
Value Description
여기서 fragment identifier를 이용한 페이지 내부 이동 방법은 다음과 같다
<h2 id="top">Top of page!</h2>
~~~~~
<a href="#top">Go to top</a>
He didn't say any more, but we've always been unusually communicative in a reserved way, and I understood that he meant a great deal more than that. In consequence, I'm inclined to reserve all judgments, a habit that has opened up many curious natures to me and also made me the victim of not a few veteran bores. The abnormal mind is quick to detect and attach itself to this quality when it appears in a normal person, and so it came about that in college I was unjustly accused of being a politician, because I was privy to the secret griefs of wild, unknown men. Most of the confidences were unsought-frequently I have feigned sleep, preoccupation, or a hostile levity when I realized by some unmistakable sign that an intimate revelation was quivering on the horizon; for the intimate revelations of young men, or at least the terms in which they express them, are usually plagiaristic and marred by obvious suppressions. Reserving judgments is a matter of infinite hope. I am still a little afraid of missing something if I forget that, as my father snobbishly suggested, and I snobbishly repeat, a sense of the fundamental decencies is parcelled out unequally at birth.
Go to top2.target 어트리뷰트
링크를 클릭했을 때 윈도우를 어떻게 오픈할 지를 지정
Value Description
<a href="http://www.google.com" target="_blank">Visit google.com!</a>