본문 바로가기

Data Scientist

html의 태그

반응형

출처: hackernoon.com

Hyper Text Markup Language

An HTML tag is a special word or letter surrounded by angle brackets, < and >. HTML tags are the hidden keywords within a web page that define how your web browser must format and display the content. Most tags must have two parts, an opening and a closing part.

For example, <html> is the opening tag and </html> is the closing tag. Note that the closing tag has the same text as the opening tag, but has an additional forward-slash ( / ) character in some cases Imagine HTML tag as a house which has a door through which you can enter and come out.

Every content on a web page or browser is embedded inside an HTML tag.

 

♧ 자주 사용하는 html 태그들

<a> : 하이퍼링크를 추가한다. href속성을 사용하여 링크할 url을 지정하며 메일 주소나 페이지 안의 다른 부분도 링크를 걸수 있다. <a href = 'http://www.naver.com'> 

 

<h1>~<h6> : 문장의 제목을 생성한다. 숫자가 낮을수록 상위 레벨을 의미한다.

<p: paragraph> :  단락을 나타낸다. 달리 표시할 요소가 없는 경우에 사용하기를 권장한다.

<br> : 줄바꿈을 나타낸다. 줄을 바꿀 문자의 끝에 <br>를 붙인다. 이 태그는 </br>은 필요없다.

<ul: unordered list> : 번호가 없는 항목 쓰기의 범위를 나타낸다. 항목은 <li: list item>로 지정한다.

<ol: ordered list> : 번호가 붙은 항목 쓰기의 범위를 나타낸다. 항목은 <li>로 지정한다. 

 


<div> & <span>

<div>와 <span>은 여러 개의 문장을 하나의 단위로 묶는 태그이다. 콘텐츠를 묶으면 작성하는 css(Cascading Style Sheets)를 적용할 수 있다. 

<div>: 콘텐츠의 단위를 나타낸다. 요소의 전후에는 줄바꿈이 들어간다(이러한 요소를 '블록요소'라고 한다).

<span>: 콘텐츠의 단위를 나타낸다. 요소의 전후에 줄바꿈이 들어가지 않는다(이러한 요소를 '인라인요소'라고 한다).


<table> 태그

<table>태그는 데이터를 모아서 표로 나타낼 때 사용하는 태그이다. 

<table>태그와 <tr>태그, <td>로 작성한다.

<table> : 표를 작성한다. <table>요소로 둘러싼 부분이 표가 된다.

<tr> : 표에 행을 추가. <tr>요소로 둘러싼 부분이 행이 된다.

<th>: 표에 헤더가 되는 셀을 추가한다. <th>요소로 둘러싼 부분이 셀의 제목이다.

<td>: 표에 셀을 추가. <td>요소로 둘러싼 부분이 셀의 내용이 된다.

<caption>: 표의 타이틀을 나타낸다. 

 

 

 

😁

출처: 

패스트캠퍼스

https://hackernoon.com/html-tags-ppu30h9

 

Basic HTML Tags Classification | Hacker Noon

An HTML tag is a special word or letter surrounded by angle brackets, < and >. HTML tags are the hidden keywords within a web page that define how your web browser must format and display the content. Most tags must have two parts, an opening and a closing

hackernoon.com

 

반응형