Search

HTML ๊ธฐ๋ณธ

HTML ๊ธฐ๋ณธ

โ€ข

๊ธฐ๋ณธ ๊ตฌ์กฐ

HTML ๊ธฐ๋ณธ ๊ตฌ์กฐ ์ฝ”๋“œ๋ฅผ ์•Œ์•„๋ด…๋‹ˆ๋‹ค.
<!-- ์ค‘๊ฐ„ ์ฃผ์„ : alt + shift + A --> <!DOCTYPE html> <!-- HTML5 ๋ฌธ์„œ์ž„์„ ์ •์˜ --> <html lang="en"> <!-- HTML ๋ฌธ์„œ์˜ ์‹œ์ž‘ --> <head> <!-- ๋ธŒ๋ผ์šฐ์ €์˜ ์ •๋ณด๋ฅผ ์ œ๊ณตํ•˜๋Š” ํƒœ๊ทธ - ๋ฉ”ํƒ€์ •๋ณด, ํŽ˜์ด์ง€ ์ œ๋ชฉ --> <meta charset="UTF-8"> <!-- ๋ฌธ์ž ์ธ์ฝ”๋”ฉ ๋ฐฉ์‹ ์ง€์ • --> <!-- ๋ทฐํฌํŠธ : ํŽ˜์ด์ง€์˜ ํฌ๊ธฐ์™€ ๋น„์œจ์„ ์ œ์–ดํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์ง€์ • --> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- ๋ธŒ๋ผ์šฐ์ € ์ฐฝ/ํƒญ ์ œ๋ชฉ --> <title>์‚ฌ์ดํŠธ ์ œ๋ชฉ</title> </head> <body> <!-- ๋ณธ๋ฌธ ๋‚ด์šฉ : ํ™”๋ฉด์— ํ‘œ์‹œ๋˜๋Š” ์˜์—ญ --> </body> </html>
HTML
๋ณต์‚ฌ

๊ธฐ๋ณธ ์ฝ”๋“œ ์ž‘์„ฑ

html ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๋ฉด์„œ ์ž์ฃผ ์‚ฌ์šฉํ•˜๋Š” ๋‹จ์ถ•ํ‚ค์™€ Emmet ์‚ฌ์šฉ๋ฒ•์„ ์•Œ์•„๋ด…๋‹ˆ๋‹ค.

๋‹จ์ถ•ํ‚ค

๊ธฐ๋Šฅ
๋‹จ์ถ•ํ‚ค
HTML ๊ธฐ๋ณธ ๊ตฌ์กฐ ์ž๋™ ์™„์„ฑ
! + Enter
์ฃผ์„ ์ฒ˜๋ฆฌ
Ctrl + /
์ค‘๊ฐ„ ์ฃผ์„ ์ฒ˜๋ฆฌ
Alt + Shift + A
์ž๋™ ์™„์„ฑ
Ctrl + Space
์ค„ ๋ฐ”๋กœ ์‹คํ–‰
Ctrl + Enter
ํ•œ ์ค„ ๋ณต์‚ฌ
Alt + Shift + (โ†‘/โ†“)
ํ•œ ์ค„ ์‚ญ์ œ
Ctrl + Shift + K
๋‹ค์ค‘ ์ปค์„œ (๋งˆ์šฐ์Šค ํด๋ฆญ)
Alt + ์™ผ์ชฝ ํด๋ฆญ
๋‹ค์ค‘ ์ปค์„œ (๋ฐฉํ–ฅํ‚ค)
Ctrl + Alt + (โ†‘/โ†“)

Emmet ์‚ฌ์šฉํ•˜๊ธฐ

Emmet ๊ธฐ๋ณธ ๋ฌธ๋ฒ•

๋ฌธ๋ฒ•
์„ค๋ช…
ํƒœ๊ทธ๋ช…#id๋ช…
ํ•ด๋‹น ํƒœ๊ทธ์— id ์†์„ฑ์„ ์ถ”๊ฐ€
ํƒœ๊ทธ๋ช….class๋ช…
ํ•ด๋‹น ํƒœ๊ทธ์— class ์†์„ฑ์„ ์ถ”๊ฐ€
{๋‚ด์šฉ}
ํƒœ๊ทธ ๋‚ด๋ถ€์˜ ๋‚ด์šฉ์„ ์„ค์ •
*์ˆซ์ž
ํ•ด๋‹น ํƒœ๊ทธ๋ฅผ ์ง€์ •๋œ ์ˆซ์ž๋งŒํผ ๋ฐ˜๋ณต ์ƒ์„ฑ
$
์ž๋™์œผ๋กœ ์ˆซ์ž๋ฅผ 1๋ถ€ํ„ฐ ์ˆœ์ฐจ์ ์œผ๋กœ ์ฆ๊ฐ€์‹œ์ผœ ๋‚ด์šฉ์— ์‚ฝ์ž…

Emmet ๊ธฐ๋ณธ ๋ฌธ๋ฒ• ์„ค๋ช…

์‚ฌ์šฉ ์˜ˆ์‹œ
์„ค๋ช…
h1#title{๋‚ด์šฉ}
<h1> ํƒœ๊ทธ์— id="title" ์†์„ฑ์„ ์ถ”๊ฐ€ํ•˜๊ณ , ๋‚ด์šฉ์€ "๋‚ด์šฉ"์œผ๋กœ ์„ค์ •
h2.main-title{๋‚ด์šฉ}*3
<h2> ํƒœ๊ทธ์— class="main-title" ์†์„ฑ์„ ์ถ”๊ฐ€ํ•˜๊ณ , ๋‚ด์šฉ์€ "๋‚ด์šฉ"์ธ <h2> ํƒœ๊ทธ๋ฅผ 3๊ฐœ ์ƒ์„ฑ
p.news{๋‚ด์šฉ}*5
<p> ํƒœ๊ทธ์— class="news" ์†์„ฑ์„ ์ถ”๊ฐ€ํ•˜๊ณ , ๋‚ด์šฉ์€ "๋‚ด์šฉ"์ธ <p> ํƒœ๊ทธ๋ฅผ 5๊ฐœ ์ƒ์„ฑ
p.number{$}*10
<p> ํƒœ๊ทธ์— ๋‚ด์šฉ์œผ๋กœ 1๋ถ€ํ„ฐ 10๊นŒ์ง€์˜ ์ˆซ์ž๋ฅผ ์ž๋™์œผ๋กœ ์ƒ์„ฑํ•˜๋Š” <p> ํƒœ๊ทธ 10๊ฐœ ์ƒ์„ฑ ($๋Š” 1๋ถ€ํ„ฐ ์ˆซ์ž๋ฅผ ์ฆ๊ฐ€์‹œํ‚ค๋Š” Emmet ๊ธฐํ˜ธ)
<!-- !์—”ํ„ฐ : html ๊ธฐ๋ณธ ๊ตฌ์กฐ ์ž๋™ ์™„์„ฑ --> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>HTML ์ž‘์„ฑ</title> </head> <body> <!-- ์ฃผ์„ : ctrl + / --> <!-- ์ค‘๊ฐ„ ์ฃผ์„ : alt + shift + A --> <!-- Emmet ๊ธฐ๋Šฅ --> <!-- ์ž๋™ ์™„์„ฑ : ctrl + space --> <!-- ๋ฐ”๋กœ ์—”ํ„ฐ : ctrl + enter --> <!-- ํ•œ์ค„๋ณต์‚ฌ : alt + shift + (โ†‘/โ†“) ใ…ํ•œ์ž --> <!-- ํ•œ์ค„์‚ญ์ œ : ctrl + shift + K --> <!-- ๋‹ค์ค‘์ปค์„œ : alt + ์™ผ์ชฝํด๋ฆญ --> <!-- ๋‹ค์ค‘์ปค์„œ : ctrl + alt + (โ†‘/โ†“) --> h1#title{HTML ์ž‘์„ฑ} <h1 id="title">HTML ์ž‘์„ฑ</h1> h2.main-title{๋ฉ”์ธ ํƒ€์ดํ‹€}*3 <h2 class="main-title">๋ฉ”์ธ ํƒ€์ดํ‹€</h2> <h2 class="main-title">๋ฉ”์ธ ํƒ€์ดํ‹€</h2> <h2 class="main-title">๋ฉ”์ธ ํƒ€์ดํ‹€</h2> p.news{HTML CSS JavaScirpt jQuery ์‹œ์ž‘!}*5 <p class="news">HTML CSS JavaScirpt jQuery ์‹œ์ž‘!</p> <p class="news">HTML CSS JavaScirpt jQuery ์‹œ์ž‘!</p> <p class="news">HTML CSS JavaScirpt jQuery ์‹œ์ž‘!</p> <p class="news">HTML CSS JavaScirpt jQuery ์‹œ์ž‘!</p> <p class="news">HTML CSS JavaScirpt jQuery ์‹œ์ž‘!</p> p.number{$}*10 <p class="number">1</p> <p class="number">2</p> <p class="number">3</p> <p class="number">4</p> <p class="number">5</p> <p class="number">6</p> <p class="number">7</p> <p class="number">8</p> <p class="number">9</p> <p class="number">10</p> </body> </html>
HTML
๋ณต์‚ฌ

Live Server

๋ธŒ๋ผ์šฐ์ €์—์„œ html ํŒŒ์ผ์„ ์„œ๋ฒ„ ํ™˜๊ฒฝ์—์„œ ์‹คํ–‰ํ•ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค
1.
b.
[Extension] (ํ™•์žฅ)
c.
Live Server ๊ฒ€์ƒ‰
2.
Live Server ์‹คํ–‰
a.
[Go Live] (์šฐ์ธก ํ•˜๋‹จ)
b.
[Open with Liver Server] (HTML ํŒŒ์ผ ์šฐํด๋ฆญ, ์—๋””ํ„ฐ ์šฐํด๋ฆญ)
c.
ALT + L O
3.
Live Server ์ข…๋ฃŒ
a.
Port :55xx (Click to close server)
b.
[Stop Live Server] (์—๋””ํ„ฐ ์šฐํด๋ฆญ)
c.
ALT + L C

Live Reload (์‹ค์‹œ๊ฐ„ ํŽ˜์ด์ง€ ๋ฆฌ๋กœ๋“œ)

HTML, CSS, JS ํŒŒ์ผ์„ ์ˆ˜์ •ํ•˜๊ณ  ์ €์žฅํ•  ๋•Œ๋งˆ๋‹ค ๋ธŒ๋ผ์šฐ์ €๊ฐ€ ์ž๋™์œผ๋กœ ์ƒˆ๋กœ๊ณ ์นจ๋˜์–ด ์ˆ˜์ •๋œ ๊ฒฐ๊ณผ๋ฅผ ์ฆ‰์‹œ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๊ธฐ๋ณธ ํƒœ๊ทธ

โ€ข
ํ…์ŠคํŠธ
โ€ข
๋ฆฌ์ŠคํŠธ
โ€ข
๋งํฌ
โ€ข
์ด๋ฏธ์ง€
โ€ข
ํ…Œ์ด๋ธ”

ํ…์ŠคํŠธ

ํ…์ŠคํŠธ ์š”์†Œ๋Š” ์›น ํŽ˜์ด์ง€์—์„œ ๋ฌธ๋‹จ, ํ—ค๋”, ๊ฐ•์กฐ ๋“ฑ์˜ ๊ธ€์ž๋ฅผ ํ‘œํ˜„ํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋˜๋Š” ํƒœ๊ทธ์ž…๋‹ˆ๋‹ค.
ํ…์ŠคํŠธ ์š”์†Œ๋Š” ์ฝ˜ํ…์ธ ์˜ ๊ตฌ์กฐ์™€ ๊ฐ•์กฐ๋ฅผ ์ •์˜ํ•˜๋Š” ๋ฐ ์ค‘์š”ํ•œ ์—ญํ• ์„ ํ•ฉ๋‹ˆ๋‹ค. ์ฃผ๋กœ ๋ฌธ์„œ์˜ ํ—ค๋”, ๋ฌธ๋‹จ, ๊ฐ•์กฐ ๋ถ€๋ถ„ ๋“ฑ์— ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.

์ฃผ์š” ํƒœ๊ทธ

ํƒœ๊ทธ
์„ค๋ช…
<h1> ~ <h6>
์ œ๋ชฉ์„ ๋‚˜ํƒ€๋‚ด๋Š” ํƒœ๊ทธ. <h1>์ด ๊ฐ€์žฅ ํฌ๊ณ  <h6>์ด ๊ฐ€์žฅ ์ž‘์Œ.
<p>
๋‹จ๋ฝ(๋ฌธ๋‹จ)์„ ๋‚˜ํƒ€๋‚ด๋Š” ํƒœ๊ทธ.
<b>, <strong>
ํ…์ŠคํŠธ๋ฅผ ๊ตต๊ฒŒ ํ‘œ์‹œ. <strong>์€ ์˜๋ฏธ์  ๊ฐ•์กฐ๋ฅผ ๋‚˜ํƒ€๋ƒ„.
<i>, <em>
ํ…์ŠคํŠธ๋ฅผ ๊ธฐ์šธ์—ฌ ํ‘œ์‹œ. <em>์€ ์˜๋ฏธ์  ๊ฐ•์กฐ๋ฅผ ๋‚˜ํƒ€๋ƒ„.
<br>
์ค„๋ฐ”๊ฟˆ์„ ์˜๋ฏธํ•˜๋Š” ํƒœ๊ทธ.
<span>
ํŠน์ • ํ…์ŠคํŠธ์— ์Šคํƒ€์ผ์„ ์ ์šฉํ•˜๊ธฐ ์œ„ํ•œ ์ธ๋ผ์ธ ์ปจํ…Œ์ด๋„ˆ.

text.html

<!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> <!-- heading : ์ œ๋ชฉ ํƒœ๊ทธ (h1~h6) --> <!-- h$*6{Hello HTML} --> <h1>Hello HTML</h1> <h2>Hello HTML</h2> <h3>Hello HTML</h3> <h4>Hello HTML</h4> <h5>Hello HTML</h5> <h6>Hello HTML</h6> <!-- ํ…์ŠคํŠธ ์„œ์‹ ํƒœ๊ทธ b : ๋ณผ๋“œ์ฒด (bold) i : ์ดํƒค๋ฆญ์ฒด (italic) strong : ๊ฐ•์กฐ (๋ณผ๋“œ์ฒด) em : ๊ฐ•์กฐ (๊ธฐ์šธ์ž„์ฒด) code : ํ…์ŠคํŠธ๊ฐ€ ์ฝ”๋“œ์ž„์„ ํ‘œ์‹œ sup : ์œ„์ฒจ์ž sub : ์•„๋ž˜์ฒจ์ž hr : ๊ตฌ๋ถ„์„  (์ˆ˜ํ‰์„ ) --> <hr> <!-- ํƒœ๊ทธ๋ฅผ ์ž‘์„ฑํ•  ๋•Œ < > ๋Š” ์“ฐ์ง€ ์•Š๋Š”๋‹ค --> <!-- ํƒœ๊ทธ ์ด๋ฆ„๋งŒ ์ž‘์„ฑํ•˜๋ฉด < > ๊ธฐํ˜ธ๋Š” ์ž๋™์™„์„ฑ๋œ๋‹ค. --> <p><b>์ด ํ…์ŠคํŠธ๋Š” bold ์ž…๋‹ˆ๋‹ค</b></p> <p><strong>์ด ํ…์ŠคํŠธ๋Š” strong ์ž…๋‹ˆ๋‹ค</strong></p> <p><i>์ด ํ…์ŠคํŠธ๋Š” i ์ž…๋‹ˆ๋‹ค</i></p> <p><em>์ด ํ…์ŠคํŠธ๋Š” em ์ž…๋‹ˆ๋‹ค</em></p> <p><code>์ด ํ…์ŠคํŠธ๋Š” code ์ž…๋‹ˆ๋‹ค</code></p> <p><sub>์•„๋ž˜ ์ฒจ์ž</sub> ์ด๊ณ  <sup>์œ„ ์ฒจ์ž</sup> ์ž…๋‹ˆ๋‹ค</p> <p>H<sub>2</sub>O</p> <!-- HTML ์—”ํ„ฐํ‹ฐ (ํŠน์ˆ˜๋ฌธ์ž) &nbsp; : ๊ณต๋ฐฑ๋ฌธ์ž ํ•œ ๊ฐœ &lt; : < &gt; : > &quot; : " &amp; : & --> <hr> <!-- html ์—์„œ๋Š” ์—ฐ์†๋œ ๊ณต๋ฐฑ์€ ํ•˜๋‚˜์˜ ๊ณต๋ฐฑ์œผ๋กœ ์ถœ๋ ฅํ•œ๋‹ค --> ๊ณต ๋ฐฑ <br> ๊ณต &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ๋ฐฑ <br> &lt; &gt; &quot; &amp; </body> </html>
HTML
๋ณต์‚ฌ

paragraph.html

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>๋‹จ๋ฝ ํƒœ๊ทธ - p</title> </head> <body> <!-- <p></p> : ๋ฌธ๋‹จ ์‚ฌ์ด์— ๊ธฐ๋ณธ ์—ฌ๋ฐฑ์„ ๊ฐ€์ง€๋Š” ํƒœ๊ทธ --> <!-- <br> : break line. ๊ฐœํ–‰(์ค„๋ฐ”๊ฟˆ) [์—”ํ„ฐ] --> <p>ํ•˜๋‚˜์˜ ๋‹จ๋ฝ์ž…๋‹ˆ๋‹ค</p> <p>ํ•˜๋‚˜์˜ ๋‹จ๋ฝ์ž…๋‹ˆ๋‹ค</p> <p> ํ•˜๋‚˜์˜ ๋‹จ๋ฝ์ž…๋‹ˆ๋‹ค <br> <!-- br ๋กœ ๋‹ค์Œ ์ค„๋กœ ์ค„๋ฐ”๊ฟˆ --> ๋‘ ๋ฒˆ์งธ ์ค„์ž…๋‹ˆ๋‹ค. </p> <!-- <pre></pre> : ์ž…๋ ฅํ•œ ๊ทธ๋Œ€๋กœ(๊ณต๋ฐฑ, ๊ฐœํ–‰ ํฌํ•จ)์˜ ํ…์ŠคํŠธ๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ํƒœ๊ทธ --> <pre> 1๋ฒˆ์งธ ์ค„์ž…๋‹ˆ๋‹ค. 2๋ฒˆ์งธ ์ค„์ž…๋‹ˆ๋‹ค. </pre> </body> </html>
HTML
๋ณต์‚ฌ

๋ฆฌ์ŠคํŠธ

๋ฆฌ์ŠคํŠธ๋Š” ํ•ญ๋ชฉ๋“ค์„ ๋‚˜์—ดํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
๋ฆฌ์ŠคํŠธ๋Š” ์ˆœ์„œ๊ฐ€ ์žˆ๋Š” ๋ฆฌ์ŠคํŠธ(๋ฒˆํ˜ธ ๋ฆฌ์ŠคํŠธ)์™€ ์ˆœ์„œ๊ฐ€ ์—†๋Š” ๋ฆฌ์ŠคํŠธ(๋ถˆ๋ฆฟ ๋ฆฌ์ŠคํŠธ)๋กœ ๋‚˜๋‰ฉ๋‹ˆ๋‹ค.

์ฃผ์š” ํƒœ๊ทธ

ํƒœ๊ทธ
์„ค๋ช…
<ul>
์ˆœ์„œ๊ฐ€ ์—†๋Š” ๋ฆฌ์ŠคํŠธ๋ฅผ ์ƒ์„ฑ (๋ถˆ๋ฆฟ ๋ฆฌ์ŠคํŠธ).
<ol>
์ˆœ์„œ๊ฐ€ ์žˆ๋Š” ๋ฆฌ์ŠคํŠธ๋ฅผ ์ƒ์„ฑ (๋ฒˆํ˜ธ ๋ฆฌ์ŠคํŠธ).
<li>
๋ฆฌ์ŠคํŠธ ํ•ญ๋ชฉ์„ ๋‚˜ํƒ€๋‚ด๋Š” ํƒœ๊ทธ. <ul> ๋˜๋Š” <ol> ์•ˆ์— ์‚ฌ์šฉ.
<dl>
์„ค๋ช… ๋ฆฌ์ŠคํŠธ๋ฅผ ์ƒ์„ฑํ•˜๋Š” ํƒœ๊ทธ.
<dt>
์„ค๋ช… ๋ฆฌ์ŠคํŠธ์˜ ์šฉ์–ด๋ฅผ ์ •์˜ํ•˜๋Š” ํƒœ๊ทธ.
<dd>
์„ค๋ช… ๋ฆฌ์ŠคํŠธ์˜ ์šฉ์–ด์— ๋Œ€ํ•œ ์„ค๋ช…์„ ๋‚˜ํƒ€๋‚ด๋Š” ํƒœ๊ทธ.
<!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> <!-- ๋ฆฌ์ŠคํŠธ ํƒœ๊ทธ : ํ•ญ๋ชฉ์„ ๋‚˜์—ดํ•˜๋Š” ํƒœ๊ทธ - ul : ๋ฒˆํ˜ธ ์—†๋Š” ๋ฆฌ์ŠคํŠธ - ol : ๋ฒˆํ˜ธ ์žˆ๋Š” ๋ฆฌ์ŠคํŠธ - dl : ์ •์˜ ๋ฆฌ์ŠคํŠธ --> <h1>๋ฆฌ์ŠคํŠธ ํƒœ๊ทธ</h1> <!-- ๋ฒˆํ˜ธ ์—†๋Š” ๋ฆฌ์ŠคํŠธ --> <!-- ul>(li*3) --> <ul> <li>๋…น์ฐจ๋ผ๋–ผ</li> <li>ํ”ผ์Šคํƒ€์น˜์˜ค ๋นฝ์Šค์น˜๋…ธ</li> <li>์•„์ด์Šคํ‹ฐ</li> </ul> <!-- ๋ฒˆํ˜ธ ์žˆ๋Š” ๋ฆฌ์ŠคํŠธ --> <!-- ol>(li*3) --> <!-- ์†์„ฑ : start, type(1,a,A,i,I), reversed --> <ol start="3" type="1" reversed> <li>HTML</li> <li>CSS</li> <li>JavsScript</li> </ol> <!-- ์ •์˜ ๋ฆฌ์ŠคํŠธ --> <!-- dl>(dt+dd+dt+dd) --> <dl> <dt>HTML</dt> <dd>- ๋งˆํฌ์—… ์–ธ์–ด</dd> <dt>CSS</dt> <dd>- ์Šคํƒ€์ผ ์‹œํŠธ</dd> </dl> </body> </html>
HTML
๋ณต์‚ฌ

๋งํฌ

๋งํฌ๋Š” ๋‹ค๋ฅธ ์›น ํŽ˜์ด์ง€๋‚˜ ๋ฌธ์„œ, ๋ฆฌ์†Œ์Šค๋กœ ์—ฐ๊ฒฐํ•  ์ˆ˜ ์žˆ๋Š” ํƒœ๊ทธ์ž…๋‹ˆ๋‹ค.
๋งํฌ๋Š” ํด๋ฆญ ๊ฐ€๋Šฅํ•œ ํ…์ŠคํŠธ๋‚˜ ์ด๋ฏธ์ง€๋กœ ํ‘œํ˜„๋˜๋ฉฐ, ์ฃผ๋กœ ๋‹ค๋ฅธ ํŽ˜์ด์ง€๋‚˜ ์™ธ๋ถ€ ์‚ฌ์ดํŠธ๋กœ์˜ ์—ฐ๊ฒฐ์— ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.

์ฃผ์š” ํƒœ๊ทธ ๋ฐ ์†์„ฑ

ํƒœ๊ทธ
์„ค๋ช…
<a>
ํ•˜์ดํผ๋งํฌ๋ฅผ ์ƒ์„ฑํ•˜๋Š” ํƒœ๊ทธ. href ์†์„ฑ์œผ๋กœ ๋งํฌํ•  URL์„ ์ง€์ •.
href
๋งํฌํ•  ์ฃผ์†Œ(URL)๋ฅผ ์ •์˜ํ•˜๋Š” ์†์„ฑ.
target
๋งํฌ๋ฅผ ์—ด ๋•Œ์˜ ์ฐฝ/ํƒญ ๋™์ž‘์„ ์ •์˜ํ•˜๋Š” ์†์„ฑ. _blank๋Š” ์ƒˆ ์ฐฝ์—์„œ ์—ด๋ฆผ.
title
๋งˆ์šฐ์Šค๋ฅผ ๋งํฌ์— ์˜ฌ๋ ธ์„ ๋•Œ ํ‘œ์‹œ๋˜๋Š” ํ…์ŠคํŠธ๋ฅผ ์ •์˜.
rel
ํ˜„์žฌ ๋ฌธ์„œ์™€ ๋งํฌ ๋ฌธ์„œ์˜ ๊ด€๊ณ„๋ฅผ ์ •์˜.

list.html

<!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> <!-- a ํƒœ๊ทธ * ์†์„ฑ - href : ์ด๋™ํ•  ๊ฒฝ๋กœ(ํŒŒ์ผ๊ฒฝ๋กœ, URL, #id์†์„ฑ) - ๊ฒฝ๋กœ * ์ ˆ๋Œ€ ๊ฒฝ๋กœ : href="http://www.naver.com" ๋‹ค๋ฅธ ์›น์‚ฌ์ดํŠธ๋กœ ์ด๋™ * ์ƒ๋Œ€ ๊ฒฝ๋กœ : href="../../test.html" ์ƒ์œ„ ๊ฒฝ๋กœ์˜ ๋‹ค๋ฅธ ๋ฌธ์„œ๋กœ ์ด๋™ * ๋ฌธ์„œ ๋‚ด๋ถ€ : href="#text" id ์†์„ฑ์ด text ์ธ ์š”์†Œ๋กœ ์ด๋™ *) ../ : ์ƒ์œ„ ๊ฒฝ๋กœ ./ : ํ˜„์žฌ ๊ฒฝ๋กœ - target * _blank : ์ƒˆ ์ฐฝ์—์„œ ์—ด๊ธฐ * _self : ํ˜„์žฌ ์ฐฝ์—์„œ ์—ด๊ธฐ * _parent : ๋ถ€๋ชจ ํ”„๋ ˆ์ž„์—์„œ ์—ด๊ธฐ * _top : ์ตœ์ƒ์œ„ ํ”„๋ ˆ์ž„์—์„œ ์—ด๊ธฐ --> <h1>๋งํฌ ํƒœ๊ทธ</h1> <!-- a[href][target="_blank"] --> <!-- a[href][target="_self"] --> <!-- a#top[href="#bottom"] --> <a href="http://www.naver.com" target="_blank">๋„ค์ด๋ฒ„ (์ƒˆ ์ฐฝ)</a> <a href="http://www.naver.com" target="_self">๋„ค์ด๋ฒ„ (ํ˜„์žฌ ์ฐฝ)</a> <a href="#bottom" id="top">๋งจ ์•„๋ž˜๋กœ ๊ฐ€๊ธฐ</a> <div style="height: 1000px;"></div> <p> ์ด๋ฉ”์ผ <br> <!-- ์ด๋ฉ”์ผ ๋งํฌ : mailto:์ด๋ฉ”์ผ์ฃผ์†Œ --> <a href="mailto:wwwaloha@kakao.com">wwwaloha@kakao.com</a> </p> <h3>์—ฐ๋ฝ์ฒ˜ ๋งํฌ</h3> <p> ์—ฐ๋ฝ์ฒ˜ <!-- ์—ฐ๋ฝ์ฒ˜ : tel:์ „ํ™”๋ฒˆํ˜ธ --> <a href="tel:01012341234">010-1234-1234</a> </p> <!-- a#bottom[href="top"]{๋งจ ์œ„๋กœ ์ด๋™ ํ•˜๊ธฐ} --> <a href="#top" id="bottom">๋งจ ์œ„๋กœ ์ด๋™ ํ•˜๊ธฐ</a> </body> </html>
HTML
๋ณต์‚ฌ

์ด๋ฏธ์ง€

์ด๋ฏธ์ง€๋ฅผ ์›น ํŽ˜์ด์ง€์— ์‚ฝ์ž…ํ•˜๋Š” ํƒœ๊ทธ์ž…๋‹ˆ๋‹ค.
์ด๋ฏธ์ง€๋Š” ์‹œ๊ฐ์ ์ธ ์ฝ˜ํ…์ธ ๋กœ, ์›น ํŽ˜์ด์ง€์—์„œ ์ค‘์š”ํ•œ ์ •๋ณด๋‚˜ ๋””์ž์ธ ์š”์†Œ๋กœ ์ž์ฃผ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.

ํ•˜์œ„ ํƒœ๊ทธ ๋ฐ ์†์„ฑ

ํƒœ๊ทธ
์„ค๋ช…
<img>
์ด๋ฏธ์ง€๋ฅผ ์‚ฝ์ž…ํ•˜๋Š” ํƒœ๊ทธ. src ์†์„ฑ์„ ํ†ตํ•ด ์ด๋ฏธ์ง€์˜ ๊ฒฝ๋กœ๋ฅผ ์ง€์ •.
src
์ด๋ฏธ์ง€์˜ ๊ฒฝ๋กœ(ํŒŒ์ผ ์œ„์น˜)๋ฅผ ์ง€์ •ํ•˜๋Š” ์†์„ฑ.
alt
์ด๋ฏธ์ง€๊ฐ€ ๋กœ๋“œ๋˜์ง€ ์•Š์„ ๊ฒฝ์šฐ ๋Œ€์ฒด ํ…์ŠคํŠธ๋ฅผ ์ง€์ •ํ•˜๋Š” ์†์„ฑ.
width
์ด๋ฏธ์ง€์˜ ๋„ˆ๋น„๋ฅผ ์ง€์ •ํ•˜๋Š” ์†์„ฑ.
height
์ด๋ฏธ์ง€์˜ ๋†’์ด๋ฅผ ์ง€์ •ํ•˜๋Š” ์†์„ฑ.

img.html

<!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> <!-- <img> - src : ์ด๋ฏธ์ง€ ํŒŒ์ผ ๊ฒฝ๋กœ - width/height : ๊ฐ€๋กœ/์„ธ๋กœ ํฌ๊ธฐ ์ง€์ • - alt : ์ด๋ฏธ์ง€๋ฅผ ํ‘œ์‹œํ•˜์ง€ ๋ชปํ•˜๋Š” ๊ฒฝ์šฐ ์ถœ๋ ฅํ•  ๋Œ€์ฒด ํ…์ŠคํŠธ - border : ํ…Œ๋‘๋ฆฌ ๊ตต๊ธฐ ์ง€์ • (px) --> <h1>์ด๋ฏธ์ง€ ํƒœ๊ทธ</h1> <div> <h2>HTML</h2> <img src="img/logo-html.png" alt="logo-html" width="100" height="140" title="HTML ๋กœ๊ณ " /> </div> <div> <h2>CSS</h2> <img src="img/logo-css.png" alt="logo-css" width="100" height="140" title="CSS ๋กœ๊ณ " /> </div> <div> <h2>HTML</h2> <img src="img/logo-js.png" alt="logo-js" width="100" height="140" title="JavaScript ๋กœ๊ณ " /> </div> <hr> <div> <h2>URL ์ด๋ฏธ์ง€</h2> <img src="https://pokemonkorea.co.kr/img/sub/img_compay_info.png" alt="๋‚ด๊ฐ€ ์ข‹์•„ํ•˜๋Š” ์ด๋ฏธ์ง€" border="5"> </div> <div> <h2>์ด๋ฏธ์ง€๊ฐ€ ์—†์„ ๋•Œ</h2> <img src="img/no-image.png" alt="๋Œ€์ฒด ํ…์ŠคํŠธ" title="์ด๋ฏธ์ง€" /> </div> <div style="height: 500px;"></div> </body> </html>
HTML
๋ณต์‚ฌ

ํ…Œ์ด๋ธ”

ํ‘œ ํ˜•์‹์œผ๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ๊ตฌ์„ฑํ•˜๋Š” ํƒœ๊ทธ์ž…๋‹ˆ๋‹ค.
ํ…Œ์ด๋ธ”์€ ํ–‰๊ณผ ์—ด์„ ์‚ฌ์šฉํ•ด ๋ฐ์ดํ„ฐ๋ฅผ ๊ตฌ์กฐ์ ์œผ๋กœ ํ‘œํ˜„ํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.

ํ•˜์œ„ ํƒœ๊ทธ ๋ฐ ์†์„ฑ

ํƒœ๊ทธ
์„ค๋ช…
<table>
ํ…Œ์ด๋ธ”์„ ์ƒ์„ฑํ•˜๋Š” ํƒœ๊ทธ.
<tr>
ํ…Œ์ด๋ธ”์˜ ํ•œ ํ–‰์„ ์ •์˜ํ•˜๋Š” ํƒœ๊ทธ.
<td>
ํ…Œ์ด๋ธ”์˜ ๋ฐ์ดํ„ฐ๋ฅผ ๋‹ด๋Š” ์…€์„ ์ •์˜ํ•˜๋Š” ํƒœ๊ทธ.
<th>
ํ…Œ์ด๋ธ”์˜ ํ—ค๋” ์…€์„ ์ •์˜ํ•˜๋Š” ํƒœ๊ทธ.
<thead>
ํ…Œ์ด๋ธ”์˜ ๋จธ๋ฆฌ๊ธ€ ์„น์…˜์„ ์ •์˜ํ•˜๋Š” ํƒœ๊ทธ.
<tbody>
ํ…Œ์ด๋ธ”์˜ ๋ณธ๋ฌธ ์„น์…˜์„ ์ •์˜ํ•˜๋Š” ํƒœ๊ทธ.
<tfoot>
ํ…Œ์ด๋ธ”์˜ ํ•˜๋‹จ ์„น์…˜์„ ์ •์˜ํ•˜๋Š” ํƒœ๊ทธ.
border
ํ…Œ์ด๋ธ”์— ํ…Œ๋‘๋ฆฌ๋ฅผ ์ถ”๊ฐ€ํ•˜๋Š” ์†์„ฑ.

table.html

<!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> <!-- table : ํ‘œ ํ˜•ํƒœ์˜ ๋ฐ์ดํ„ฐ๋ฅผ ํ‘œ์‹œํ•˜๋Š” ํƒœ๊ทธ - tr (table row) : ํ‘œ์˜ ํ•˜๋‚˜์˜ ํ–‰์„ ํ‘œ์‹œ - th (table head) : ํ‘œ์˜ ์ œ๋ชฉ ํ–‰(header)์˜ ์—ด(data) ํ‘œ์‹œ, * ํ…์ŠคํŠธ๋ฅผ bold์ฒด๋กœ ๊ฐ€์šด๋ฐ ์ •๋ ฌ - td (table data) : ํ‘œ์˜ ํ•œ ์นธ์˜ ์—ด(data)์„ ํ‘œ์‹œ * rowspan : ์ƒํ•˜(ํ–‰)์˜ ์…€์„ ๋ณ‘ํ•ฉ, * colspan : ์ขŒ์šฐ(์—ด)์˜ ์…€์„ ๋ณ‘ํ•ฉ, * ๋ณ‘ํ•ฉํ•  ์ฒซ ๋ฒˆ์งธ ์…€์„ ๊ธฐ์ค€์œผ๋กœ ์…€์˜ ๊ฐœ์ˆ˜๋ฅผ ์ง€์ • - caption : ํ‘œ์˜ ์ œ๋ชฉ - border : ํ‘œ์˜ ํ…Œ๋‘๋ฆฌ ๊ตต๊ธฐ(px) ์ง€์ • - thead : ํ…Œ์ด๋ธ” ์ตœ์ƒ๋‹จ์˜ ์˜์—ญ์„ ์ง€์ • - tbody : ํ…Œ์ด๋ธ” ๋ชธ์ฒด ์˜์—ญ์„ ์ง€์ • - tfoot : ํ…Œ์ด๋ธ” ์ตœํ•˜๋‹จ์˜ ์˜์—ญ์„ ์ง€์ • - colgroup : ์—ด ๊ทธ๋ฃน์„ ์ง€์ •ํ•˜์—ฌ ํ•˜๋‚˜ ์ด์ƒ์˜ ์—ด์— ๋™์ผํ•œ ํ˜•์‹์„ ์ง€์ •ํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉ - col : ๊ทธ๋ฃนํ™”๋œ ์—ด์„ ๋‚˜ํƒ€๋‚ด๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉ --> <h1>์นดํŽ˜ ๋ฉ”๋‰ดํŒ</h1> <table border="1"> <tr> <th width="200">๋ฉ”๋‰ด</th> <th width="100">๊ฐ€๊ฒฉ</th> <th width="100">์ข…๋ฅ˜</th> </tr> <!-- (tr>(td*3))*3 --> <tr> <td>์•„๋ฉ”๋ฆฌ์นด๋…ธ</td> <td>1,500</td> <td>hot/ice</td> </tr> <tr> <td>์นดํŽ˜๋ผ๋–ผ</td> <td>2,500</td> <td>hot/ice</td> </tr> <tr> <td>์•„์ด์Šคํ‹ฐ</td> <td>3,000</td> <td>ice</td> </tr> </table> <hr> <h1>์›”๋ณ„ ์ˆ˜์ž…</h1> <table border="1"> <thead> <tr> <th>์›”</th> <th>์ˆ˜์ž…</th> </tr> </thead> <tbody> <!-- (tr>td*2)*4 --> <tr> <td>09์›”</td> <td>1,000,000</td> </tr> <tr> <td>10์›”</td> <td>1,500,000</td> </tr> <tr> <td>11์›”</td> <td>2,000,000</td> </tr> <tr> <td>12์›”</td> <td>2,500,000</td> </tr> </tbody> <tfoot></tfoot> <tr> <td>ํ•ฉ๊ณ„</td> <td>7,000,000</td> </tr> </tfoot> </table> <hr> <h1>9์›” ๋‹ฌ๋ ฅ</h1> <table> <colgroup> <col style="background-color: red;"> <col span="6" style="background-color: cornflowerblue;"> </colgroup> <tr> <th>์ผ</th> <th>์›”</th> <th>ํ™”</th> <th>์ˆ˜</th> <th>๋ชฉ</th> <th>๊ธˆ</th> <th>ํ† </th> </tr> <!-- (tr>td{$}*7)*5 --> <tr> <td>1</td> <td>2</td> <td>3</td> <td>4</td> <td>5</td> <td>6</td> <td>7</td> </tr> <tr> <td>8</td> <td>9</td> <td>10</td> <td>11</td> <td>12</td> <td>13</td> <td>14</td> </tr> <tr> <td>15</td> <td style="background-color: hotpink;">16</td> <td style="background-color: hotpink;">17</td> <td style="background-color: hotpink;">18</td> <td>19</td> <td>20</td> <td>21</td> </tr> <tr> <td>22</td> <td>23</td> <td>24</td> <td>25</td> <td>26</td> <td>27</td> <td>28</td> </tr> <tr></tr> <td>29</td> <td>30</td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> </table> <div style="height: 500px;"></div> </body> </html>
HTML
๋ณต์‚ฌ

์ธ๋„ค์ผ ๋งŒ๋“ค๊ธฐ

โ€ข
thumnail.html
<!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>img - ์ด๋ฏธ์ง€ ํƒœ๊ทธ</title> </head> <body> <!-- <img> - src : ์ด๋ฏธ์ง€ ํŒŒ์ผ ๊ฒฝ๋กœ - width/height : ๊ฐ€๋กœ/์„ธ๋กœ ํฌ๊ธฐ ์ง€์ • - alt : ์ด๋ฏธ์ง€๋ฅผ ํ‘œ์‹œํ•˜์ง€ ๋ชปํ•œ ๊ฒฝ์šฐ ์ถœ๋ ฅํ•  ๋Œ€์ฒด ํ…์ŠคํŠธ - border : ํ…Œ๋‘๋ฆฌ ๊ตต๊ธฐ ์ง€์ • (px ๋‹จ์œ„) --> <div> <h2>HTML</h2> <a href="thumbnail-1.html"> <img src="img/logo-html.png" alt="logo-html" width="100" height="140" border="1"> </a> </div> <div> <h2>CSS</h2> <a href="thumbnail-2.html"> <img src="img/logo-css.png" alt="logo-css" width="100" height="140" border="1"> </a> </div> <div> <h2>JAVASCRIPT</h2> <a href="thumbnail-3.html"> <img src="img/logo-js.png" alt="logo-js" width="100" height="140" border="1"> </a> </div> <div> <h2>์ด๋ฏธ์ง€๊ฐ€ ์—†์„ ๋•Œ</h2> <img src="img/no.jpg" alt="๋Œ€์ฒด ํ…์ŠคํŠธ" title="์ด๋ฏธ์ง€"> </div> </body> </html>
HTML
๋ณต์‚ฌ
โ€ข
thumbnail-1.html
<!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>thumbnail</title> </head> <body> <img src="img/logo-html.png" alt="img/logo-html.png"> </body> </html>
HTML
๋ณต์‚ฌ
โ€ข
thumbnail-2.html
<!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>thumbnail</title> </head> <body> <img src="img/logo-css.png" alt="img/logo-css.png"> </body> </html>
HTML
๋ณต์‚ฌ
โ€ข
thumbnail-3.html
<!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>thumbnail</title> </head> <body> <img src="img/logo-js.png" alt="img/logo-js.png"> </body> </html>
HTML
๋ณต์‚ฌ