์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- ํ์ฒ์ ๋ฆฌํธ๋ฆฌํธ
- JavaScript
- ์ ๋ฆฌํธ๋ฆฌํธ
- database
- ๊ฐ์ดํ ์ข ๋ญ๊ฐ๋น
- Python
- ์๋ฐ
- ์ฝ๋ฉ
- ์ํ์ฃผ
- ๋ฐ์ดํฐ๋ฒ ์ด์ค
- html
- Java
- ์๋ฐ์คํฌ๋ฆฝํธ
- css
- ํฐ์คํ ๋ฆฌ์ฑ๋ฆฐ์ง
- ์ค๋ธ์
- ๊น๋ฏธ๊ฒฝ์๋งํ์์
- ๋ฐฐ์์ ๋ฐฐ์
- ํ์ด์ฌ
- ๊ฐ๋ฐ
- ๋ฐ์ํ
- ์ฑ
- ๋๊ฐ
- K๋ฐฐํฐ๋ฆฌ๋ ๋ณผ๋ฃจ์
- ํ๋ก๊ทธ๋๋ฐ
- ์ค๋ผํด
- ์นดํ๋๊ฐ
- ์ํ
- ์นํผ๋ธ๋ฆฌ์ฑ
- ๋ ์
- Today
- Total
JiYoung Dev ๐ฅ
HTML ํ๊ทธ : ๋ฆฌ์คํธ, ์ด๋ฏธ์ง, ์ต์ปค, ํ ์ด๋ธ, ์ธํ (2023.04.25) ๋ณธ๋ฌธ
HTML ํ๊ทธ : ๋ฆฌ์คํธ, ์ด๋ฏธ์ง, ์ต์ปค, ํ ์ด๋ธ, ์ธํ (2023.04.25)
Shinjio 2023. 4. 25. 20:13๐ ๋ฆฌ์คํธ ํ๊ทธ
๐ <ul>
unordered list
๋ฒํธ ์๋ ๋ชฉ๋ก์ ์ ์ธํ ๋ ์ฌ์ฉํ๋ ํ๊ทธ
๐ <ol>
ordered list
๋ฒํธ ์๋ ๋ชฉ๋ก์ ์ ์ธํ ๋ ์ฌ์ฉํ๋ ํ๊ทธ
๐ <li>
list item
<ul>, <ol> ํ๊ทธ ์์์ ์ฝํ ์ธ ๋ฅผ ๋ด๊ธฐ ์ํด ๊ณตํต์ ์ผ๋ก ์ฌ์ฉ๋๋ ํ๊ทธ
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h1>๋ฆฌ์คํธ ํ๊ทธ</h1>
<!-- (1) ๋ฆฌ์คํธ ๊ณต๊ฐ ์ ์ธ : ul, ol
=> ul, ol ๋ ๋ค li ํ๊ทธ ํ์ํ๋ค.
(2) ๋ฆฌ์คํธ ๋ด ์ค์ง์ ์ธ ๋ฐ์ดํฐ๋ li ํ๊ทธ ์์ ๋ฃ์ด์ผ ํ๋ฏ๋ก! -->
<!-- ul (unordered list) ์ ๋ ฌํ ํ์๊ฐ ์๋ ๋ฆฌ์คํธ์ผ ๊ฒฝ์ฐ -->
<ul>
<li>๋ธ๊ธฐ</li>
<li>๋ฐ๋๋</li>
<li>์ฌ๊ณผ</li>
</ul>
<!-- ol (ordered list) : ์ ๋๋์ด ์๋ ๋ฆฌ์คํธ -->
<ol type="I">
<li>JAVA</li>
<li>DB</li>
</ol>
<br>
<!-- ์ค์ต -->
<h3>์ค์ต!</h3>
<p>๊ตฌ๋งค ๋ชฉ๋ก</p>
<ul type="square">
<li>๋ธ๊ธฐ</li>
<li>์๊ณ ๊ธฐ</li>
<li>์ค๋ธ์ค๋ธ</li>
</ul>
<p>์ค๋ธ์ค๋ธ ์์</p>
<!-- ol>li*3 : ๋จ์ถ ๋ช
๋ น์ด Emmet ๊ธฐ๋ฅ! -->
<ol type="A">
<li>์ก์์ ์์ค๋ฅผ ๋ฃ๋๋ค</li>
<li>์ฌ๋ฃ๋ค์ ๋ฃ๋๋ค</li>
<li>๊ณ ๊ธฐ๋ฅผ ๋ฃ๋๋ค</li>
</ol>
</body>
</html>
๐ ์ด๋ฏธ์ง ํ๊ทธ <img>
์นํ์ด์ง์ ์ด๋ฏธ์ง๋ฅผ ๋ณด์ฌ์ฃผ๋ ํ๊ทธ
ํ์ ์์ฑ → src : ์ด๋ฏธ์ง์ ๊ฒฝ๋ก๋ฅผ ์ง์
โ๏ธ ๊ฒฝ๋ก๋ฅผ ์๋ ค์ฃผ๋ ๋ฐฉ๋ฒ
1. ์ ๋ ๊ฒฝ๋ก
์ด๋ค ํ์ด์ง๋ ํ์ผ์ด ๊ฐ์ง ๊ณ ์ ํ ๊ฒฝ๋ก
์ธ๋ถ ์นํ์ด์ง๋ก ์ฐ๊ฒฐํ ๋ ์ฌ์ฉ
๋ด๊ฐ ํ์ผ์ ์ด๋์์ ์ฌ์ฉํ๊ณ ์๋ ์ ๋๊ฒฝ๋ก๋ ์์ ํ ํ์๊ฐ ์์
๊ทธ๋ฌ๋ ์๋ณธ์ด ์ฌ๋ผ์ง๊ฒ ๋๋ฉด ํจ๊ป ์ฌ๋ผ์ง
2. ์๋ ๊ฒฝ๋ก
ํน์ ์์น๋ฅผ ๊ธฐ์ค์ผ๋ก ํ์ผ์ ์ฐพ๋ ๊ฒฝ๋ก
๋ด๋ถ ์๋ฃ๋ฅผ ์ฐ๊ฒฐํ ๋ ์ฌ์ฉ
์๋๊ฒฝ๋ก ์ฌ์ฉ๋ฒ
์ด๋๊ฐ ๋๊ฐ ํ์ ์์ด ๋ฐ๋ก ์ ๊ทผ์ด ๊ฐ๋ฅํ ๊ฒฝ์ฐ → ./ ์ฌ์ฉ (์๋ต๊ฐ๋ฅ)
์ด๋๊ฐ๋ก ํ ๋ฒ ๋์์ผ ํ ๋๋ → ../ ์ฌ์ฉ (์ฌ๋ฌ๋ฒ ๋์์ผ ํ๋ ๊ฒฝ์ฐ ../ ์ฌ๋ฌ๋ฒ ์ฌ์ฉ)
์ต์์๋ฅผ ๊ธฐ์ค์ผ๋ก ์ ๊ทผํ ๋ → / ์ฌ์ฉ
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<!-- ์ด๋ฏธ์ง ํ๊ทธ
- ํ์ ์์ฑ : src (source์ ์ค์๋ง) -->
<!-- (1) ์ ๋ ๊ฒฝ๋ก : ๊ณ ์ ํ ๊ฒฝ๋ก, ์ธ๋ถ์ ์๋ ์ฌ์ง์ ๊ฐ์ง๊ณ ์ฌ ๋ ๋ง์ด ์ฌ์ฉ -->
<!-- https://www.artinsight.co.kr/data/news/1908/3553982061_YjVDz81E_131.jpg -->
<img src="https://www.artinsight.co.kr/data/news/1908/3553982061_YjVDz81E_131.jpg" width="500px">
<!-- (2) ์๋ ๊ฒฝ๋ก -->
<!-- (1) ํ์ฌ๋ฅผ ๊ธฐ์ค์ผ๋ก ๋ฐ๋ก ์ ๊ทผ ๊ฐ๋ฅํ ๊ฒฝ์ฐ : ./ ์ฌ์ฉ -->
<!-- <img src="./img/pic.jpg"> -->
<!-- (2) ์์๋ฅผ ๊ธฐ์ค์ผ๋ก ์ ๊ทผ์ด ๊ฐ๋ฅํ ๋ : ../ ์ฌ์ฉ -->
<img src="../img/pic.jpg" width="500px">
</body>
</html>
๐ ์ต์ปคํ๊ทธ <a href="url">ํ ์คํธ</a>
ํ์ฌ ๋ฌธ์์์ ๋ค๋ฅธ ๋ฌธ์๋ก ์ฆ์ ์ ๊ทผ๊ฐ๋ฅํ ํ์ดํผํ ์คํธ๋ฅผ ์์ฑํ๋ ํ๊ทธ
ํ์ ์์ฑ์ผ๋ก href ๋ฅผ ๊ฐ์ง
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<!-- a ํ๊ทธ (anchor)
ํ์ฌ ๋ฌธ์์์ ๋ค๋ฅธ ๋ฌธ์๋ก ์ฆ์ ์ ๊ทผ ๊ฐ๋ฅํ ํ์ดํผํ
์คํธ๋ฅผ ์์ฑ
- ํ์์์ฑ : ์ด๋๋ก ์ด๋ํ ๊ฒ์ธ๊ฐ์ ๋ํ 'href' ์์ฑ
- ์ด๋ป๊ฒ ์ด๋ํ ๊ฒ์ธ๊ฐ? ์ปจํ
์ธ ๋ฅผ ํด๋ฆญํ๋ฉด ์ด๋ -->
<a href="https://www.naver.com/" target="blank">๋ค์ด๋ฒ๋ก ์ด๋ํ๊ธฐ</a>
<br>
<br>
<a href="./document/ex05์ด๋ฏธ์ง.html" target="blank">๋ด๊ฐ ์ข์ํ๋ ๊ฒ์?</a>
<h3>์ค์ต</h3>
<!-- ๋ก๊ณ ์ด๋ฏธ์ง ํด๋ฆญ์ ์ค๋งํธ์ธ์ฌ๊ฐ๋ฐ์ ํํ์ด์ง๋ก ์ด๋ -->
<a href="https://smhrd.or.kr/" target="blank"><img src="./img/logo.png" width="300"></a>
</body>
</html>
๐ ํ ์ด๋ธํ๊ทธ <table>
1. ํ๋ฅผ ๋ง๋ค์ด์ผ ๊ฒ ๋ค โถ <table></table>
2. ๋ช์ค์ง๋ฆฌ ํ๋ฅผ ๋ง๋ค์ด์ผ๊ฒ ๋ค โถ table row <tr></tr> ์ค์ ๊ฐ์๋งํผ
3. ๋ช์นธ์ง๋ฆฌ ํ๋ฅผ ๋ง๋ค์ด์ผ๊ฒ ๋ค โถ table data <td></td>
4. ๋ด์ฉ ์ฑ์์ฃผ๊ธฐ โถ td ์์ ์ปจํ
์ธ ๋ก
<table>
<tr>
<td>๋ด์ฉ</td>
<td>๋ด์ฉ</td>
</tr>
</table>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<!-- 1. ํ
์ด๋ธ์ ๋ง๋ค๊ฒ ๋ค๊ณ ์ ์ธํ ๊ณต๊ฐ : table -->
<table border="1px solid black">
<!-- +) ํ์ ์ ๋ชฉ : caption ํ๊ทธ ์ฌ์ฉ -->
<caption>๋ฉ๋ดํ</caption>
<!-- 2. ํ
์ด๋ธ์ ํ ์ค(ํ)์ ์์ฑํ๋ ๋ฐฉ๋ฒ :
table row์ ์ค์๋ง tr ํ๊ทธ ์ฌ์ฉ -->
<!-- 3-1. ํ
์ด๋ธ์ ํ ์นธ, ๋ฐ์ดํฐ๋ฅผ ๋ฃ์ด์ฃผ๋ ๊ณต๊ฐ :
table data => td ํ๊ทธ -->
<!-- 3-2. ํ
์ด๋ธ์ ํค๋ ๋ถ๋ถ์ ์์ฑํ ๋ ์ฌ์ฉ
: tabale header => th ํ๊ทธ (td -> th) -->
<!-- ๋ณํฉ ๊ธฐ๋ฅ
๋จ์ํ ๋๋น, ๋์ด๋ฅผ ๋๋ฆฌ๋ฉด ์ง๊ฟ์ธ ์นธ๋ค์ด ํจ๊ป ๋์ด๋๋ค
=> ๋ณํฉ ๊ธฐ๋ฅ์ ์ฌ์ฉํด์ผ ํจ
1) ์์๋๋ก ๋ณํฉ(ํ๋ณํฉ) : rowspan
=> td, th์ ์์ฑ
2) ์ข์ฐ๋ก ๋ณํฉ(์ด๋ณํฉ) : colspan
-->
<tr bgcolor = "lightblue">
<th colspan="2">๋ฉ๋ด</th>
</tr>
<tr>
<td>์๋ฉ๋ฆฌ์นด๋
ธ</td>
<td rowspan="2">3500์</td>
</tr>
<tr>
<td>์นดํ๋ผ๋ผ</td>
<!-- <td>3500์</td> -->
</tr>
</table>
<!-- ์ค์ต -->
<h3>์ค์ต</h3>
<!-- ์ฐ๋ฆฌ ํ์ ์๊ฐํด๋ณด์! -->
<table border="1px solid black">
<caption>ํ๊ธธ๋ํ</caption>
<!-- (tr>td*4)*3 -->
<tr bgcolor = "yellow">
<th>์ด๋ฆ</th>
<th colspan="2">์ฑ๋ณ/์ฃผ์</th>
<th>๋น๊ณ </th>
</tr>
<tr>
<td>ํ๊ธธ๋</td>
<td>๋จ์</td>
<td>์์ธ</td>
<td rowspan="4"></td>
</tr>
<tr>
<td>์๋ฌด๊ฐ</td>
<td>๋จ์</td>
<td>๊ด์ฃผ</td>
</tr>
<tr>
<td>์์ธ๊ตญ</td>
<td>์ฌ์</td>
<td>์ ์ฃผ</td>
</tr>
<tr>
<td>๊น๋นต๋นต</td>
<td>๋จ์</td>
<td>๋ถ์ฐ</td>
</tr>
</table>
</body>
</html>
๐ ์ ๋ ฅ์์ ํ๊ทธ <form></form>
์นํ์ด์ง์ ์ ๋ ฅํผ์ ๋ง๋ค ๋ ์ฌ์ฉํ๋ ํ๊ทธ
ํ์์์ฑ
action
method
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<!-- form ํ๊ทธ
- ์นํ์ด์ง์ ์
๋ ฅํผ์ ๋ง๋ค ๋ ์ฌ์ฉํ๋ ํ๊ทธ
- ์ฌ์ฉ์์๊ฒ ์ ๋ณด๋ฅผ ๋ฐ์์ฃผ๋ ํ๊ทธ
- ํ์ ์์ฑ 2๊ฐ์ง : method(์ ๋ฌ๋ฐฉ์), action(์ ๋ฌ์์น) -->
<form method="get" action="#">
<!-- get๋ฐฉ์ : url๋ฅผ ํตํด ๋ณด๋ธ๋ค. ์ ๋ณด ๊ณต๊ฐ์ -->
<!-- # : ์ง๊ธ ์ฌ๊ธฐ -->
<h4>์
๋ ฅ</h4>
<!-- input ํ๊ทธ : ์ฌ์ฉ์๊ฐ ์
๋ ฅํ ์ ์๋ ๊ณต๊ฐ -->
<!-- ์์ฑ
1) name : ์
๋ ฅํ ๊ฐ์ ๊ตฌ๋ถํ๊ธฐ ์ํด ์ง์ ํด์ฃผ๋ ์ด๋ฆ
=> name์ด ์์ผ๋ฉด ์ ๋ณด๊ฐ ์ ์ถ๋์ง ์์!
2) placeholder : ๋ฏธ๋ฆฌ๋ณด๊ธฐ ํ
์คํธ
3) autofouce : ์๋ ์ปค์ ์ค์
4) value : ๊ธฐ๋ณธ๊ฐ ์ค์
5) readonly : ์ฝ๊ธฐ ์ ์ฉ ์ง์ (๊ฐ ์์ ๋ถ๊ฐ)
6) maxlength : ๊ธ์์ ์ ํ ์ง์
-->
์์ด๋ : <input type="text" name="id" placeholder="์์ด๋๋ฅผ ์
๋ ฅํด ์ฃผ์ธ์" autofocus>
<br>
๋น๋ฐ๋ฒํธ : <input type="password" maxlength="10">
<br>
๊ฐ์์ฅ : <input type="text" name="lec" value="K๊ฐ์์ฅ" readonly>
<h4>์ ํ</h4>
<!-- (1) input ํ๊ทธ์ type์ด chekbox
=> ์ค๋ณต์ ํ ๊ฐ๋ฅ
(2) input ํ๊ทธ์ type์ด radio
=> ์ค๋ณต์ ํ ๋ถ๊ฐ๋ฅ
-->
<!-- checkbox
: ์ค๋ฌธ์กฐ์ฌ, ํํฐ๊ฒ์์ ๋ง์ด ์ฌ์ฉ -->
<p>์ข์ํ๋ ์๋ฃ๋ฅผ ๋ชจ๋ ๊ณจ๋ผ์ฃผ์ธ์.</p>
<input type="checkbox"> ์๋ฉ๋ฆฌ์นด๋
ธ
<input type="checkbox"> ๋ฏผํธ์ด์ฝ
<!-- radio
: name์ ํตํด์ ํ๋์ ์ ํ์ผ๋ก ๋ง๋ค์ด์ค์ผ ํจ
+ value๋ฅผ ํตํด์ ๋ญ ์๋ฏธํ๋์ง ์ปดํจํฐ์๊ฒ ์๋ ค์ค -->
<p>๋น์ ์ ์ฑ๋ณ์ ๊ณจ๋ผ์ฃผ์ธ์.</p>
<input type="radio" name="gender" value="man">๋จ์ฑ
<input type="radio" name="gender" value="woman">์ฌ์ฑ
<br>
<!-- select ํ๊ทธ -->
<select>
<option >Aํ</option>
<option >Bํ</option>
<option >ABํ</option>
<option >Oํ</option>
</select>
<h4>๊ทธ ์ธ</h4>
<input type="file"><br>
<input type="color"><br> <!-- ์ ์ ํ -->
<input type="number"><br><!-- ์ซ์ ์ ํ -->
<input type="range"><br><!-- ๋ฒ์ ์ง์ -->
<input type="date"><br><!-- ๋ ์ง ์ ํ -->
<input type="datetime-local"><br><!-- ๋ ์ง + ์๊ฐ๊น์ง ๊ฐ์ด ์
๋ ฅ -->
<h4>์ ์ถ ๋ฐ ์ด๊ธฐํ</h4>
<!-- ์ค์!
์ ์ถ๋๋ ์ ๋ณด๋ form ํ๊ทธ ์์ ~ ๋
๋ฐ๋ผ์ ์ ์ถ ๋ฒํผ์ form ํ๊ทธ ๋ด๋ถ์ ์กด์ฌํด์ผ ํจ! -->
<input type="submit" value="๋ณด๋ด๊ธฐ">
<input type="reset">
</form>
</body>
</html>
๐ ํ์๊ฐ์ ์ ๋ ฅํผ ๋ง๋ค๊ธฐ ์ค์ต - table, input ํ๊ทธ ์ฌ์ฉ
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<form method="get" action="#">
<table width="400px">
<tr>
<th colspan="2" bgcolor="gray" height="50px" align="left">Step1 : ์์ด๋/๋น๋ฒ ์
๋ ฅ</td>
</tr>
<tr height="35px" bgcolor="whitesmoke">
<td align="right">์์ด๋ :</td>
<td>
<input type="text" name="id" maxlength="15">
</td>
</tr>
<tr height="35px" bgcolor="whitesmoke">
<td align="right">๋น๋ฐ๋ฒํธ :</td>
<td>
<input type="password" name="pw" maxlength="20">
</td>
</tr>
<tr height="35px" bgcolor="whitesmoke">
<td align="right">๋น๋ฐ๋ฒํธ ํ์ธ :</td>
<td>
<input type="password" name="pwcheck" maxlength="20">
</td>
</tr>
<tr>
<th colspan="2" bgcolor="gray" height="50px" align="left">Step2 : ๊ฐ์ธ์ ๋ณด</td>
</tr>
<tr height="35px" bgcolor="whitesmoke">
<td align="right">์ฑ๋ณ :</td>
<td>
๋จ<input type="radio" name="gender" value="man">
์ฌ<input type="radio" name="gender" value="woman">
</td>
</tr>
<tr height="35px" bgcolor="whitesmoke">
<td align="right">ํ์กํ :</td>
<td>
<select name="blood">
<option value="a">Aํ</option>
<option value="b">Bํ</option>
<option value="o">Oํ</option>
<option value="ab">ABํ</option>
</select>
</td>
</tr>
<tr height="35px" bgcolor="whitesmoke">
<td align="right">์์ผ :</td>
<td>
<input type="date" name="birth">
</td>
</tr>
<tr>
<th colspan="2" bgcolor="gray" height="50px" align="left">Step3 : ์ ํธ๋</td>
</tr>
<tr height="35px" bgcolor="whitesmoke">
<td align="right">์ทจ๋ฏธ :</td>
<td>
์ถ๊ตฌ<input type="checkbox" name="hobby" value="soccer">
์ผ๊ตฌ<input type="checkbox" name="hobby" value="baseball">
๋๊ตฌ<input type="checkbox" name="hobby" value="basketball">
</td>
</tr>
<tr height="35px" bgcolor="whitesmoke">
<td align="right">์ข์ํ๋ ์๊น :</td>
<td>
<input type="color">
</td>
</tr>
<tr>
<th colspan="2" bgcolor="gray" height="50px" align="left">Step4 : ์ ๊ณ ์ถ์ ๋ง</td>
</tr>
<tr height="35px" bgcolor="whitesmoke">
<td colspan="2"><textarea cols="56" rows="5"></textarea></td>
</tr>
<tr height="35px" bgcolor="whitesmoke">
<td colspan="2" align="center">
<input type="submit">
<input type="reset">
</td>
</tr>
</table>
</form>
</body>
</html>
'full stack > HTML, CSS' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
CSS ๋ฐ์ค๋ชจ๋ธ (2023.04.27) (0) | 2023.04.27 |
---|---|
CSS, HTML ๊ณต๊ฐ๋ถํ ํ๊ทธ (2023.04.26) (0) | 2023.04.26 |
WEB & HTML ์ ์์ ์ญ์ฌ / HTML ํ๊ทธ (2023.04.21) (1) | 2023.04.23 |
CSS ๋ ์ด์์ : Position, Flex (0) | 2023.03.08 |
HTML ํต์ฌ ๊ฐ๋ (0) | 2023.03.06 |