TIL 01 Preparing for HTML

dory·2021년 3월 7일
0

TIL_html

목록 보기
1/10

<head>
	<title> 탭 상단 이름 </title> 
</head>

Body

 <a href="" target="_blank"> 링크 이름쓰기 </a>
  • href : 링크 주소
  • target="_blank" : 다른 페이지로 링크 열림

Linking to relative page

<a href="./contact.html">Contact</a>
  • ./ = 같은 폴더 안에서 검색하라는 뜻

Linking at Will

<a href="./index.html">Brown Bear</a>
<a href="./index.html"><img src ="" target="_blank"/></a>

Linking to SAME page

1) 같은 페이지 내에서 링크를 걸기 위해선, target에게 id를 부여해야한다.

<p id="top">This is the top of the page!</p>
<h1 id="bottom">This is the bottom! </h1>

2) target link는 #와 id로 연결된다.

<ol>
  <li><a href="#top">Top</a></li>
  <li><a href="#bottom">Bottom</a></li>
</ol>

0개의 댓글