<table>
<tr>
, table row<td>
, table data<th>
, table header(μ€μ) λͺ¨λ μ
μ λλΉμ ν© == ν
μ΄λΈ λλΉ
(μ€μ) λͺ¨λ μ
μ λμ΄μ ν© == ν
μ΄λΈ λμ΄
<h1>2ν 2μ΄ ν
μ΄λΈ</h1>
<table border="1" width="200" height="200">
<tr> <!-- μ¬κΈ°λ width, height μμ -->
<td width="100" height="100">1</td> <!-- ν
λ리 λΉΌκ³ 100μ. μ«μκ° μλ§μΌλ©΄ λΉμ¨λ‘ μ μ© -->
<td width="100">2</td>
</tr>
<tr>
<td height="100">3</td> <!-- ν
μ΄λΈμ΄ λμ΄λ¨. 보λ 3κ° λμ΄λ§νΌ μΆκ°λ‘ λμ΄λ¨. λλΉλx λμ΄λ λμ΄λ¨ -->
<td>4</td>
</tr>
</table>
<th>
<!-- *** κ°κ°μ <tr>λ΄μ <td>κ°μλ λμΌν΄μΌνλ€. -->
<h1>κ°λ‘ μ
λ³ν©</h1>
<table border width="200" height="200">
<tr>
<td colspan="2">1</td>
</tr>
<tr>
<td>3</td>
<td>4</td>
</tr>
</table>
<h1>μΈλ‘ μ
λ³ν©</h1>
<table border width="200" height="200">
<tr>
<td rowspan="2">1</td>
<td>2</td>
</tr>
<tr>
<td>4</td>
</tr>
</table>
<form>
+ <form>
μ μμ νκ·Έλ€...<form>
<form method="POST" action="ex18_server.jsp">
λμ΄: <input type="text" name="age"> <br>
<input type="submit" value="보λ΄κΈ°">
</form>
<input>
ν
μ€νΈ λ°μ€(λ¨μΌ λΌμΈ):
<input
type="text"
name="txt1"
id="txt1"
class="txt"
size="30"
value="Hong"
accesskey="s"
autofocus
autocomplete="off"
/>
ν
μ€νΈ λ°μ€(μνΈ): <input type="password" />
<textarea>
<textarea cols="50" rows="5" style="resize: none">
νλ
λ
μ
</textarea>
체ν¬λ°μ€: <input type="checkbox" />
<input type="radio" name="rbGender" /> λ¨μ
!-- λλκ·Έν΄μ μ¬λ¬κ° κ°λ₯ -->
<select size="5" multiple>
<option>κ°μμ§</option>
<option>κ³ μμ΄</option>
<option>λ³μ리</option>
</select>
μ
λ νΈ λ°μ€:
<select>
<optgroup label="μλ°">
<option>ν΄λμ€</option>
<option>λ©μλ</option>
<option>λ°°μ΄</option>
</optgroup>
<optgroup label="μ€λΌν΄">
<option>ν
μ΄λΈ</option>
<option>μλΈμΏΌλ¦¬</option>
<option>μ‘°μΈ</option>
<option>νλ‘μμ </option>
</optgroup>
<optgroup label="HTML">
<option>νκ·Έ</option>
<option>μν°ν°</option>
<option>PCDATA</option>
</optgroup>
</select>
νμΌ μ ν: <input type="file" />
νλ νκ·Έ: <input type="hidden" />
μ μ‘λ²νΌ: <input type="submit" value="μ μ‘νκΈ°" />
<!-- valueλ μ ν κ°μ΄λ€. -->
<br />
μ·¨μλ²νΌ: <input type="reset" value="μ΄κΈ°ν" /> <br />
<!-- μ΄λ―Έμ§λ²νΌ(=μ μ‘λ²νΌ): <input type="image" src="images/submit.png"> -->
λ²νΌ:
<input
type="button"
value="λ²νΌ"
onclick="location.href='http://naver.com';"
/>
λ²νΌ: <button type="button" value="<img src=''">λ²νΌ</button>
<input type="button" value="<img src=''> λ²νΌ" />
<button><img src="images/button.png" />λ²νΌ</button>
ex01.html ~ ex18.html : HTML 4.01 + XHTML 1.0 (~2014λ
κΉμ§μ μΉ)
ex19.html ~ : HTML 5
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<!-- ex18_server.jsp -->
<h1>μλ² νμ΄μ§</h1>
<%
//μλ° μμ
//int a = 10;
//System.out.println(a);
String txtAge = request.getParameter("age");
String txt1 = request.getParameter("txt1");
%>
<p>λμ΄: <%= txtAge %></p>
<p>λμ΄: <%= txt1 %></p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Insert title here</title>
</head>
<body>
<!-- ex19.html -->
<h1>HTML 5</h1>
<form method="POST" action="ex18_server.jsp">
<input type="submit" value="μ μ‘νκΈ°" />
<hr />
<input type="text" value="μ΄λ¦μ μ
λ ₯νμμ€." onfocus="this.value='';" />
<hr />
<input type="text" placeholder="μ΄λ¦μ μ
λ ₯νμμ€." />
<br />
<input type="password" placeholder="μνΈ μ
λ ₯" />
<br />
<textarea cols="40" rows="5" placeholder="μκΈ° μκ°"></textarea>
<hr />
<h3>λ‘κ·ΈμΈ</h3>
μμ΄λ: <input type="text" required value="aaa" /><br />
μνΈ: <input type="password" required value="111" /><br />
<input type="submit" value="λ‘κ·ΈμΈ" />
<hr />
μ΄λ©μΌ: <input type="email" />
<hr />
URL: <input type="url" />
<hr />
μ νλ²νΈ: <input type="tel" />
<hr />
λμ΄: <input type="number" min="0" max="100" step="10" />
<hr />
λ²μ:
<input
type="range"
onchange="document.getElementById('txt1').value=this.value;"
min="10"
max="120"
step="10"
/>
<br />
<input type="text" id="txt1" size="10" />
<hr />
μμ: <input type="color" onchange="document.body.bgColor=this.value;" />
<hr />
λ μ§ μκ°: <input type="date" />
<br />
<input type="month" />
<br />
<input type="week" />
<br />
<input type="time" />
<br />
<input type="datetime" />
<!-- μ§μ μνλ λ― -->
<br />
<input type="datetime-local" />
<!-- ν΅ν©λ³Έ -->
</form>
</body>
</html>