๐Ÿ“ฆ TIL) Tag๋Š” Box์™€ Item!

Solmiiยท2020๋…„ 4์›” 17์ผ
3

HTML

๋ชฉ๋ก ๋ณด๊ธฐ
1/4
post-thumbnail

๐Ÿค“ Tag๋ž€?

โ˜๏ธ tag๋Š” content๋ฅผ ๊ฐ์‹ธ์„œ ๊ทธ ์ •๋ณด์˜ ์„ฑ๊ฒฉ๊ณผ ์˜๋ฏธ๋ฅผ ์ •์˜ํ•œ๋‹ค!
tag๐Ÿค˜ tag๋Š” Box์™€ Item์œผ๋กœ ๋‚˜๋‰œ๋‹ค!

ItemBoxBox+Item
ContentTagElement

๐Ÿ‘€ ๋ง‰๊ฐ„! HTML ์„น์…˜ ์ด๋ฏธ์ง€๋กœ ๋ณด๊ธฐhtml cection=> main์•ˆ์—์„œ๋„ ๋˜ section์ด ๋‚˜๋‰˜์–ด์ง„๋‹ค!


๐Ÿ“จ Item (์‹ค์ œ ์‚ฌ์šฉ์ž์˜ ๋ˆˆ์— ๋ณด์ž„)

  • Item ์•ˆ์—์„œ๋„ Block๊ณผ Inline์œผ๋กœ ๋‚˜๋‰œ๋‹ค!
    • Block : ๊ณต๊ฐ„์ด ์ถฉ๋ถ„ํ•ด๋„ ํ•œ ์ค„์— ํ•˜๋‚˜
    • Inline : ๊ณต๊ฐ„์ด ์ถฉ๋ถ„ํ•˜๋ฉด ํ•œ ์ค„์— ์—ฌ๋Ÿฌ๊ฐœ
      block,inline

๐Ÿ’๐Ÿปโ€โ™€๏ธ ๋Œ€ํ‘œ์ ์ธ Item Tag

  • a (๋งํฌ๋ฅผ ๊ฑธ์–ด์ค€๋‹ค)
  • video / audio / img
  • input / label
    - ๊ต‰์žฅํžˆ ์ž์ฃผ ์‚ฌ์šฉํ•˜๋Š” tag => ์‚ฌ์šฉ์ž์—๊ฒŒ ์ •๋ณด๋ฅผ ๋ฐ›์„ ์ˆ˜ ์žˆ๊ธฐ ๋•Œ๋ฌธ!
    - input๊ณผ label tag๋ฅผ ํ•จ๊ป˜ ์‚ฌ์šฉ => label์„ ํ†ตํ•ด ์‚ฌ์šฉ์ž์—๊ฒŒ ์–ด๋–ค ์ •๋ณด๊ฐ€ ํ•„์š”ํ•œ์ง€ ๋ช…ํ™•ํ•˜๊ฒŒ ์ „๋‹ฌ ๊ฐ€๋Šฅ
    - ๋งŽ์€ input์„ ์‚ฌ์šฉํ•  ๊ฒฝ์šฐ id๋กœ ๊ณ ์œ  ์‹๋ณ„์ž๋ฅผ ๋ถ€์—ฌํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ, label๋กœ for๋ฅผ ํ†ตํ•ด input๊ณผ ๊ทธ๋ฃนํ™” ํ•  ์ˆ˜ ์žˆ์Œ
  • map / canvas
  • table

๐Ÿ“ฆ Box (Item๋“ค์˜ sectioning์„ ๋„์™€์ฃผ๊ณ , ์‚ฌ์šฉ์ž์˜ ๋ˆˆ์—๋Š” ๋ณด์ด์ง€ ์•Š์Œ)

๐Ÿ’…๐Ÿป ๋‚˜์ค‘์— CSS๋กœ ์Šคํƒ€์ผ๋ง์€ ๊ฐ€๋Šฅํ•˜์ง€๋งŒ HTML์—์„œ๋Š” ๋ณด์ด์ง€ ์•Š์Œ

๐Ÿ’๐Ÿปโ€โ™€๏ธ ๋Œ€ํ‘œ์ ์ธ Box Tag

  • header / nav / footer
  • main / section / aside
  • main ์•ˆ์—์„œ๋„ section,article๋“ฑ์œผ๋กœ ๊ณ„์† ๋‚˜๋ˆ„์–ด์ง
  • article
  • ์—ฌ๋Ÿฌ๊ฐ€์ง€ item๋“ค์„ ๊ทธ๋ฃนํ™”ํ•ด์„œ ์žฌ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ item๋“ค์ด ๋ชจ์•„์ ธ์žˆ์Œ
    ๐Ÿ™‹๐Ÿปโ€โ™€๏ธ ์žฌ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ?
    article=> ์œ„ ์ด๋ฏธ์ง€์ฒ˜๋Ÿผ ๋ฐ˜๋ณต๋˜๋Š” ๋™์ผํ•œ content
  • div / span / form

๐Ÿงžโ€โ™‚๏ธ๊ฐ„๋‹จ ์ •๋ฆฌ!

<body>
    <!-- Box VS Item --> =>๋ธŒ๋ผ์šฐ์ €์—์„œ ์ดํ•ดํ•˜๋Š” ์ฝ”๋“œ๊ฐ€ ์•„๋‹Œ, ๊ฐœ๋ฐœ์ž๋ผ๋ฆฌ ๊ณต์œ ํ•˜๋Š” ์ฃผ์„
	    <header></header>
	    <footer></footer>
	    <section></section>
	    <div></div>
	    <span></span> =>Box

	    <h1>H1</h1>
	    <button>click</button> =>Item
      
      
    <!-- a --> =>๋งํฌ๋ฅผ ๊ฑธ ์ˆ˜ ์žˆ๋Š” a tag
	    <a href="https://google.com" target="_blank">Click</a>


    <!-- Block VS Iline -->
     <p>์•ˆ๋…•ํ•˜์„ธ์š”. <b>์ €</b>๋Š”์š”....</p> =>p tag๋Š” ๋ฌธ๋‹จ์„ ์ •์˜ํ•  ๋•Œ ์‚ฌ์šฉ
     <p>์•ˆ๋…•ํ•˜์„ธ์š”. <span>์ €</span>๋Š”์š”....</p>=> Inline ("์ €"์˜ ์ค„์ด ๋ฐ”๋€Œ์ง€ ์•Š์Œ)
     <p>์•ˆ๋…•ํ•˜์„ธ์š”. <div>์ €</div>๋Š”์š”....</p>=> Block ("์ €"์˜ ์ค„์ด ๋ฐ”๋€œ)


    <!-- ol, ul, li --> =>list๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” tag
     <ol type="i" reversed>
       <li>ํ•˜๋‚˜</li>
       <li>๋‘˜</li>
       <li>์…‹</li>
     </ol> =>ol>li*3 ์ž…๋ ฅ ํ›„ tabํ‚ค๋กœ ์‰ฝ๊ฒŒ ์ž…๋ ฅ ๊ฐ€๋Šฅ
  
     <ul>
       <li>Hello</li>
       <li>My</li>
       <li>Name</li>
     </ul> => ul>li*3
  
  
    <!-- Input --> 
      <label for="input_name">Name : </label> =>for="input_name"์œผ๋กœ input_name์œผ๋กœ ์‹๋ณ„๋œ input๊ณผ ๊ทธ๋ฃนํ™”
      <input id="input_name" type="text"> =>id="input_name"์œผ๋กœ ๊ณ ์œ  ์‹๋ณ„์ž ๋ถ€์—ฌ
</body>

์ฝ”๋ฆฐ์ด๊ฐœ๋ฐœ ์™•์ดˆ๋ณด ์ฝ”๋ฆฐ์ด์ž…๋‹ˆ๋‹ค!
์ด ๋‚ด์šฉ์€ ํ˜ผ์ž ๋™์˜์ƒ ๊ฐ•์˜&๊ตฌ๊ธ€๋ง์„ ํ†ตํ•ด ๋ฐฐ์šด ๋‚ด์šฉ์„ ์ •๋ฆฌํ•˜๋Š” ๊ฒƒ์œผ๋กœ, ์ œ๊ฐ€ ์ดํ•ดํ•˜๊ณ  ๋„˜์–ด๊ฐ„ ๊ฐœ๋…์ด ํ‹€๋ ธ๊ฑฐ๋‚˜ ๋” ๋ณด์ถฉํ•  ๊ฐœ๋…์ด ์žˆ๋‹ค๋ฉด ๋Œ“๊ธ€ ๋‚จ๊ฒจ์ฃผ์‹œ๋ฉด ์ •๋ง ๊ฐ์‚ฌํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค!!

profile
ํ•˜๋ฃจ๋Š” ์น˜์—ดํ•˜๊ฒŒ ์ธ์ƒ์€ ์—ฌ์œ ๋กญ๊ฒŒ

0๊ฐœ์˜ ๋Œ“๊ธ€