HTML κΈ°μ΄
λ©λͺ¨μ₯(ctrl + r > memopad )μ μλ μ²λΌ μ λ ₯
<html>
<head>
<title>첫 νμ΄μ§</title>
</head>
<body>
μλ
νμΈμ.
</body>
</html>
λ€λ₯Έμ΄λ¦μΌλ‘ .htmlλ‘ μ μ₯ νμ λͺ¨λ νμΌλ‘ μ μ₯ ν μ΄λ©΄
μλμ κ°μ΄ λ§λ€μ΄μ§λ€.
html νμΌμμ± μμΉ
webapp ν΄λμ html νμΌ μμ±
νμΌλͺ λͺ¨λ μλ¬Έμλ‘ !
-
htmlμ νκ·Έλ‘ μ½λκ° κ΅¬μ±
νκ·Έ : <>λ‘ μμ±λ λͺ¨λ κΈμ.
λλΆλΆ μ¬λ νκ·Έμ λ«λ νκ·Έλ‘ μ§μ μ΄λ£Έ.
<title>Insert title here</title>
μ¬λ νκ·Έ λ«λ νκ·Έ
html μ½λλ <html> νκ·Έ μμ μμ±.
<html>
μ¬κΈ°μ λ΄μ© μμ±ν΄μΌ ν¨.
<head> ν€λ μμ
ν΅μμ μΈ μ€μ λ° μ λͺ© μμ±
</head>
<body> λ°λ μμ
νλ©΄μ 보μ΄λ μ½λ μμ±
</body>
</html>
html μ£Όμ λ¬Έλ²
ctrl + shift + /
-
<!--μ¬κΈ°κ° μ£Όμμ λλ€. -->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
μλ νμΈμ. λ°κ°μ΅λλ€.
λ λ§λμ.
</body>
</html>
-
htmlμ 곡백μ μ무리 λ§μ΄ λ£μ΄λ νλλ§ μΈμ
κ°νμ ν΄μ μ½λλ₯Ό μμ±ν΄λ κ²°κ³Όλ¬Όμ κ°νμ΄ λ°μλμ§ μλλ€.
<br> νκ·Έ μ°λ©΄ κ°ν κ°λ₯
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
μλ νμΈμ. λ°κ°μ΅λλ€.
λ λ§λμ.
<br> <!--br νκ·Έλ μ€ λ°κΏ νκ·Έ, μ¬λ νκ·Έλ§ μ‘΄μ¬. -->
λ€μ λ§λμ.<br>
<h1>μ λͺ©1</h1> <!--h1~6 νκ·Έλ μ λͺ© μμ± νκ·Έ, μ€ λ°κΏ λ΄μ©λ μλ ν¬ν¨ -->
<h2>μ λͺ©2</h2>
<h6>μ λͺ©6</h6>
</body>
</html>
-
-
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
μλ νμΈμ. λ°κ°μ΅λλ€.
λ λ§λμ.
<br> <!--br νκ·Έλ μ€ λ°κΏ νκ·Έ, μ¬λ νκ·Έλ§ μ‘΄μ¬. -->
λ€μ λ§λμ.<br>
<h1>μ λͺ©1</h1> <!--h1~6 νκ·Έλ μ λͺ© μμ± νκ·Έ, μ€ λ°κΏ λ΄μ©λ μλ ν¬ν¨ -->
<h2>μ λͺ©2</h2>
<h6>μ λͺ©6</h6>
<p> pνκ·Έλ λ¬Έλ¨μ λνλ΄λ νκ·Έμ λλ€. </p> <!--μ€ λ°κΏλ μλ ν¬ν¨ -->
<p> pνκ·Έλ λ¬Έλ¨μ λνλ΄λ νκ·Έμ λλ€. </p>
</body>
</html>
-
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<!--aνκ·Έλ‘ λ€λ₯Έ νμ΄μ§λ‘μ λ§ν¬λ₯Ό κ±Έ μ μλ€.-->
<!--aνκ·Έλ‘ κ°μΈμ§ κΈμ ν΄λ¦ μ νμ΄μ§ μ΄λ -->
<!--hrefμμ±μ μμ±λ κ³³μΌλ‘ μ΄λ. -->
<!--μμ± μμ±λ² : μμ±λͺ ="μμ±κ°"-->
<a href="https://www.naver.com">www.naver.com</a>
</body>
</html>
-
htmlμ λμλ¬Έμ κ΅¬λΆ μμ!
<A href="https://www.naver.com">www.naver.com</A> λ κ°λ₯νλ€.
-
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<!--aνκ·Έλ‘ λ€λ₯Έ νμ΄μ§λ‘μ λ§ν¬λ₯Ό κ±Έ μ μλ€.-->
<!--aνκ·Έλ‘ κ°μΈμ§ κΈμ ν΄λ¦ μ νμ΄μ§ μ΄λ -->
<!--hrefμμ±μ μμ±λ κ³³μΌλ‘ μ΄λ. -->
<!--μμ± μμ±λ² : μμ±λͺ ="μμ±κ°"-->
<a href="https://www.naver.com">www.naver.com</a><br>
<a href="https://www.naver.com" target="_blank">www.naver.com</a><br>
<a href="html01.html">htm101.html νμΌλ‘ μ΄λ</a> <!--νμΌλͺ λ£μ΄μ μ΄λ κ°λ₯-->
</body>
</html>
hrefμμ±μ κ·Έ νμμ λ§ν¬κ° λ°λ‘ μ΄λ¦Ό
taget μμ±μ μΆκ°νλ©΄ μ νμμ λ§ν¬ μ΄λ¦Ό
-
μ΄λ―Έμ§ λ£κΈ°
μ΄λ―Έμ§ νκ·Έμμ src μμ±μ νμ!
src="μ΄λ―Έμ§νμΌλͺ .νμ₯μ" β νμ₯μ λͺ κΉμ§ λμλ¬Έμ λκ°μ΄ μ¨μΌ ν¨.width="μ΄λ―Έμ§ν¬κΈ° ex)300px"
<img src="dog01.jpg" width="300px">
-
ν λ£κΈ°
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<!-- ν λ§λ€κΈ° -->
<table border="1"> <!-- κΈ°λ³Έμ ν λλ¦¬κ° μμ -->
<tr>
<td>1</td> <!-- td : μ΄ λ§λλ νκ·Έ -->
<td>2</td>
<td>3</td>
</tr> <!-- tr : table row : ν λ§λλ νκ·Έ-->
<tr>
<td>4</td>
<td>5</td>
<td>6</td>
</tr>
</table>
</body>
</html>

-
νμ λ¨Όμ λ§λ€κ³ ν μμ μ΄μ λ§λ€μ΄μΌ ν¨!
ν,μ΄ νλΆν° λ§λ€κ³ λ΄μ© λ£μ΄μ£ΌκΈ°.
λͺ¨λ νμ μ΄ κ°―μλ₯Ό λ§μΆλ κ² μ’μ
<tr> ν λ§λλ νκ·Έ
<td> μ΄ λ§λλ νκ·Έ
tableμ κΈ°λ³Έ ν λλ¦¬κ° μμ΄μ
border="1"λ‘ κΈ°λ³Έ ν λ리 λ§λ€μ΄ μ€ μ μμ
-
ν μ΄λΈ λ§λ€κΈ° μ°μ΅1.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<table border="1">
<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>
-
ν μ΄λΈ λ³ν©
첫λ²μ§Έ νμ 2μ΄κ³Ό 3μ΄μ λ³ν©νκ³ 2μ΄μ λ°μ΄ν°λ₯Ό λ¨κΈ°κΈ°.
μ΄ λ³ν© : colspan="λ³ν©ν μ«μ κ°―μ"
-
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<table border="1">
<tr>
<td>κΉμλ°</td>
<td colspan="2">μ΄μλ°</td>
</tr>
<tr>
<td>μ΅μλ°</td>
<td>μμλ°</td>
<td>μ μλ°</td>
</tr>
<tr>
<td colspan="3">μ€μλ°</td>
</tr>
</table>
</body>
</html>

-
ν λ³ν© : rowspan="λ³ν©ν μ«μ κ°―μ"
μ ν μ΄λΈμμ κΉμλ°μ μ΅μλ° λ³ν©, μ μλ° λ°©μλ° λ³ν©
-
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<table border="1">
<tr>
<td rowspan="2">κΉμλ°</td>
<td>μ΄μλ°</td>
<td>λ°μλ°</td>
</tr>
<tr>
<td>μμλ°</td>
<td rowspan="2">μ μλ°</td>
</tr>
<tr>
<td>μ€μλ°</td>
<td>μ₯μλ°</td>
</tr>
</table>
</body>
</html>
-
ν μ΄λΈ ν, μ΄ λ³ν© μ°μ΅
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<table border="1">
<tr>
<td rowspan="2">1</td>
<td colspan="2">2</td>
</tr>
<tr>
<td>3</td>
<td rowspan="2">5</td>
</tr>
<tr>
<td colspan="2">4</td>
</tr>
</table>
</body>
</html>
