More Related Content Similar to 01. basic html5 Similar to 01. basic html5 (20) 01. basic html52. HTML์ ๊ตฌ์ฑ ์์
์์ (Elements): ์์ ํ๊ทธ์ ์ข
๋ฃ ํ๊ทธ๋ก ์ด๋ฃจ์ด์ง ๋ชจ๋ ๋ช
๋ น์ด
ํ๊ทธ (Tag): ์์์ ์ผ๋ถ, ์์ ํ๊ทธ(์์๋ฅผ ์์)์ ์ข
๋ฃ ํ๊ทธ(์์๋ฅผ ๋๋)๊ฐ ์์.
์์ฑ (Attributes): ๋ช
๋ น์ ๊ตฌ์ฒดํ ์ํค๋ ๊ฒ์ผ๋ก ์์์ ์์ํ๊ทธ ์์์ ์ฌ์ฉ๋จ.
๋ณ์ (Arguments): ์์ฑ๊ณผ ๊ด๋ จ๋ ๊ฐ.
4. head๋?
๋ค๋ฅธ ๋ฌธ์๋ฅผ ์ฐ๊ฒฐ
Css, js, php, etc
Example)
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css"
rel="stylesheet">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
๋ฌธ์์ ๋ฉํ๋ฐ์ดํฐ๋ฅผ ๊ธฐ๋ก
์ฐ๋ฆฌ ๋์๋ ๋ณด์ด์ง ์์ง๋ง ๋ธ๋ผ์ฐ์ ์ ๊ฒ์์์ง์ ์ฝ์ ์ ์์
Example)
<meta charset="UTF-8">
<meta property="og:image" content="http://news.karts.ac.kr/wp/wp-
content/themes/KNUANEWS/image/logo_thumbnail2.png" />
5. Body๋?
์ค์ ๋์ ๋ณด์ด๋ ๋ด์ฉ์ด ๊ตฌ์ฑ๋๋ ์์ญ
๋ณดํต์ header, main, footer๋ก ๊ตฌ์ฑ
๋ฐ๋์ ์งํฌ ํ์๋ ์์
Example)
http://www.chairone.co.kr/NEW/
http://www.stevenholl.com/
6. HTML ๊ธฐ์ด ๋ฌธ๋ฒ (1)
๋ชจ๋ ์์๋ ์๋ฒฝํ๊ฒ ์ค์ฒฉ๋์ด์ผ ํ๋ค
<p>This is a <strong>bad</p>example</strong> (X)
<p>This is a <strong>good</strong>example</p> (O)
๋ชจ๋ ์์ฑ๊ฐ์ ์์ฑ์ด ํจ๊ป ์ ์ธ๋์ด์ผ ํ๋ค.
<option value="wrong" selected>bad example</option> (X)
<option value="right" selected="selected">good example</option> (O)
๋ชจ๋ ์์์ ์์ฑ์ ์๋ฌธ์์ฌ์ผ ํ๋ค.
<DIV ID="idbox">bad example.</DIV> (X)
<div id="idbox">good example.</div> (O)
๋ชจ๋ ์์ฑ ๊ฐ์ ์ธ์ฉ ๋ถํธ("")์์ ํ๊ธฐํ๋ค.
<table border=1 cellpadding=0 cellspacing=0>..bad example..</table> (X)
<table border="1" cellpadding="0" cellspacing="0">..good example..</table> (O)
7. HTML ๊ธฐ์ด ๋ฌธ๋ฒ (2)
๋ชจ๋ ์์๋ ๋ซ์์ผ ํ๋ค.
<img src="good_sample.gif" alt="์ข์ ์์ ์ด๋ฏธ์ง" />
<input type="text" /> <hr /> <br />
text๋ URL, script์ ํฌํจ๋ ํน์ ๋ฌธ์๋ escape ์ํจ๋ค.
<, ", &, > ์ & l t ; , & q u o t ; , & a m p ;, & g t ; ๋ก escape
<a href="http://tab.search.daum.net/dsa/search?
nil_profile=g&nil_searchtitle=1&w=knowledge&q=">bad example</a> (X)
<a href="http://tab.search.daum.net/dsa/search?nil_profile=g & a m p ; nil_searchtitle=1 &
a m p ; w=knowledge & a m p ; q=">good example</a> (O)
9. ๋ฉํ๋ฐ์ดํฐ ์ฝํ
์ธ (Metadata Content)
๋ฉํ๋ฐ์ดํฐ๋ ๋๋จธ์ง ๋ด์ฉ์ ํํ ๋ฐ ํ๋์ ์ค์ ํจ
๋ค๋ฅธ ๋ฌธ์์์ ๊ด๊ณ๋ฅผ ์ค์ ํ๊ฑฐ๋, ๋ฏธ๋ถ๋ฅ ์ ๋ณด๋ค์ ํฌํจ
example)
base, command, link, meta, noscript, script, style, title
10. ํ๋ก์ฐ ์ฝํ
์ธ (flow content)
๋ฌธ์๋ฐ ์ดํ๋ฆฌ์ผ์ด์
์ Body์์ ์ฌ์ฉ๋๋ ๋๋ถ๋ถ์ ์์๋ ํ๋ก์ฐ ์ฝํ
์ธ ๋ก ๋ถ๋ฅ
example)
a, abbr, address, area (map ์์์ ์์ ์์์ธ ๊ฒฝ์ฐ), article, aside, audio, b, bdi, bdo,
blockquote, br, button, canvas, cite, code, command, datalist, del, details, dfn, div, dl, em,
embed, fieldset, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, hr, i, iframe,
img, input, ins, kbd, keygen, label, map, mark, math, menu, meter, nav, noscript, object, ol,
output, p, pre, progress, q, ruby, s, samp, script, section, select, small, span, strong, style
(scoped ์์ฑ์ด ์์ผ๋ฉด), sub, sup, svg, table, textarea, time, ul, var, video, wbr, text
11. ์น์
์ฝํ
์ธ (Section Conetnt)
์น์
์ฝํ
์ธ ๋ ํค๋ฉ๊ณผ ํธํฐ์ ์ ํจ๋ฒ์๋ฅผ ์ง์ ํจ
์ ๋ชฉ๊ณผ ๊ทธ ๋ด์ฉ์ ํฌํจํ๋ ๋ฒ์๋ฅผ ์ง์ ํจ
Example)
article, aside, nav, section
12. ํค๋ฉ ์ฝํ
์ธ (Heading Content)
ํค๋ฉ ์ฝํ
์ธ ๋ ์น์
(์น์
์ฝํ
์ธ ๋ ๋๋ ํค๋ฉ ์ฝํ
์ธ ์ ์ํด ์์์ ์ผ๋ก ๋งํฌ์
๋ ์์ญ)์
ํค๋๋ฅผ ์ ์
Example)
h1, h2, h3, h4, h5, h6, hgroup
13. ํ๋ ์ด์ง ์ฝํ
์ธ (Phrasing Content)
ํ๋ ์ด์ง ์ฝํ
์ธ ๋ ๋ฌธ์์ ํ
์คํธ์ด๋ฉฐ, ๊ทธ ํ
์คํธ๋ฅผ ๋จ๋ฝ ๋ด๋ถ๋ ๋ฒจ์์ ๋งํฌ์
์ ํ๋ ์
์์
ํ๋ ์ด์ง ์ฝํ
์ธ ๊ฐ ๋ชจ์ฌ ๋ฌธ๋จ์ ๊ตฌ์ฑ
Example)
a (ํ๋ ์ด์ง ์ฝํ
์ธ ๋ง์ ํฌํจํ๋ ๊ฒฝ์ฐ), abbr, area (map ์์์ ์์์์์ธ ๊ฒฝ์ฐ), audio, b,
bdi, bdo, br, button, canvas, cite, code, command, datalist, del (ํ๋ ์ด์ง ์ฝํ
์ธ ์ ํฌํจํ๋
๊ฒฝ์ฐ), dfn, em, embed, i, iframe, img, input, ins (ํ๋ ์ด์ง ์ฝํ
์ธ ๋ง์ ํฌํจํ๋ ๊ฒฝ์ฐ), kbd,
keygen, label, map (ํ๋ ์ด์ง ์ฝํ
์ธ ๋ง์ ํฌํจํ๋ ๊ฒฝ์ฐ), mark, math, meter, noscript, object,
output, progress, q, ruby, s, samp, script, select, small, span, strong, sub, sup, svg,
textarea, time, var, video, wbr, text
14. ์๋ฒ ๋๋ ์ฝํ
์ธ (Embedded Content)
์๋ฒ ๋๋ ์ฝํ
์ธ ๋ ๋ค๋ฅธ ๋ฆฌ์์ค(์์
, ์์ ๋ฑ)๋ฅผ ๋ฌธ์์ ์ฝ์
ํ๋ ์ฝํ
์ธ ๋, ๋ฌธ์์ ์ฝ์
๋ ๋ค๋ฅธ ํํ์์ ์ ๋ํ ์ฝํ
์ธ
Example)
audio, canvas, embed, iframe, img, math, object, svg, video