A [Anchor, 연결] 태그

작성자 정보

  • 작성자 관리자
  • 작성일

컨텐츠 정보

본문


▷ A [Anchor, 연결] 태그

 ⊙ 태그요소

 ① <a> ... </a>

이동할 링크를 설정하는 태그로, Anchor는 닻을 내린다, 머문다라는 의미를 가지고 있습니다.
같은 문서내의 책갈피나 다른 문서로 이동하는데 이용되는 태그입니다.
영역 내에서 자동 줄바꿈이 없다.

 ⊙ 속성(Atributes)

속성
용도
사용법

href

도메인주소나 웹페이지로 이동

<a href="http://"도메인"> - 도메인 주소로 이동</a>

<a href="http://주소/filename.html"> - 주소내 파일로 이동</a>
<a href="http://주소/filename.html#책갈피> - 파일내 특정위치로 이동</a>
파일 연결

주소/파일명"> - 파일 다운로드</a>

ftp 연결

.서버"> - ftp 서버로 연결</a>

<a href="ftp://id:guest@ftp</a>.서버"> - ftp 서버로 연결</a>
telnet 연결

<a href="telnet://telnet.서버"> - telnet 서버로 연결</a>

news 연결 <a href="news://news.</a>서버"> - news 서버로 연결</a>
<a href="news://id@news.</a>서버"> - news 서버로 연결</a>
gopher 연결 <a href="gopher://gopher.</a>서버주소 - gopher site 로 연결</a>
mail 연결 <a href="mailto:mail_id@mail주소 - mail로 연결</a>

target

새창열어 보여주기

<a href="http://a.com/a.html" target="_blank"></a>

현재창 전체에 보여주기 <a href="http://a.com/a.html"</a> target="_top"></a>
현재창의 부모창에 보여주기 <a href="http://a.com/a.html"</a> target="_parent"></a>
현재창에 보여주기 <a href="http://a.com/a.html"</a> target="_self">

id

style 시트 id 적용변수

<a id="idname" href="http://a.com/a.html">

class

style 시트 class 적용변수

<a class="classname" href="http://a.com/a.html"&ltl/a>"

name

현재 페이지에 책갈피로 지정

<a href="#book">책갈피

onClick

마우스 이벤트 지정

<a href="#" onMouseOver='img_name.src="1.jpg"' onClick='img_name.src="2.jpg"' onMouseOut='img_name.src="3.jpg"'><img src="3.jpg" name="img_name"></a>

OnMouseOver

onMouseOut

 ⊙ 속성(Atributes)의 사용 예

Font color 속성 예제

실행결과

<html>
  <head>
    <title>태그 사용 예</title>
    
  </head>
  <body>
<p align="center">
<a href="
<a href="http://blog.ohmynews.com/dudu" 
target="_blank" 
onMouseOver='img_name.src="1.jpg"' 
onClick='img_name.src="2.jpg"' 
onMouseOut='img_name.src="3.jpg"'>
<img src="3.jpg" name="img_name">
마우스에 따라 그림이 바뀐다.
그림을 클릭하면 링크된 내용이 새창에 표시된다.
</a>

  </body>
</html>
   

관련자료

댓글 0
등록된 댓글이 없습니다.
알림 0