๐โโ๏ธ HTML์ด๋,
Hyper Text Markup Language์ ์ฝ์ด๋ก HyperText(์น ํ์ด์ง์์ ๋ค๋ฅธ ํ์ด์ง๋ก ์ด๋ํ ์ ์๋๋ก ํ๋ ๊ฒ)๊ธฐ๋ฅ์ ๊ฐ์ง ๋ฌธ์๋ฅผ ๋ง๋๋ ์ธ์ด
๐ HTML ํ๊ทธ์ ์ข ๋ฅ
1) ๊ธ์๊ด๋ จํ๊ทธ
2) ๋ชฉ๋ก๊ด๋ จํ๊ทธ
3) ํ๊ด๋ จํ๊ทธ
4) ์์ญ๊ด๋ จํ๊ทธ
5) ๋ฉํฐ๋ฏธ๋์ด๊ด๋ จํ๊ทธ
6) ํ์ดํผ๋งํฌ๊ด๋ จํ๊ทธ
7) ํผ๊ด๋ จํ๊ทธ
<hn>
<hr>
<br>
br ํ๊ทธ๋<br/>์ค์ ๋ฐ๊พธ๋ ํ๊ทธ์
๋๋ค.
<p>
<pre>
<p>
p ํ๊ทธ๋ ๋ฌธ๋จ ์์ญ์ ๋๋๋ ํ๊ทธ์ด์ง๋ง
ํ๋์ ๊ณต๋ฐฑ๋ง ํ์ํ๋ฉฐ
์ค ๋ฐ๊ฟ ์
๋ ฅ์ ๋ณ๋์ ํ๊ทธ๋ก ์ง์ ํด์ฃผ์ด์ผํ๋ค.
</p>
<pre>
pre ํ๊ทธ๋ ์ฌ๋ฌ์นธ ๋์ฐ๊ธฐ
ํน์ ์ค ๋ฐ๊ฟ ๋ฑ์ ํฌํจํ์ฌ
์
๋ ฅํ ๋ด์ฉ ๊ทธ๋๋ก ํํํ๋ ํ๊ทธ์ด๋ค.
</pre>
<b>
<strong>
<i>
<em>
<mark>
<u>
<small>
<sub>
<sup>
<s>
<abbr>
<abbr title="Internet of Things">IoT</abbr>๋ ๊ฐ์ข
์ฌ๋ฌผ์ ์ผ์์
ํต์ ๊ธฐ๋ฅ์ ๋ด์ฅํด ์ธํฐ๋ท์ ์ฐ๊ฒฐํ๋ ๊ธฐ์ ์ด๋ค.
<ul>
<li>
<ul>
<li>HTML5</li>
<li>CSS3</li>
<li>JavaScript</li>
<li>jQuery</li>
</ul>
<ol>
<li>
<ol>
<li>HTML5</li>
<li>CSS3</li>
<li>JavaScript</li>
<li>jQuery</li>
</ol>
์๋ฌธ ์๋ฌธ์๋ก ํ๊ธฐ
<ol type="a">
์๋ฌธ ๋๋ฌธ์๋ก ํ๊ธฐ
<ol type="A">
๋ก๋ง ์ซ์ ์๋ฌธ์๋ก ํ๊ธฐ
<ol type="i">
๋ก๋ง ์ซ์ ๋๋ฌธ์๋ก ํ๊ธฐ
<ol type="I">
์์ ์ซ์ ๋ณ๊ฒฝ
<ol type="1" start="11">
์ญ์์ผ๋ก ์๋ฌธ ๋๋ฌธ์๋ก ํ๊ธฐ
<ol type="A" reversed="reversed">
<dl>
<dt>
<dd>
<dl>
<dt>์ด๊ณณ์ ๋ชฉ๋ก์ ์ ๋ชฉ์ ์ ๋ ๊ณณ์
๋๋ค.</dt>
<dd>์ด๊ณณ์ ๋ชฉ๋ก์ ๋ํ ์ค๋ช
์ ์ ๋ ๊ณณ์
๋๋ค.</dd>
<dd>์ฌ๋ฌ ์ค์ ์์ฑ ํ ์๋ ์์ต๋๋ค.</dd>
<dt>๋ ๋ค๋ฅธ ๋ชฉ๋ก์ ์ ๋ชฉ์ ์ ์ด ์๋ก์ด ๋ชฉ๋ก์ ๋ง๋ค ์๋ ์์ต๋๋ค.</dt>
<dd>์๋ก์ด ๋ชฉ๋ก๋ ์ค๋ช
์ ์์ฑํ ์ ์์ผ๋ฉฐ</dd>
<dd>์ญ์ ์ฌ๋ฌ ์ค์ ์์ฑํ ์ ์์ต๋๋ค.</dd>
<dd>๋ชฉ๋ก ๋ณ๋ก ์ค๋ช
์ ํ์ํ ํ์ ๋ค๋ฅด๊ฒ ํ ์๋ ์์ต๋๋ค.</dd>
</dl>
<table>
: ํ
์ด๋ธ ์์ฑ
<caption>
: ํ
์ด๋ธ์ ์ ๋ชฉ์ด๋ ๋ด์ฉ ์ถ๊ฐ
<tr>
: ํ ๊ฐ์ ํ ์์ฑ
<td>
: ํ ๊ฐ์ ์ด ์์ฑ
<th>
: ์ด์ ๋ํ ์ ๋ชฉ ํ์(๊ฐ์ด๋ฐ ์ ๋ ฌ, ๊ตต๊ฒ)
border
: table์ ํ
๋๋ฆฌ ๋๊ป ์ง์ (์๋ต ๊ฐ๋ฅ)
<table border="1px">
<caption><b>์น ๋ธ๋ผ์ฐ์ ์ ์ข
๋ฅ</b></caption>
<tr>
<th>๋ธ๋ผ์ฐ์ ๋ช
</th><th>์ ์กฐ์ฌ</th><th>ํํ์ด์ง</th>
</tr>
<tr>
<td>์ต์คํ๋ก๋ฌ</td><td>MS</td><td>http://www.microsoft.com</td>
</tr>
<tr>
<td>ํฌ๋กฌ</td><td>๊ตฌ๊ธ</td><td>http://www.google.com</td>
</tr>
<tr>
<td>์ฌํ๋ฆฌ</td><td>์ ํ</td><td>http://www.apple.com</td>
</tr>
<tr>
<td>ํ์ด์ดํญ์ค</td><td>Mozilla</td><td>http://www.mozilla.com</td>
</tr>
</table>
<table border="1px">
<tr>
<td colspan="2" rowspan="2" width="130px" height="130px">์ฌ์ง</td>
<td width="80px">์ด๋ฆ</td>
<td width="200px"></td>
</tr>
<tr>
<td>์ฐ๋ฝ์ฒ</td>
<td></td>
</tr>
<tr>
<td width="70px" height="50px">์ฃผ์</td>
<td colspan="3"></td>
</tr>
<tr>
<td height="100px">์๊ธฐ์๊ฐ</td>
<td colspan="3"></td>
</tr>
</table>
<thead>
<tbody>
<tfoot>
<table border="1px">
<thead>
<tr>
<th>์ด๋ฆ</th>
<th>๋์ด</th>
<th>์ฃผ์</th>
</tr>
</thead>
<tbody>
<tr>
<td>ํ๊ธธ๋</td>
<td>20</td>
<td>์์ธ์ ์ข
๋ก๊ตฌ</td>
</tr>
</tbody>
<tbody>
<tr>
<td>์ ๊ด์</td>
<td>16</td>
<td>์์ธ์ ์ข
๋ก๊ตฌ</td>
</tr>
<tr>
<td>์ ๋์ฌ์</td>
<td>30</td>
<td>์์ธ์ ์ข
๋ก๊ตฌ</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="2">์ด ์ธ์</td>
<td>3๋ช
</td>
</tr>
</tfoot>
</table>
<style> /* ๋ด๋ถ ์คํ์ผ์ํธ (CSS) */
table { background-color: yellow;}
thead { background-color: burlywood;}
tbody { background-color: wheat;}
tfoot { background-color: cornsilk;}
</style>
<div>
: ํ ์ค์ ์ฐจ์งํ๊ณ ๊ณต๊ฐ์ ์ํ์ผ๋ก ๋ถํ ํ๋ block ํ์
<span>
: ์ค๋ฐ๊ฟ์ด ์ผ์ด๋์ง ์๊ณ ์์ผ๋ก ์์ญ์ด ์ค์ . ๊ณต๊ฐ์ ์์ง์ผ๋ก ๋ถํ ํ๋ inline ํ์
<div id="div1"> <!-- ๋ธ๋ญ ํ์-->
์ฒซ ๋ฒ์งธ ์์ญ
</div>
<div id="div2">
๋ ๋ฒ์งธ ์์ญ<br>
์ฒซ ๋ฒ์งธ ์์ญ ๋ค์ ์ค์<br>
์์ญ์ด ์ค์ ๋จ
</div>
<div id="div3">
์ธ ๋ฒ์งธ ์์ญ<br>
๋ ๋ฒ์งธ ์์ญ ๋ค์ ์ค์<br>
์์ญ์ด ์ค์ ๋จ
</div>
<span id="span1">์ฒซ ๋ฒ์งธ ์์ญ</span>
<span id="span2">๋ ๋ฒ์งธ ์์ญ</span>
<span id="span3">์ธ ๋ฒ์งธ ์์ญ</span>
<iframe>
: ์น ๋ฌธ์ ์์ ๋ค๋ฅธ ์น ํ์ด์ง๋ฅผ ์ถ๊ฐํ๋ ํ๊ทธ์ด๋ฉฐ inline ํ์
<iframe width="400px" height="800px" src="1_๊ธ์๊ด๋ จํ๊ทธ.html"></iframe>
<iframe width="956" height="538" src="https://www.youtube.com/embed/HfaIcB4Ogxk"
title="[Playlist] ์ผํ๋ฉด์ ํ์ด ๋๊ธฐ ์ข์ ์์ํ 8์๊ฐ ์ฌ์ฆ ํ๋ ์ด๋ฆฌ์คํธ | Jazz ๋
ธ๋๋ชจ์ ์นดํ ๊ณต๋ถ ๋
์ ์ฌํ ์ฝ๋ฉ"
frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media;
gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
<header>
<nav>
<section>
<article>
<footer>
<header>
<h1>์ ๋ชฉ</h1>
<nav>
<ul>
<li><a>HOME</a></li>
<li><a>๊ฒ์ํ</a></li>
<li><a>์ฌ์ง์ฒฉ</a></li>
</ul>
</nav>
</header>
<section>
<article> "์ปจํ
์ธ ๋ด์ฉ" </article>
<article> "์ปจํ
์ธ ๋ด์ฉ" </article>
</section>
<footer>
์ฌ์
๋ฒํธ, ์ฌ์
์ ์ฃผ์, ์ฐ๋ฝ์ฒ, ์ ์๊ถ, ๋งํฌ ๋ชจ๋ฌ
</footer>
<img src="../ํด๋๋ช
">
<img src="../sample/image/city1.PNG" alt="๋์์ฌ์ง">
<!-- alt : ์ฌ์ง์ ๊ฒฝ๋ก๊ฐ ์๋ชป๋๊ฑฐ๋ ์ด๋ฏธ์ง๋ฅผ ์ ๋๋ก ํํํ ์ ์๋ ๊ฒฝ์ฐ ๋์ฒด ํ
์คํธ ์ฉ๋๋ก ์ฌ์ฉ-->
width
height
<!-- ๊ณ ์ ํฌ๊ธฐ ๋จ์ (px) / ํ๋ฉด ์ฌ์ด์ฆ๊ฐ ์ค์ด๋ ํฌ๊ธฐ ๋ณํ X -->
<img src="../sample/image/flower1.PNG" width="200px" height="150px">
<!-- ๊ฐ๋ณ ํฌ๊ธฐ ๋จ์ (%) / ํ๋ฉด ์ฌ์ด์ฆ์ ๋ฐ๋ผ ํฌ๊ธฐ ๋ณํ -->
<img src="../sample/image/flower1.PNG" width="15%" height="150px">
<map>
<area shape="" coords="">
<img src="../sample/image/river1.PNG" usemap="#map">
<map name="map">
<area shape="rect" coords="00, 00, 300, 500" href="http://www.naver.com">
<!-- ์ฌ์ง์ ์ผ์ชฝ ๋ฉด์ ์๋ง ๋งํฌ ์ค์ -->
<area shape="circle" coords="450, 250, 150" href="http://www.google.com">
<!-- ์ฌ์ง์ ์ค๋ฅธ์ชฝ ์ ๋ฉด์ ์๋ง ๋งํฌ ์ค์ -->
</map>
<audio src="../ํด๋๋ช
">
<audio src="../sample/audio/music.mp3" controls="controls" loop="loop"></audio>
<!-- controls : ์ฌ์๋ฐ์ค ์์ฑ / loop : ๋ฐ๋ณต์ฌ์ -->
<video src="../ํด๋๋ช
">
<video src="../sample/video/video.mp4" controls="controls" poster="../sample/image/flower1.PNG"></video>
<!-- poster : ์ธ๋ค์ผ -->
<a href="">
<ul><!-- ๊ธ์จ๋ฅผ ํด๋ฆญํ๋ฉด ์
๋ ฅํ ๋งํฌ๋ก ๋ฐ๋ก ํ์ด์ง ์ด๋-->
<!-- ๊ฐ์ ๊ฒฝ๋ก์ ํ์ผ์ ๊ฐ๋จํ ํ์ผ๋ช
๋ง ์
๋ ฅํด๋ ์ธ์-->
<li><a href="1_๊ธ์๊ด๋ จํ๊ทธ.html">๊ธ์๊ด๋ จํ๊ทธ</a></li>
<li><a href="2_๋ชฉ๋ก๊ด๋ จํ๊ทธ.html">๋ชฉ๋ก๊ด๋ จํ๊ทธ</a></li>
<li><a href="3_ํ๊ด๋ จํ๊ทธ.html">ํ๊ด๋ จํ๊ทธ</a></li>
</ul>
๋คํธ์ํฌ๊ฐ ์ฐ๊ฒฐ์ด ๋์๋ค๋ ๊ฐ์ ํ์ ์ฐ๊ฒฐ ๊ฐ๋ฅ
target="_blank"
: ํ์ด์ง ์ด๋์ด ์๋ ์๋ก์ด ํ์ด์ง๋ก ์ด๋ฆผ
target="_self"
: ํ์ด์ง ์ด๋(๊ธฐ๋ณธ๊ฐ)
<ul>
<li><a href="https://www.naver.com" target="_blank">๋ค์ด๋ฒ</a></li>
<li><a href="https://www.google.com">๊ตฌ๊ธ</a></li>
<li><a href="https://www.daum.net">๋ค์</a></li>
</ul>
<a href=""> <img src="">
<a href="https://www.w3schools.com" target="_blank">
<img src="../sample/image/tower1.PNG" width="150px" height="100px">
</a>
<!-- ์ ํํ ์์ ์ url์ ๋ณด๋ฉด ๋์ #content1,2,3์ด ๊ฐ๊ฐ ์ด๋ํ ๋๋ง๋ค ๋ณ๊ฒฝ -->
<ul>
<li><a href="#content1">๋ณธ๋ฌธ๋ด์ฉ1</a></li>
<li><a href="#content2">๋ณธ๋ฌธ๋ด์ฉ2</a></li>
<li><a href="#content3">๋ณธ๋ฌธ๋ด์ฉ3</a></li>
</ul>
๐ Ref.
* ์ง์ ํ ID(#)๋ก ์ด๋ํ๋ ํ์ดํผ๋งํฌ๊ฐ ์์ฑ (๋ฏธ๋ฆฌ ํด๋น ํฌ์ธํธ์ ID์ง์ ํด์ค์ผํจ)
๐โโ๏ธ Form tag๋,
html ๋ด์์ ์ฌ์ฉ์๊ฐ ์ ๋ ฅํ ์ ์๋ ์์์ ์ ๊ณตํ๋ ํ๊ทธ. form ํ๊ทธ ๋ด์ input ํ๊ทธ๋ค์ ํตํด ์ฌ์ฉ์๊ฐ ์ ๋ ฅํ๋ ์ ๋ณด๋ฅผ ์๋ฒ๋ก ๋๊ธฐ๋ ์ญํ
<form>
<input>
action
: ์๋ฒ์ ๊ฒฝ๋ก
method
: ์ ์ก๋ฐฉ์
for="ID"
: ํด๋น ID์ ํฌ์ปค์ค๋ฅผ ๋์ด ๊ธ์๋ฅผ ํด๋ฆญ ์ input๋ฐ์ค์ ํฌ์ปค์ฑ
required
: ๋ฐ๋์ ํ ์คํธ๋ฅผ ์ ๋ ฅํ ํ ๊ฒ์๋ฒํผ์ ๋๋ฌ์ผํ๋ค๋ ์กฐ๊ฑด
submit
: ์๋ฒ๋ก ์ ์ก(์ ์ถ)
value
: ํ๋ฉด์ ๋ณด์ฌ์ง๋ ๊ธฐ๋ณธ๊ฐ
<form action="" method="get"> <label for="search">๊ฒ์ํ ๋ด์ฉ</label> <!--for์ ์๋์ id์ ํฌ์ปค์ค๋ฅผ ๋ (์ปค์)--> <input type="text" size="30" name="search" id="search" required> <input type="submit" value="๊ฒ์"> </form> <!-- ๊ฒ์์ด๋ฅผ ์ ๋ ฅ ํ, ๊ฒ์์ ๋๋ฅด๋ฉด ์ฃผ์๊ฐ์ ๊ฒ์์ด๊ฐ ๋ํ๋จ(get๋ฐฉ์์ผ๋ก ์๋ฒ์ ์ ์ถํ ํํ)-->
- submit ๋ฒํผ์ ๋๋ ์ ๋ form ํ๊ทธ์ ์ง์ ๋ action ์์ฑ์ ๊ฒฝ๋ก๋ก, method ์์ฑ์์ ์ง์ ํ ๋ฐฉ์์ผ๋ก, form ํ๊ทธ ๋ด๋ถ์ ์๋ input ํ๊ทธ์ ๊ฐ๋ค์ด ์๋ฒ๋ก ์ ์ก.
- method์ ๊ธฐ๋ณธ ์ค์ ์ get๋ฐฉ์์ผ๋ก ๋์ด์๊ณ get๋ฐฉ์์ ๊ฒฝ์ฐ url์ ์ฃผ์?name=value&name=value์ ๊ฐ์ด ๋ฐ์ดํฐ๊ฐ ์ ์ก๋๋ ๋ชจ์ต์ ํ์ธ ๊ฐ๋ฅ.
<fieldset>
: ํผ ์์๋ฅผ ๋ฌถ์ด ๊ทธ๋ฃน์ผ๋ก ์์ฑ
<legend>
: ๋ฌถ์ ํผ ์์๋ค์ ๋ณ์นญ ๋ถ์ฌ
<form>
<fieldset>
<legend>ํ๋ ์
์ ์ ๋ชฉ์ ์์ฑํ๋ ๋ถ๋ถ</legend>
<label>์
๋ ฅ 1 : </label>
<input type="text"><br>
<label>์
๋ ฅ 2 : </label>
<input type="text"><br>
<label>์
๋ ฅ 3 : </label>
<input type="text">
</fieldset>
<fieldset>
<legend>ํ๋ ์
์ผ๋ก ๋ฌถ์ ์์ญ๋ณ๋ก ๊ตฌ๋ถ</legend>
<label>์
๋ ฅ 1 : </label>
<input type="text"><br>
<label>์
๋ ฅ 2 : </label>
<input type="text"><br>
<label>์
๋ ฅ 3 : </label>
<input type="text">
</fieldset>
</form>
type="text"
type="password"
type="search"
type="url"
type="email"
type="tel"
value
: ํ๋ฉด์ ๋ณด์ฌ์ง๋ ๊ธฐ๋ณธ๊ฐ
readonly
: ์์ ๋ถ๊ฐ
placeholder
: input ๋ฐ์ค ์ ์ฐธ๊ณ ๋ด์ฉ ๊ธฐ์
<form>
<lable>์์ด๋ : </lable>
<input type="text" name="userid" size="20" placeholder="์์ด๋๋ฅผ ์
๋ ฅํ์ธ์"
maxlength="15" value="himedia" readonly><br>
<label>๋น๋ฐ๋ฒํธ : </label>
<input type="password" name="userpwd" size="20" placeholder="๋น๋ฐ๋ฒํธ๋ฅผ ์
๋ ฅํ์ธ์"
maxlength="15"><br>
<lable>๊ฒ์ : </lable>
<input type="search" name="searchtext" placeholder="๊ฒ์ํ ๋ด์ฉ ์
๋ ฅ"><br>
<label>ํํ์ด์ง : </label>
<input type="url" name="homepage" value="https://"><br>
<label>์ด๋ฉ์ผ : </label>
<input type="email" name="email" placeholder="์ด๋ฉ์ผ ์
๋ ฅ"><br>
<label>์ ํ๋ฒํธ : </label>
<input type="tel" name="phone" placeholder="์ ํ๋ฒํธ ์
๋ ฅ"><br>
<input type="submit" value="์ ์ก">
<!-- submit : ํ์ฌ์ form ์์ ์๋ input์ ๊ฐ๋ค์ด ์๋ฒ๋ก ์ ์ถ๋จ-->
</form>
๐ Ref.
* type="search", type="url", type="email", type="tel"
๊ฒ๋ชจ์ต์ ํ
์คํธ ํ๋์ ๋น์ทํ์ง๋ง ๊ฐ๊ฐ์ ์ ๋ณด์ ๋ง๊ฒ ๋ถํ๋ ๊ธฐ๋ฅ์ ์ ๊ณตํ๋ ํ
์คํธ ์์
(๊ฒ์์ด๋ฅผ ์
๋ ฅํ๋ฉด xํ์๊ฐ ์๊ฒจ ๋ชจ๋ ์ญ์ ํ๋ ๊ธฐ๋ฅ์ ํฌํจ)
type="number"
: ์
๋ ฅ์ฐฝ์ ์ซ์๋ฅผ ์
๋ ฅ / ์คํ๋ฐ์ค๋ฅผ ํด๋ฆญํ์ฌ ์กฐ์
type="range"
: ์ฌ๋ผ์ด๋ ๋ฐ๋ฅผ ํตํด ์ซ์ ์ง์
step
: ์คํ๋ฐ์ค๋ก ์๋์ ์กฐ์ ํ ๋, ์ค์ ํ ๊ฐ๋งํผ ์ฆ๊ฐ/๊ฐ์
<label>์๋ : </label>
<input type="number" name="amount" min="0" max="100" step="10" value="50">
<input type="range" name="point" min="0" max="100" step="10" value="80"><br>
<input type="submit" value="์ ์ถ">
type="date/month/week/time/datetime-local"
<form>
<label>date : </label>
<input type="date" name="dateIn"><br>
<label>month : </label>
<input type="month" name="dateIn"><br>
<label>week : </label>
<input type="week" name="dateIn"><br>
<label>time : </label>
<input type="time" name="dateIn"><br>
<label>datetime-local : </label>
<input type="datetime-local" name="dateIn"><br>
<input type="submit" value="์ ์ก">
</form>
ํ๊ทธ๋ฅผ ์ฌ๋ฌ ๊ฐ ์ ์ธํ์ฌ ํ๋์ ์ฉ๋๋ก ์ฌ์ฉํ๋ ๊ฒฝ์ฐ name ์์ฑ ๊ฐ์ด ๊ฐ์์ผํจ
type="radio"
: ์ฌ๋ฌ ๊ฐ ์ค ํ๋๋ฅผ ์ ํํ ๋ ์ฌ์ฉ
type="checkbox"
: ์ฌ๋ฌ ๊ฐ๋ฅผ ์ค๋ณต ์ ํํ ๋ ์ฌ์ฉ
checked
: ๊ธฐ๋ณธ์ผ๋ก ์ ํํ ๊ฐ
<form>
<label>์ฑ๋ณ : </label>
<input type="radio" name="gender" id="male" value="M">
<label for="male">๋จ์</label>
<input type="radio" name="gender" id="female" value="F" checked>
<label for="female">์ฌ์</label>
<input type="radio" name="gender" id="unknown" value="X">
<label for="unknown">์๋ฆฌ๊ณ ์ถ์ง์์</label>
<label>์ทจ๋ฏธ : </label>
<input type="checkbox" name="hobby" id="baseball" value="baseball">
<label for="baseball">์ผ๊ตฌ</label>
<input type="checkbox" name="hobby" id="basketball" value="basketball">
<label for="basketball">๋๊ตฌ</label>
<input type="checkbox" name="hobby" id="football" value="football" checked>
<label for="football">์ถ๊ตฌ</label><br>
<input type="submit" value="์ ์ก">
</form>
type="color"
:
type="file"
:
type="hidden"
: ์ฌ์ฉ์๊ฐ ์
๋ ฅํด์ผํ๋ ๊ฐ์ด ์๋, ์ ์ถ์ด ๋๋ ์๊ฐ ๊ฐ์ด ๋์ด๊ฐ์ผ๋ฉด ํ๋ ๊ฐ์ด ์์ ๋ ์ฌ์ฉ
reset
: ํด๋น form ์์ ์ฌ์ฉ์๊ฐ ์
๋ ฅํ ๊ฐ์ ๋ชจ๋ ์ด๊ธฐํํ๊ณ ์ ํ ๋ ์ฌ์ฉ
button
: input์ผ๋ก ๋ง๋ ๋ฒํผ๊ณผ ๋๊ฐ์ ๊ธฐ๋ฅ์ ํ๋ ๋ฒํผ์ ์์ฑ
<form>
<label>์์ ์ ํ : </label>
<input type="color" name="color">
<label>ํ์ผ ์ ํ : </label>
<input type="file" name="uploadfile">
<label>์ ๋ณด์ : </label>
<input type="hidden" name="hiddenvalue" value="1">
<h3>type="button", type="submit", type="reset"</h3>
<input type="button" value="button">
<input type="submit" value="submit">
<input type="reset" value="reset">
<button type="button">button</button>
<button type="submit">submit</button>
<button type="reset">reset</button>
</form>
๐ Ref.
* buttonํ๊ทธ๋ฅผ ์ด์ฉํด์ ๋ฒํผ์ ๋ง๋ค ๋, form ํ๊ทธ ์์ button ํ๊ทธ์ type์ ๊ธฐ์ฌํ์ง
์์์ ๊ฒฝ์ฐ default type์ด submit์ด๋ฏ๋ก ๋ฐ๋์ ํ์
์ ๊ธฐ์ฌ
<select>
<option>
selected
: ๊ธฐ๋ณธ์ผ๋ก ์ ํํ ๊ฐ
<form>
<label>๊ตญ์ : </label>
<select name="nationality">
<option value="ko">ํ๊ตญ</option>
<option value="ch">์ค๊ตญ</option>
<option value="jp">์ผ๋ณธ</option>
<option value="etc" selected>๊ธฐํ</option> <!-- selected : ๊ธฐ๋ณธ๊ฐ -->
<!-- ์๋ฒ๋ก ๋ณด๋ผ ๋, 'ํ๊ตญ'์ด ์๋ national code๋ฅผ ๋ณด๋ด๊ณ ์ถ๋ค๋ฉด value์ ๋ฐ๋ก ๊ธฐ์ฌ-->
</select>
<input type="submit">
</form>
<textarea>
: input type="text"์ ๋น์ทํ์ง๋ง ์ฌ๋ฌ ์ค ์
๋ ฅ ๊ฐ๋ฅ
style="resize:none
: ํ
์คํธ ๋ฐ์ค์ ํฌ๊ธฐ๋ฅผ ์กฐ์ ํ์ง ๋ชป ํ๊ฒ fix
<form>
<textarea cols="70" rows="10" style="resize:none;">ํ
์คํธ ์
๋ ฅ...</textarea>
</form>