[๊ตฌ๋์์นด๋ฐ๋ฏธ IT๊ตญ๋น์ง์] ๋ณธ๊ฒฉ์ ์ผ๋ก html์ ์ด์ฉํ์ฌ ํ์ด์ง๋ฅผ ๋ง๋๋ ๋ฐฉ๋ฒ์ ๋ฐฐ์ฐ๊ณ , ๋ค์ํ ๊ธฐ๋ฅ์ ํ์ด์ง ์นดํผ๋ฅผ ํตํด ์ตํ๋ค.
๋๋ฌด์ํค์ ํ๋ฅผ ๊ทธ๋๋ก ์นดํผํ๋ ์ฐ์ต์ ํ๋ค.
๐์์ฑ
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>์ ๊ตญ ํ์ด์ง</title>
<style>
table,td,th {border: 1px solid #EAEAEA; border-collapse: collapse;}
.left_th {background-color: #B2CCFF;}
</style>
</head>
<body>
<!-- ๋ฉ๋ด๋ฐ -->
<div>
<a href="./jungkook.html">์ ๊ตญ</a>
<a href="./jimin.html">์ง๋ฏผ</a>
<a href="./jin.html">์ง</a>
<a href="./v.html">๋ท</a>
<a href="./rm.html">RM</a>
<a href="./suga.html">์๊ฐ</a>
<a href="./jhope.html">์ ์ดํ</a>
</div>
<h1>์ ์ ๊ตญ</h1>
<div>
<table>
<!-- 1ํ -->
<tr>
<th colspan="2" class="left_th">
<div>์ ๊ตญ</div>
<div>JUNGKOOK</div>
</th>
<!-- <td> </td> -->
</tr>
<!-- 2ํ ์ฌ์ง -->
<tr>
<th colspan="2" class="left_th">
<div>
<img src="./images/jungkook.jpg">
</div>
</th>
<!-- <td> </td> -->
</tr>
<!-- 3ํ -->
<tr>
<th class="left_th">๋ณธ๋ช
</th>
<td>
<div>
์ ์ ๊ตญ (็ฐๆพๅ<sup>[ํ์][2]</sup>, Jun Jungkook)
</div>
</td>
</tr>
<!-- 4ํ -->
<tr>
<th class="left_th">์ถ์</th>
<td>
<div>1997๋
9์ 1์ผ (25์ธ)</div>
<div>๋ถ์ฐ๊ด์ญ์ ๋ถ๊ตฌ ๋ง๋๋</div>
</td>
</tr>
<!-- 5ํ -->
<tr>
<th class="left_th">๊ตญ์ </th>
<td>
<div>
<img src="./images/kor.jpg">
๋ํ๋ฏผ๊ตญ
</div>
</td>
</tr>
<!-- 6ํ -->
<tr>
<th class="left_th">๋ณธ๊ด</th>
<td>๋ด์ ์ ์จ (ๆฝญ้ฝ ็ฐๆฐ)<sup>[3]</sup></td>
</tr>
<!-- 7ํ -->
<tr>
<th class="left_th">์ ์ฒด</th>
<td>179cm<sup>[4]</sup>, 71kg<sup>[5]</sup>, Aํ, 280mm<sup>[6]</sup></td>
</tr>
<!-- 8ํ -->
<tr>
<th class="left_th">๊ฐ์กฑ</th>
<td>
<div>๋ถ๋ชจ๋, ํ ์ ์ ํ<sup>(1995๋
์)[์ฌ์ง]</sup></div>
<div>๋ฐ๋ ค๊ฒฌ ๊ตฌ๋ฆ<sup>(๋งํฐ์ฆ)[8]</sup>, ์ ๋ฐค<sup>(๋๋ฒ ๋ฅด๋ง ํ์
)</sup></div>
</td>
</tr>
<!-- 9ํ -->
<tr>
<th class="left_th">ํ๋ ฅ</th>
<td>
<div>๋ฐฑ์์ด๋ฑํ๊ต (์กธ์
)</div>
<div>์ ๊ตฌ์คํ๊ต (์กธ์
)<sup>[9]</sup></div>
<div>์์ธ๊ณต์ฐ์์ ๊ณ ๋ฑํ๊ต (์ค์ฉ์์
๊ณผ / ์กธ์
)</div>
<div>๊ธ๋ก๋ฒ์ฌ์ด๋ฒ๋ํ๊ต (๋ฐฉ์ก์ฐ์๊ณผ / ํ์ฌ)<sup>[10]</sup></div>
</td>
</tr>
<!-- 10ํ -->
<tr>
<th class="left_th">์ข
๊ต</th>
<td>๋ฌด์ข
๊ต</td>
</tr>
<!-- 11ํ -->
<tr>
<th class="left_th">์์์ฌ</th>
<td>
<div>
<img src="./images/bmusic.jpg">
<sup>[11]</sup>
</div>
</td>
</tr>
<!-- 12ํ -->
<tr>
<th class="left_th">์์ ๊ทธ๋ฃน</th>
<td>
<div>
<img src="./images/bts.jpg">
</div>
</td>
</tr>
<!-- 13ํ -->
<tr>
<th class="left_th">ํฌ์ง์
</th>
<td>๋ฉ์ธ๋ณด์ปฌ, ๋ฆฌ๋๋์, ์๋ธ๋ํผ</td>
</tr>
<!-- 14ํ -->
<tr>
<th class="left_th">๋ฐ๋ท</th>
<td>
<div>2013๋
๋ฐฉํ์๋
๋จ ์ฑ๊ธ 1์ง
<span style="color:#CCA63D;background-color:#000000;">2 COOL 4 SKOOL</span>
</div>
<div>(๋ฐ๋ท์ผ๋ก๋ถํฐ +3584์ผ, 9์ฃผ๋
)</div>
</td>
</tr>
<!-- 15ํ -->
<tr>
<th class="left_th">์ทจ๋ฏธ</th>
<td>๊ทธ๋ฆผ ๊ทธ๋ฆฌ๊ธฐ, ๊ธฐํ ์ฐ์ฃผ, ๋ณต์ฑ, ์์ ์ดฌ์ ๋ฐ ํธ์ง<sup>[12]</sup></td>
</tr>
<!-- 16ํ -->
<tr>
<th class="left_th">๋ณ๋ช
</th>
<td>[ํผ์น๊ธฐ ์ ๊ธฐ]</td>
</tr>
<!-- 17ํ -->
<tr>
<th class="left_th">MBTI</th>
<td>ISFP</td>
</tr>
<!-- 18ํ -->
<tr>
<th class="left_th">ํ์ฅ</th>
<td>ํ๊ด๋ฌธํํ์ฅ<sup>[33]</sup></td>
</tr>
<!-- 19ํ -->
<tr>
<th class="left_th">๋งํฌ</th>
<td>
<div>
<img src="./images/insta.jpg">
</div>
</td>
</tr>
<!-- 20ํ -->
<tr>
<th class="left_th">์๋ช
</th>
<td>
<div>
<img src="./images/jungkooksign.jpg">
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
๐๊ฒฐ๊ณผ
์ด ์ธ๊ฐ์ง ๋ฐฉ์์ด ์์ง๋ง ์ฃผ๋ก ์ฌ์ฉ๋๋ ๋ฐฉ์์ ๋๊ฐ์ง์ด๋ค.
Inline
๋ฐฉ์๊ณผ Internal
๋ฐฉ์์ด๋ค.
Inline ๋ฐฉ์
์ฒซ ์๊ฐ์ ๋ฐฐ์ด ๋ฐฉ์์ด๋ค. div ํ๊ทธ๋ span ํ๊ทธ์ style๋ฅผ ์ด์ฉํ์ฌ ์๊น์ด๋ ๋ฐฐ๊ฒฝ์์ ๋ฃ๋๋ค.
style="ํค:๊ฐ;"
์ด ๋ฐฉ๋ฒ์ ๊ฐ์ฅ ์ฝ์ง๋ง, ๊ฐ๋ณ๋ก ์ ์ฉํด์ผํ๊ธฐ ๋๋ฌธ์ ๋ฒ๊ฑฐ๋กญ๊ณ ์์ ์ด ์ด๋ ต๋ค. ์ฆ, ์ ์ง๋ณด์๊ฐ ์ด๋ ต๋ค.
Internal ๋ฐฉ์
id ๋ class๋ฅผ ๋ถ์ฌํ์ฌ Head ์น์
์์ style ํ๊ทธ๋ฅผ ๋ฃ์ด ์ผ๊ด ์ ์ฉํ๋ค.
<style> ํ๊ทธ{ํค:๊ฐ;} </style>
์ด ๋ฐฉ๋ฒ์ id, class๋ฅผ ๋ถ์ฌํด์ผ ํ์ง๋ง ์ผ๊ด๋ก ์ ์ฉํ๊ธฐ ์ฉ์ดํ๊ณ ์์ ์ด ์ฝ๊ธฐ ๋๋ฌธ์ ์ ์ง๋ณด์ํ๊ธฐ ์ข๋ค. ๋๋๋ก ์ด ๋ฐฉ์์ผ๋ก ์ฐ๋ ๊ฒ์ด ์ข๋ค๊ณ ํ์
จ๋ค.
<table>
<tr>
<td>
</td>
</tr>
</table>
Internal ๋ฐฉ์์ผ๋ก ์ ์ฉ ๊ฐ๋ฅํ๋ค.
<style>
table,td,th {border: 1px solid #EAEAEA; border-collapse: collapse;}
</style>
td์ ๊ฐฏ์๊ฐ ๋ง์ง ์๋ ๊ฒฝ์ฐ,
colspan
, rowspan
์ ์ด์ฉํ์ฌ ์
์ ํฉ์ณ์ค๋ค.
๐์์ฑ
<body>
<h2>colspan</h2>
<h4>์ด(๊ฐ๋ก) ํฉ์น๊ธฐ, ๊ฐ๋ก๋ฐฉํฅ td๋ฅผ ์ง์ฐ๋ฉด ๋จ</h4>
<table>
<tr>
<td colspan="2">1</td>
<!-- <td>2</td> -->
<td>3</td>
</tr>
<tr>
<td colspan="3">4</td>
<!-- <td>5</td>
<td>6</td> -->
</tr>
<tr>
<td>7</td>
<td>8</td>
<td>9</td>
</tr>
</table>
<h2>rowspan</h2>
<h4>ํ(์ธ๋ก) ํฉ์น๊ธฐ, ์ธ๋ก๋ฐฉํฅ td๋ฅผ ์ง์ฐ๋ฉด ๋จ</h4>
<table>
<tr>
<td>1</td>
<td>2</td>
<td rowspan="2">3</td>
</tr>
<tr>
<td rowspan="2">4</td>
<td>5</td>
<!-- <td>6</td> -->
</tr>
<tr>
<!-- <td>7</td> -->
<td>8</td>
<td>9</td>
</tr>
</table>
</body>
๐๊ฒฐ๊ณผ
ํน์ ๊ธฐํธ ์ฌ์ฉ์ ์ค๋ฅ๊ฐ ๋ ์ ์์ผ๋ฏ๋ก ์ด๋ฅผ ๋ฐฉ์งํ๊ธฐ ์ํด ์ฌ์ฉํ๋ค.
< less than <
> greater than >
๋ง์ฝ์ <span>์ ๊ทธ๋๋ก ์ถ๋ ฅํ๊ณ ์ถ๋ค๋ฉด <span>๋ผ๊ณ ์์ฑํ๋ฉด ๋๋ค.
๊ณต๋ฐฑ(์คํ์ด์ค)๋ ์ฌ๋ฌ์นธ์ ๋์ธ๋ ์ฌ์ฉํ๋ค.
ํน์๋ฌธ์ ํ๋ฅผ ์ฌ์ฉํ์ฌ ํน์ ์ฌ๋ณผ์ด๋ ์ด๋ชจ์ง๋ ์ฌ์ฉ ๊ฐ๋ฅํ๋ค. ๐
<oi>
<li>๋ด<li>
<li>์ฌ๋ฆ<li>
<li>๊ฐ์<li>
<li>๊ฒจ์ธ<li>
<oi>
<ui>
<li>๋ด<li>
<li>์ฌ๋ฆ<li>
<li>๊ฐ์<li>
<li>๊ฒจ์ธ<li>
<ui>
์์ ๋ฅผ ๋ณด๊ณ ๋๊ฐ์ด ํ์ด์ง๋ฅผ ๋ง๋๋ ์ฐ์ต์ ํ๋ค.
๐์์
๐์์ฑ
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style>
table, td {
border: 1px solid #000000;
border-collapse: collapse;
}
</style>
</head>
<body>
<form action="">
<fieldset>
<legend>ํ์๊ฐ์
</legend>
<table>
<tr>
<td>ID</td>
<td>
<input type="text">
</td>
</tr>
<tr>
<td>
<label for="pw_1">
PW<br>
</label>
<label for="pw_2">
ํ์ธ
</label>
</td>
<td>
<input id="pw_1" type="password"><br>
<input id="pw_2" type="password">
</td>
</tr>
<tr>
<td>์ฑ๋ณ</td>
<td>
<input type="radio" name="gender">๋จ
<input type="radio" name="gender">์ฌ
</td>
</tr>
<tr>
<td>์ทจ๋ฏธ</td>
<td>
<input type="checkbox" name="hobby">์ด๋
<input type="checkbox" name="hobby">์ฌํ
<input type="checkbox" name="hobby">๋
์
</td>
</tr>
<tr>
<td>์์ผ</td>
<td>
<input type="date">
</td>
</tr>
<tr>
<td>๋์ด</td>
<td>
<input type="text">
</td>
</tr>
<tr>
<td>์ด๋ฉ์ผ</td>
<td>
<input type="text">
@
<select>
<option>naver.com</option>
<option>kakao.com</option>
<option>gmail.com</option>
<option>nate.com</option>
</select>
</td>
</tr>
<tr>
<td>๋ฉ๋ชจ</td>
<td>
<textarea rows="3" cols="50"></textarea>
</td>
</tr>
<tr>
<td colspan="2">
<button type="submit">signin</button>
<button type="submit">reset</button>
</td>
</tr>
</table>
</fieldset>
</form>
</body>
</html>
๐๊ฒฐ๊ณผ
์ฐ๊ด๋ ๋ด์ฉ๋ค์ ํ๋์ ์์๋ก ๋ฌถ๋ ์ ์ ๋ง๋ ๋ค.
legend ํ๊ทธ๋ฅผ ๊ฐ์ด ์ฌ์ฉํ๋ฉด ์ด ์์๋ฅผ ์ ์ํ๋ ์ด๋ฆ์ ์ง์ ์ ์๋ค.
์ฌ์ฉ์๊ฐ ์ง์ ๊ฐ์ ์
๋ ฅํ ์ ์๋, ์ฌ์ฉ์์ ์ํธ์์ฉ์ด ๊ฐ๋ฅํ ์ ์๊ฒ ํ๋ ๊ณต๊ฐ์ ๋ง๋๋ ํ๊ทธ๋ค.
์ด ๊ณต๊ฐ์ ๊ธ์จ๋ง ์
๋ ฅํ ์ ์๋ 'text'์ผ ์๋ ์๊ณ ,
์ซ์๋ง ์
๋ ฅํ ์ ์๋ 'number'์ผ ์๋ ์๊ณ ,
์ฌ์ฉ์๊ฐ ๊ฐ์ ์ ํํ๋ 'radio'์ผ ์๋ ์๋ค.
input ํ๊ทธ์๋ ๋ค์๊ณผ ๊ฐ์ ๋ค์ํ ์์ฑ์ ๋ถ์ฌํ ์ ์๋ค.
๐์์ฑ
button<input type="button"><br>
checkbox<input type="checkbox"><br> <!-- ๊ทธ๋ฃน์ผ๋ก ๋ฌถ์ผ๋ฉด ์ฌ๋ฌ๊ฐ ์ ํ ๊ฐ๋ฅ -->
color<input type="color"><br>
date<input type="date"><br>
datetime-local<input type="datetime-local"><br>
email<input type="email"><br> <!-- email ์์์ ๋ง๋ ๊ฐ๋ง ์
๋ ฅ ๊ฐ๋ฅ -->
file<input type="file"><br>
hidden<input type="hidden"><br>
image<input type="image"><br>
month<input type="month"><br>
number<input type="number"><br>
password<input type="password"><br>
radio<input type="radio"><br> <!-- ๊ทธ๋ฃน์ผ๋ก ๋ฌถ์ผ๋ฉด ํ๋๋ง ์ ํ ๊ฐ๋ฅ -->
range<input type="range"><br>
reset<input type="reset"><br>
search<input type="search"><br>
submit<input type="submit"><br>
tel<input type="tel"><br>
text<input type="text"><br>
time<input type="time"><br>
url<input type="url"><br> <!-- url ์์์ ๋ง๋ ๊ฐ๋ง ์
๋ ฅ ๊ฐ๋ฅ -->
week<input type="week"><br>
๐๊ฒฐ๊ณผ
name์ผ๋ก ๊ทธ๋ฃน์ผ๋ก ๋ฌถ์ด๋๋ฉด
radio๋ ํ๋๋ง ์ ํ, checkbox๋ ์ฌ๋ฌ๊ฐ ์ ํ์ด ๊ฐ๋ฅํ๋ค.
๐์์ฑ
<!-- ์ ํ -->
<div>
<input type="radio" name="gender">๋จ
<input type="radio" name="gender">์ฌ
</div>
<div>
<input type="checkbox" name="hobby">์ผ๊ตฌ
<input type="checkbox" name="hobby">์ถ๊ตฌ
<input type="checkbox" name="hobby">ํด๋ผ์ด๋ฐ
</div>
๐๊ฒฐ๊ณผ
๋จ,์ฌ๋ ๋ ์ค ํ๋๋ง ์ ํ์ด ๊ฐ๋ฅํ๊ณ
์ผ๊ตฌ, ์ถ๊ตฌ, ํด๋ผ์ด๋ฐ์ ์ฌ๋ฌ๊ฐ ์ ํ์ด ๊ฐ๋ฅ
<label for="pw">๋น๋ฐ๋ฒํธ :</label>
<input id="pw" type="password">
id ์์ฑ ํ ๋ผ๋ฒจ์ ๋ถ์ฌํ๋ฉด ์ปดํจํฐ๋ฅผ ์ํด ํด๋น ํ
์คํธ(id)์ ํด๋นํ๋ ๋ต์ ์
๋ ฅํ๋ ์นธ์ด ์ฌ๊ธฐ๋ผ๊ณ ์ง์ ๊ฐ๋ฅ
<textarea rows="3" cols="50"></textarea>
ํ
์คํธ ์์ ์์ฑ.
row๋ ์ค, cols๋ ํ ์ค์ ๋ค์ด๊ฐ ๊ธ์์
<select>
<option>์ ํ1</option>
<option>์ ํ2</option>
</select>
option์ ๊ผญ ๋ฃ์ด์ฃผ์ด์ผ ํ๋ค.
๐์์ฑ
<!-- ์ฑ๊ธ์ ํ -->
๊ด์ฌ์ฌ1
<select>
<option>๋ฌธํ</option>
<option>๊ฒฝ์ </option>
<option>์คํฌ์ธ </option>
</select>
<!-- ๋ค์ค์ ํ -->
๊ด์ฌ์ฌ2
<select multiple="multiple">
<option>ํ๋ก๊ทธ๋๋ฐ</option>
<option>๊ฒ์</option>
<option>๋น
๋ฐ์ดํฐ</option>
<option>AI</option>
</select>
๐๊ฒฐ๊ณผ
select์ ๋น์ทํ์ง๋ง, ์กฐ๊ธ ๋ค๋ฅด๋ค.
๐์์ฑ
<datalist id="browsers">
<option value="Internet Explorer">
<option value="Firefox">
<option value="Chrome">
<option value="Opera">
<option value="Safari">
</datalist>
๐๊ฒฐ๊ณผ