table - govl2233/project_studyej GitHub Wiki

κΈ°λ³Έ

  • border : table 경계선 κ΅΅κΈ°λ₯Ό 지정 ex) border="10"

  • width : λ„ˆλΉ„λ₯Ό 지정 ex) width:="100%","100px"(%,px)

  • height : 높이λ₯Ό 지정

table

  • ν‘œ

< body > tag μ•ˆμ—< table > tagκ°€ 듀어감

  • tr : table row : κ°€λ‘œμ€„ λ§Œλ“œλŠ” μ—­ν• 
  • td : table data : μ„Έλ‘œμ€„ (μ…€) λ§Œλ“œλŠ” μ—­ν•  ---> th 둜 λ³€κ²½ : 글씨가 λ‘κ»κ²Œ ν‘œμ˜μ œλͺ©μœΌλ‘œ 변경됨
  • < table > μ•ˆμ— < tr > 있고 μ•ˆμ— < td >

  • < table border="" width="" summary="" > --->summary(ν‘œμ—λŒ€ν•œμžμ„Έν•œμ„€λͺ…) μ›λž˜ μœ„μΉ˜μ΄μ§€λ§Œ 밑에닀 써도됨 (ν•„μˆ˜μš”μ†Œμ•„λ‹˜)

  • < caption > ν‘œμ˜μ œλͺ© -->β˜…ν•„μˆ˜μš”μ†Œ (table νƒœκ·Έ μ•ˆμ— caption 이 κΌ­ μžˆμ–΄μ•Όν•¨)

  • < colgroup > ---> 셀에 λŒ€ν•œ width κ°’μ΄λ‚˜ λ””μžμΈμ  μš”μ†Œλ₯Ό μ‚¬μš©ν• λ•Œ 이용(rowgroup μ—†μŒ => scpoe에 λ‚˜μ˜€λŠ” colgroupκ³Ό 닀름)

  • < col width="μ„€μ •" />

  • μ›Ήν‘œμ€€μ˜ μ ‘κ·Όμ„± μˆœμ„œ

  1. < thead > : ν…Œμ΄λΈ”μ•ˆμ˜ 제λͺ©

  2. < tfoot > : ν‘œμ˜ν•©κ³„- ν‘œλ₯Ό λ§Œλ“€κ³  브라우져λ₯Ό ν™•μΈν•˜λ©΄ λ§¨λ°‘μœΌλ‘œ κ°€μžˆλŠ”κ²ƒμ„ 볼수있음.(ν•„μˆ˜μš”μ†Œμ•„λ‹ˆλΌ λΊ„μˆ˜ 있으며 thead도 κ°€λŠ₯)

  3. < tbody > : ν…Œμ΄λΈ”μ•ˆμ˜ λ‚΄μš©

ex)

 < body > 

 < table border="1" width="100%" summary="μ„ΈλΆ€μ„€λͺ…" >  

     < caption >ν‘œμ˜μ œλͺ©< /caption >  
     < colgroup >  
       < col width="100"/ >  
       < col /  >  
       < col width="100"/ >  
       < col / >  
   < /colgroup >  
    < tbody > 
       < tr >  
         < td >text< /td >
       < /tr >
< /tbody >  
< /table >
< /body >

셀병합

colspan

: ( th,tdνƒœκ·Έμ— μ‚¬μš©κ°€λŠ₯ )

  • column span μ•½μžλ‘œ μ…€(κ°€λ‘œμ€„) λ³‘ν•©ν•˜λŠ” μ—­ν•  ( colspan="갯수" )

ex) < th colspan="2" > text < /th > λ˜λŠ” < td colspan="2" > text < /td >

rowspan

  • rowspan 으둜 μ…€ (μ„Έλ‘œμ€„) λ³‘ν•©ν•˜λŠ” μ—­ν•  ( rowspan="갯수" )

ex) < th rowspan="2" > text λ˜λŠ” < td rowspan="2 "> text < /td >

scope

: μ½λŠ”λ°©ν–₯ ( th νƒœκ·Έμ•ˆμ—μ„œλ§Œ μ‚¬μš©κ°€λŠ₯ )

col scope : μ„Έλ‘œλ‘œ μ½λŠ” λ°©ν–₯ (그룹으둜 묢인것을 μ„Έλ‘œλ‘œ 읽을 땐 scope="colgroup"으둜 μž…λ ₯)

ex) < th colspan="4" scope="colgroup" id="f2" >text

row scope : κ°€λ‘œλ‘œ μ½λŠ” λ°©ν–₯ (그룹으둜 묢인것을 κ°€λ‘œλ‘œ 읽을 땐 scope="rowgroup" 으둜 μž…λ ₯)

ex) < th colspan="4" scope="rowgroup" id="f1" >text< /th >

headers="id" : μ‚¬μš©μžκ°€ 읽히고 싢은 μˆœμ„œλŒ€λ‘œ μ½λŠ” μ—­ν• 

ex) < td headers="f1 f24 c44 g11" >text< /td >


ex) < body >

< table border="1" width="100%" summary="μ„ΈλΆ€μ„€λͺ…" >

< caption >ν‘œμ˜μ œλͺ© </caption >  

  < colgroup >  
      < col width="100"/ >  
      < col / > 
      < col width="100"/ >  
      < col / >  
   < /colgroup >  
         < thead >  
           < tr >  
              < th >text< /th >   
              < th colspan="" scope="colgroup" id="" >text< /th >  
           < /tr >  
         < /thead >  
         < tbody >
           < tr >  
             < td >text< /td >  
             < td headers="ν‘œλ“€μ˜ 고유 이름듀 ">text</td>  
             < td >text< /td >  
          < /tr >  
       < /tbody >    
< /table >  
< /body >

⚠️ **GitHub.com Fallback** ⚠️