๐Ÿ‘ฉ‍๐Ÿ’ป Learn programming

[์ŠคํŒŒ๋ฅดํƒ€] ์›น๊ฐœ๋ฐœ ์ข…ํ•ฉ๋ฐ˜ 1์ฃผ์ฐจ - HTML, CSS, Javascript

๋””์ž์ธ ๋ฝ€์†ก์ด 2022. 1. 1. 23:38
๋ฐ˜์‘ํ˜•

 1. HTML 

 

  • HTML์€ ๋ผˆ๋Œ€, CSS๋Š” ๊พธ๋ฏธ๊ธฐ

  • HTML ๊ธฐ์ดˆ
    - HTML๋Š” ํฌ๊ฒŒ head์™€ body๋กœ ๊ตฌ์„ฑ
    - head์—๋Š” ํŽ˜์ด์ง€ ์†์„ฑ์ •๋ณด,
    - body์—๋Š” ํŽ˜์ด์ง€ ๋‚ด์šฉ

 

  • head ์•ˆ์— ๋“ค์–ด๊ฐ€๋Š” ๋Œ€ํ‘œ ์š”์†Œ๋“ค
    : meta, script, link, title
  • body ์•ˆ์— ๋“ค์–ด๊ฐ€๋Š” ๋Œ€ํ‘œ ์š”์†Œ๋“ค
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ํƒ€์ดํ‹€</title>
</head>

<body>
    <!-- ๊ตฌ์—ญ์„ ๋‚˜๋ˆ„๋Š” ํƒœ๊ทธ๋“ค -->
    <div>๊ตฌ์—ญ ๋‚˜๋ˆ„๊ธฐ</div>
    <p>๋ฌธ๋‹จ</p>
    <ul>
        <li> bullet point!1 </li>
        <li> bullet point!2 </li>
    </ul>

    <!-- ๊ตฌ์—ญ ๋‚ด ์ฝ˜ํ…์ธ  ํƒœ๊ทธ๋“ค -->
    <h1>h1 ์ œ๋ชฉ์„ ๋‚˜ํƒ€๋‚ด๋Š” ํƒœ๊ทธ. ํŽ˜์ด์ง€๋งˆ๋‹ค ํ•˜๋‚˜์”ฉ ์จ์ฃผ๋ฉด ๊ตฌ๊ธ€ ๊ฒ€์ƒ‰ ์ž˜ ๋จ.</h1>
    <h2>h2 ์†Œ์ œ๋ชฉ</h2>
    <h3>์ด์™ธ์— h3~h6</h3>
    <hr>   <!-- hr์€ ๊ฐ€๋กœ์„  -->
    span ํƒœ๊ทธ: ํŠน์ • <span style="color:red">๊ธ€์ž</span>๋ฅผ ๊พธ๋ฐˆ
    <hr>
    a ํƒœ๊ทธ: <a href="http://naver.com/"> ํ•˜์ดํผ๋งํฌ </a>
    <hr>
    img ํƒœ๊ทธ: <img src="https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" />
    <hr>
    input ํƒœ๊ทธ: <input type="text" />
    <hr>
    button ํƒœ๊ทธ: <button> ๋ฒ„ํŠผ</button>
    <hr>
    textarea ํƒœ๊ทธ: <textarea>text๋ฅผ ์ž‘์„ฑํ•  ์ˆ˜ ์žˆ๋Š” ๊ณณ</textarea>
</body>

</html>โ€‹

 


๐Ÿฐ ๋‹จ์ถ• ํ‚ค TIP! 

     โ‘  ์ •๋ ฌ ๋‹จ์ถ• ํ‚ค
         - window : Ctrl + Alt + L
         - mac : cmd + Alt + L     
     โ‘ก ์ฃผ์„ ๋‹จ์ถ• ํ‚ค         
         - window : Ctrl + /          
         - mac : cmd + /


 2. CSS 

 

  • CSS ๊ธฐ์ดˆ
    - css ์‚ฌ์šฉ๋ฒ• : <head> ์•ˆ์— <style>๋กœ ๊ณต๊ฐ„ ๋งŒ๋“ค์–ด ์‚ฌ์šฉ
    <head>
        <meta charset="UTF-8">
        <title>๐ŸŒ mingu world ๐ŸŒ</title>
        <style>
            .mytitle {
                color: red;
            }
        </style>
    </head>โ€‹
  • CSS
    - ๋ฐฐ๊ฒฝ : background-color, background-image, background-size
    - ์‚ฌ์ด์ฆˆ : width, height
    - ํฐํŠธ : font-size, font-weight, font-family, color
    - ๊ฐ„๊ฒฉ : margin, padding

 2. Bootstrap (๋ถ€ํŠธ์ŠคํŠธ๋žฉ) 

 

  • ๋ถ€ํŠธ์ŠคํŠธ๋žฉ ๊ธฐ๋ณธ ํ…œํ”Œ๋ฆฟ
    <!DOCTYPE html>
    <html lang="ko">
      <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <!-- ์œ„ 3๊ฐœ์˜ ๋ฉ”ํƒ€ ํƒœ๊ทธ๋Š” *๋ฐ˜๋“œ์‹œ* head ํƒœ๊ทธ์˜ ์ฒ˜์Œ์— ์™€์•ผํ•ฉ๋‹ˆ๋‹ค; ์–ด๋–ค ๋‹ค๋ฅธ ์ฝ˜ํ…์ธ ๋“ค์€ ๋ฐ˜๋“œ์‹œ ์ด ํƒœ๊ทธ๋“ค *๋‹ค์Œ์—* ์™€์•ผ ํ•ฉ๋‹ˆ๋‹ค -->
        <title>๋ถ€ํŠธ์ŠคํŠธ๋žฉ 101 ํ…œํ”Œ๋ฆฟ</title>
    
        <!-- ๋ถ€ํŠธ์ŠคํŠธ๋žฉ -->
        <link href="css/bootstrap.min.css" rel="stylesheet">
    
        <!-- IE8 ์—์„œ HTML5 ์š”์†Œ์™€ ๋ฏธ๋””์–ด ์ฟผ๋ฆฌ๋ฅผ ์œ„ํ•œ HTML5 shim ์™€ Respond.js -->
        <!-- WARNING: Respond.js ๋Š” ๋‹น์‹ ์ด file:// ์„ ํ†ตํ•ด ํŽ˜์ด์ง€๋ฅผ ๋ณผ ๋•Œ๋Š” ๋™์ž‘ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. -->
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
          <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
        <![endif]-->
      </head>
      <body>
        <h1>Hello, world!</h1>
    
        <!-- jQuery (๋ถ€ํŠธ์ŠคํŠธ๋žฉ์˜ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์œ„ํ•ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค) -->
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
        <!-- ๋ชจ๋“  ์ปดํŒŒ์ผ๋œ ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ํฌํ•จํ•ฉ๋‹ˆ๋‹ค (์•„๋ž˜), ์›ํ•˜์ง€ ์•Š๋Š”๋‹ค๋ฉด ํ•„์š”ํ•œ ๊ฐ๊ฐ์˜ ํŒŒ์ผ์„ ํฌํ•จํ•˜์„ธ์š” -->
        <script src="js/bootstrap.min.js"></script>
      </body>
    </html>โ€‹
๋ฐ˜์‘ํ˜•