본문 바로가기

HTML5 tag 기본태그

HTML5 링크 태그

HTML의 링크 태그

HTML 링크는 href 하이퍼 링크입니다
클릭하면 다른 사이트로 이동할때
사용합니다.

<a href="https://www.naver.com/">네이버로 이동</a>


<a href="html_images.asp">HTML Images</a>

---------------------

<style>
a:link {
  color: green; 
  background-color: transparent; 
  text-decoration: none;
}

a:visited {
  color: pink;
  background-color: transparent;
  text-decoration: none;
}

a:hover {
  color: red;
  background-color: transparent;
  text-decoration: underline;
}

a:active {
  color: yellow;
  background-color: transparent;
  text-decoration: underline;
}
</style>

------------------------------

링크 방법입니다


<style>
a:link, a:visited {
  background-color: #f44336;
  color: white;
  padding: 15px 25px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}

a:hover, a:active {
  background-color: red;
}
</style>

----------------------------

링크 페이지를 여는 방법입니다.

가장많이 사용하는 태그는 새창으로 열기인 블랭크와

톱을 많이 사용하죠

  • _blank - 새 창 또는 새탭에서 링크 된 페이지를 엽니 다.
  • _self   -클릭되었을 때 같은 창에서 엽니다. 
  • _parent- 상위 프레임에서 링크 된 문서를 엽니 다
  • _top   - 윈도우의 몸 전체에 링크 된 문서를 엽니 다

<a href="https://www.naver.com/" target="_blank">클릭</a>

텍스트대신 이미지를 사용

<a href="주소.com">
  <img src="이미지.gif" alt="HTML tutorial" style="width:42px;height:42px;border:0;">
</a>

'HTML5 tag 기본태그' 카테고리의 다른 글

html 리스트 목록 태그  (0) 2019.07.11
HTML5 Images 이미지태그  (0) 2019.07.11
html5 색상 태그  (0) 2019.07.10
html5 기본 style 태그  (0) 2019.07.10
html5 기본태그  (0) 2019.07.10