๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐ŸŒŒ | WEB DEV/HTML CSS

HTML&CSS EMMET (w.VSCODE)

by KASSID 2021. 12. 30.

๋ชฉ์ฐจ

    728x90

    EMMET์ด๋ž€?

    html์ด๋‚˜ css ๋“ฑ์˜ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•  ๋•Œ ํšจ๊ณผ์ ์œผ๋กœ ์‹œ๊ฐ„์„ ๋‹จ์ถ•์‹œ์ผœ์ฃผ๋Š” ํ™•์žฅ๊ธฐ๋Šฅ!

    ์ž…๋ ฅ ํ›„ Tabํ‚ค or Enterํ‚ค ๋ˆ„๋ฅด๊ธฐ!

     

     HTML 

     ! & html:5 

    html ํ‘œ์ค€ DTD๋ฌธ์„œ

    !
    >>>
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
    </head>
    <body>
        
    </body>
    </html>

     link 

    ๋งํฌํŽ˜์ด์ง€

    link
    >>> <link rel="stylesheet" href="">

    link:css, favicon ๋“ฑ

    link:css
    >>> <link rel="stylesheet" href="style.css">

     . 

    div ํƒœ๊ทธ์ƒ์„ฑ

    .
    >>> <div class=""></div>

     .(ํด๋ž˜์Šค๋ช…) 

    ์ง€์ •ํ•œ ํด๋ž˜์Šค๋ช… ๊ฐ€์ง„ divํƒœ๊ทธ ์ƒ์„ฑ

    .title
    >>> <div class="title"></div>

     #(id๋ช…) 

    ์ง€์ •ํ•œ id๋ช… ๊ฐ€์ง„ divํƒœ๊ทธ ์ƒ์„ฑ

    #title
    >>> <div id="title"></div>

     

     ํƒœ๊ทธ๋ช….(ํด๋ž˜์Šค๋ช…) 

     ํƒœ๊ทธ๋ช…#(id๋ช…) 

    span.title
    >>> <span class="title"></span>
    span#title
    >>> <span id="title"></span>

     > 

    ์ž์‹ ๋…ธ๋“œ๋กœ ์ถ”๊ฐ€

    table>tr>td
    >>>
    <table>
        <tr>
            <td></td>
        </tr>
    </table>

    *๋กœ ์—ฌ๋Ÿฌ ๊ฐœ๋ฅผ ํ•œ ๋ฒˆ์— ์ƒ์„ฑ ๊ฐ€๋Šฅ

    table>tr>td*3
    >>>
    <table>
        <tr>
            <td></td>
            <td></td>
            <td></td>
        </tr>
    </table>

     + 

    ํ˜•์ œ ๋…ธ๋“œ๋กœ ์ถ”๊ฐ€

    div>li+ol
    >>>
    <div>
        <li></li>
        <ol></ol>
    </div>

     CSS 

     

    ์†์„ฑ:๊ฐ’์œผ๋กœ ์„ค์ • ๊ฐ’ ํ•œ ๋ฒˆ์— ์ƒ์„ฑ ๊ฐ€๋Šฅ

    %๋Š” p๋กœ

     

     font 

     fs 

    ๊ธ€์ž ๋ชจ์–‘

    fs
    >>> font-style: italic;

     fz 

    ๊ธ€์ž ํฌ๊ธฐ

    fz
    >>> font-size: ;

    fz์ˆซ์ž ๋กœ px๊ฐ’์„ ๋„ฃ์„ ์ˆ˜ ์žˆ๋‹ค.

    fz30
    >>> font-size: 30px;

     fw 

    ๊ธ€์ž ๊ตต๊ธฐ

    fw
    >>> font-weight: normal;

     color 

     c 

    ์ƒ‰

    c
    >>> color: #000;

     background 

     bg 

    ๋ฐฐ๊ฒฝ

    bg
    >>> background: #000;

     bgc 

    ๋ฐฐ๊ฒฝ์ƒ‰

    bgc
    >>> background-color: #fff;

     border 

     bd 

    ์œค๊ณฝ์„ 

    bd
    >>> border: 1px solid #000;

     bx 

    box-sizing: border-box;

     bdrs 

    ๋ชจ์„œ๋ฆฌ ๋‘ฅ๊ธ€๊ฒŒ

    bdrs
    >>> border-radius: ;
    
    bdrs15
    >>> border-radius: 15px;

     text 

     tt 

    ํ…์ŠคํŠธ ํ˜•ํƒœ ์„ค์ •

    tt
    >>> text-transform: uppercase;

     ta 

    ํ…์ŠคํŠธ ์ •๋ ฌ

    ta
    >>> text-align: left;
    
    ta:r
    >>> text-align: right;
    ta:c
    >>> text-align: center;

     position 

     pos 

    pos
    >>> position: relative;

    pos:r pos:a pos:f

    pos:r
    >>> position: relative;
    pos:a
    >>> position: absolute;
    pos:f
    >>> position: fixed;

     float 

     fl 

    fl
    >>> float: left;
    fl:r
    >>> float: right;
    
    fl:l
    >>> float: left;

     width&height 

     w 

    ๋„ˆ๋น„

    w
    >>> width: ;

    w๊ฐ’ / %=p๋กœ ์น˜ํ™˜

    w30
    >>> width: 30px;
    
    w100p
    >>> width: 100%;

     h 

    ๋†’์ด

    h
    >>> height: ;
    h30
    >>> height: 30px;

     

    ๋Œ“๊ธ€