Programming Language/HTML | CSS | JS

HTML 10์ผ์ฐจ ๊ณต๋ถ€ (<link> rel, type ์†์„ฑ/ <table>)

chaerlo127 2022. 1. 23. 18:50
728x90

1. HTML rel ์†์„ฑ (<link> tag)

์ถœ์ฒ˜: TCP School

๊ณผ๊ฑฐ CSS ๊ณต๋ถ€ํ•˜๋ฉด์„œ stylesheet๋ฅผ ๊ณต๋ถ€ํ•ด๋ดค๊ณ , W3School์—์„œ ๋‚˜์˜ค๋Š” Favicon ์˜ˆ์ œ์—์„œ๋Š” icon์„ ์‚ฌ์šฉํ–ˆ๋‹ค.

<!doctype html>
  <head>
    <title>HTML Example</title> 
    <!-- type: ๋ฏธ๋””์–ด ํƒ€์ž…, ๊ผญ ๋ช…์‹œํ•ด์ฃผ์–ด์•ผ ํ•œ๋‹ค. -->
    <link rel="icon" type="image/x-icon" href="https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FbeJ1V8%2FbtrrmeSZW7U%2FAAAAAAAAAAAAAAAAAAAAAJfqR9oe8erZtymry4cmREt1bZLFah8k7kzly5rK8jar%2Fimg.jpg%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3Dg75GZYnC3mQcZLOXxTErUhDcRt0%253D">
  </head>
  <body>
  </body>
</html>

favicon์ด ๊ธฐ๋ณธ์—์„œ ์งฑ๊ตฌ ์‚ฌ์ง„์œผ๋กœ ๋ณ€๊ฒฝ๋œ ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

 

 

[์ถœ์ฒ˜]

http://tcpschool.com/html-tag-attrs/link-type

 

2. HTML Table Tag

- ํ…Œ์ด๋ธ” ์ƒ์„ฑ

ํƒœ๊ทธ ์„ค๋ช…
<table> ํ…Œ์ด๋ธ” tag
<th> ํ…Œ์ด๋ธ” header
<tr> ํ…Œ์ด๋ธ” ํ–‰
<td> ํ…Œ์ด๋ธ” ์—ด

 

- ํ…Œ์ด๋ธ” ์†์„ฑ

 

์†์„ฑ๋ช… ์†์„ฑ ๊ฐ’ ์„ค๋ช…
align left, center, right ํ…Œ์ด๋ธ” ์ •๋ ฌ ๋ฐฉ๋ฒ•
bdcolor rgb(x,x,x), #xxxx, ์ƒ‰์ƒ ๋ช… ํ…Œ์ด๋ธ” ๋ฐฐ๊ฒฝ์ƒ‰
border 1, 0 ํ…Œ๋‘๋ฆฌ ์‚ฌ์šฉํ• ์ง€ ์•ˆํ• ์ง€
cellingpadding ํ”ฝ์…€ ์…€ ๊ฒฝ๊ณ„ ์‚ฌ์ด์˜ ๊ณต๊ฐ„
cellspacing ํ”ฝ์…€ ์…€๊ณผ ์…€ ์‚ฌ์ด์˜ ๊ณต๊ฐ„
frame void, above, below, hsides, lhs, rhs, vsides, box, border ๋ฐ”๊นฅ์ชฝ ํ…Œ๋‘๋ฆฌ ๋ช…์‹œ
rules none, groups, rows, cols, all ์•ˆ์ชฝ ํ…Œ๋‘๋ฆฌ ๋ช…์‹œ
summary ํ…์ŠคํŠธ ์ฝ˜ํ…์ธ  ๊ฐœ์š” ๋ช…์‹œ
width ํ”ฝ์…€, % ํ…Œ์ด๋ธ” ๋„ˆ๋น„ ๋ช…์‹œ
border-collapse seperate: ๊ฐ„๊ฒฉ ๋‘๊ธฐ
collapse: ๊ฐ„๊ฒฉ ์—†์• ๊ธฐ
initial: ๊ธฐ๋ณธ ๊ฐ’
inherit: ๋ถ€๋ชจ ์š”์†Œ์˜ ์†์„ฑ๊ฐ’์„ ์ƒ์†
ํ…Œ์ด๋ธ” ํ…Œ๋‘๋ฆฌ์™€ ์…€ ํ…Œ๋‘๋ฆฌ ์‚ฌ์ด ๊ฐ„๊ฒฉ
border-radius ํ”ฝ์…€ ๋‘ฅ๊ทผ ํ…Œ์ด๋ธ”
border-style
ํ…Œ์ด๋ธ” ์Šคํƒ€์ผ

 

<!doctype html>
  <head>
    <title>HTML Example</title> 
    <!-- type: ๋ฏธ๋””์–ด ํƒ€์ž…, ๊ผญ ๋ช…์‹œํ•ด์ฃผ์–ด์•ผ ํ•œ๋‹ค. -->
    <link rel="icon" type="image/x-icon" href="https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FbeJ1V8%2FbtrrmeSZW7U%2FAAAAAAAAAAAAAAAAAAAAAJfqR9oe8erZtymry4cmREt1bZLFah8k7kzly5rK8jar%2Fimg.jpg%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3Dg75GZYnC3mQcZLOXxTErUhDcRt0%253D">

    <style>
      th, td{
        border: 1px solid black;
        /* ์‚ฌ์ด ๊ฐ„๊ฒฉ ์—†์• ๊ธฐ */
        border-collapse: collapse;
        border-radius: 10px;
        border-style: dashed;
      }
    </style>
  </head>
  <body>
    <!-- table width -->
    <table style="width: 50%;">
      
      <tr>
        <!-- table column width -->
        <th style="width: 50%;">์•ŒํŒŒ๋ฒณ</th>
        <th>์ฝ๋Š” ์†Œ๋ฆฌ</th>
      </tr>

      <tr style="height: 80px;"><!-- table row Height -->
        <td>A a</td>
        <td>์—์ด</td>
      </tr>
    </table>
  </body>
</html>

 

 

border-collapse : seperate
border-collapse: collapse

 

radius, style: dashed ๋œ table

- Vertical Table Headers

<!doctype html>
  <head>
    <title>HTML Example</title> 
    <style>
      th, td{
        border: 1px solid black;
        border-collapse: collapse;
      }
    </style>
  </head>
  <body>
    <!-- table width -->
    <table>
      
      <tr>
        <th>๋Œ€ํ•™๊ต</th>
        <td>A university</td>
        <td>B university</td>
      </tr>
      <tr>
        <th>ํ•™๋ถ€</th>
        <td>๊ณตํ•™๋ถ€</td>
        <td>๊ณตํ•™๋ถ€</td>
      </tr>
      <tr>
        <th>์ „๊ณต</th>
        <td>์ „์ž๊ณตํ•™๊ณผ</td>
        <td>์ปดํ“จํ„ฐ๊ณตํ•™๊ณผ</td>
      </tr>
    </table>
  </body>
</html>

 

header๊ฐ€ ๊ฐ€๋กœ๊ฐ€ ์•„๋‹Œ ์„ธ๋กœ๊ฐ€ ๋˜์–ด ์žˆ์Œ

 

 

 

-Header for Multiple Columns

 

<th> tag์˜ ์š”์†Œ ์„ค๋ช…
colspan header of multiple columns ๊ฐ€ ๊ฐ€๋Šฅ

ํ•˜๋‚˜์˜ header๊ฐ€ 3๊ฐœ์˜ ์—ด์„ ์ฐจ์ง€ํ•œ๋‹ค.
Header for multiple Columns

 

 

 

-Table Caption ( <caption> tag )

 <table>
      <caption> ๋Œ€ํ•™๊ต ํ…Œ์ด๋ธ” </caption>
      <tr>
        <th colspan="3">UNIVERSITY</th>
      </tr>
      <tr>
        <th>๋Œ€ํ•™๊ต</th>
        <td>A university</td>
        <td>B university</td>
      </tr>
      <tr>
        <th>ํ•™๋ถ€</th>
        <td>๊ณตํ•™๋ถ€</td>
        <td>๊ณตํ•™๋ถ€</td>
      </tr>
      <tr>
        <th>์ „๊ณต</th>
        <td>์ „์ž๊ณตํ•™๊ณผ</td>
        <td>์ปดํ“จํ„ฐ๊ณตํ•™๊ณผ</td>
      </tr>
    </table>

 

 

[์ถœ์ฒ˜]

http://www.tcpschool.com/html-tags/table

https://www.codingfactory.net/10616

728x90