#2.4 Tag Attributes

오주형·2022년 6월 23일
0

‣ anchor: 닻. link. 다른 웹사이트로 이동하는 방법. attributes(속성, tag에 부가적인 정보를 추가하는 것)가 필요하다.

‣‣ href: 그 중 하나가 href(HTTP reference or hyperlink reference). 이동할 곳을 알려주는 것이다. attribut href는 anchor tag에만 추가할 수 있다.

<a href="http://google.com"></a>

‣‣ target: self, blank. 링크가 각각 같은 탭, 다른 탭에서 열린다.

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

‣ img: 닫아주는 태그가 없다. self-closing tag. src라는 attribute 사용한다. tag 사이에 content가 없다. img의 attribute src가 img의 content이기 때문이다.

<img src="(이미지 주소)"/>
profile
곧 개발자

0개의 댓글