span์ ์ธ๋ผ์ธํ๊ทธ๋ค
๊ฐ์กฐ์์๋ก ์ฌ์ฉ๋๊ณค ํจ
<h2>๋ธ๋ญ์์ vs ์ธ๋ผ์ธ์์</h2>
<div style="background-color: lightcoral;">div</div>
<p style="background-color: antiquewhite; width: 100px; height: 100px;">p</p>
๋ธ๋ก์์๋ ๋๋น/๋์ด ์์ฑ์ ์ง์ ํด์ค ์ ์๊ณ , ๋ณ๋์ ์ฌ์ด์ฆ๋ฅผ ์ฃผ์ง ์์ผ๋ฉด ๊ธฐ๋ณธ์ฌ์ด์ฆ ๋๋น๋ ๋ถ๋ชจ๋๋น 100%์ด๋ค.
๋์ด(auto)๋ ์ฝํ
์ธ ๋์ด๋ค. ์ฌ๋ฌ๊ฐ์ธ ๊ฒฝ์ฐ ์ธ๋ก๋ฐฐ์น๋ฅผ ํ๋ฉฐ ํ์ค์ ๋ค ์ฐจ์งํ๋ค.
<a href="#" style="background-color: lightskyblue; width: 200px;">aํ๊ทธ</a> <img src="imgs/0401-1.jpg" alt="" width="100">
ใด์ฌ๊ธฐ์ width๋ ์ ์ฉ ์๋
<span style="background-color: lightskyblue;">spanํ๊ทธ</span>
<span style="background-color: lightskyblue;">
์ธ๋ผ์ธ์์ ์์๋ ๋ธ๋ก์์๊ฐ ์กด์ฌํ ์ ์๋ค. (์กด์ฌํ๋ค๋ฉด ์ ํจ์ฑ์ ์ด๊ธ๋จ)
***์ธ๋ผ์ธ ์์์ ํ์์์์ ๋ธ๋ก์์๊ฐ ์กด์ฌํ๋ ๊ฒฝ์ฐ ๋ถ๋ชจ(์ธ๋ผ์ธ) ์์์ display์ํ๋ฅผ ๋ฐ๊ฟ์ผํจ***
์ด๋ฆ์ ์ ์จ์ผ ์์น๊ฐ ์ ๋ง์๋ค์ด๊ฐ
์ ํจ๊ฒฝ๋ก๊ฐ์ ๋๋?
placeholder="asdf" <ํ ์คํธ ์์ฑ์ ์๋์ผ๋ก ์ง์์ง๋ ๊ธ
<form>
์์ด๋: <input type="text" name="id" placeholder="placeholder"><br>
์ด๋ฉ์ผ: <input type="email" name="email" placeholder="email"><br>
URL: <input type="url" name="url" placeholder="url"><br>
์ ํ๋ฒํธ: <input type="tel" name="tel" placeholder="tel"><br>
์์: <input type="color" name="color"><br>
์: <input type="month" name="month"><br>
๋ ์ง: <input type="date" name="date"><br>
์ฃผ: <input type="month" name="week"><br>
์๊ฐ: <input type="time" name="time"><br>
์ง์ญ ์๊ฐ:<input type="datetime-local" name="local"><br>
์ซ์: <input type="number" name="number" min="1" max="10" placeholder="1~10"><br>
๋ฒ์: <input type="range" name="range" min="1" max="10" step="2"><br>
</form>
<form>
<h2>ํ์ ๊ฐ์
ํ๋ฉด</h2>
<label for="name">์ด๋ฆ: </label>
<input type="text" name="name" placeholder="์ด๋ฆ"><br>
<label for="adress">์ฃผ์: </label>
<input type="text" name="adress" placeholder="์ฃผ์"><br>
<label for="email">์ด๋ฉ์ผ: </label>
<input type="email" name="email" placeholder="asdf@naver.com"><br>
<label for="gender"></label>
<input type="radio" name="gender" value="Male" checked> Male<br>
<input type="radio" name="gender" value="Female"> Female<br>
์ทจ๋ฏธ:<br>
<input type="checkbox" name="else" value="value1" checked> ์ถ๊ตฌ
<input type="checkbox" name="else" value="value2"> ๋ฐฐ๊ตฌ
<input type="checkbox" name="else" value="value3"> ์ผ๊ตฌ
<input type="checkbox" name="else" value="value4"> ๋ฐฐ๋๋ฏผํด
<br>
<input type="submit" value="Send"><!--value๊ฐ ์์ผ๋ฉด ๊ธฐ๋ณธ์ด ์ ์ถ-->
<input type="reset" value="์ด๊ธฐํ"><!--value๊ฐ ์์ผ๋ฉด ๊ธฐ๋ณธ์ด ์ด๊ธฐํ-->
</form>