맛보기 — 눌러서 들어 보세요A taste — tap to hear it
맛보기는 앞 두 장입니다. 모든 장은 책에 있습니다.
-
HTMLHTML
HTML에이치티엠엘
글의 각 부분이 무엇인지 표시해 문서의 구조를 적는 언어The language that marks what each part of a text is, writing down a document's structure
HTML 은 글이 어떻게 보일지가 아니라 그 글이 무엇인지를 적는다.HTML writes what the text is, not how it will look.
-
마크업 언어makeueop eoneo
markup language마크업 을랭궈지
글 사이에 표시를 끼워 그 글이 무엇인지 알려 주는 언어A language that puts marks in among text to say what the text is
마크업 언어는 글을 지우지 않고 그 위에 표시만 더한다.A markup language adds marks over the text without taking any away.
-
하이퍼텍스트haipeotekseuteu
hypertext하이퍼텍스트
다른 문서로 건너갈 수 있는 길이 글 안에 들어 있는 글Text with paths inside it that jump to other documents
하이퍼텍스트의 「하이퍼」가 링크로 건너가는 그 길이다.The hyper in hypertext is that path a link jumps along.
-
태그taegeu
tag태그
꺾쇠 안에 이름을 적어 요소가 여기서 시작하거나 끝남을 알리는 표시A name in angle brackets that marks where an element starts or ends
태그는 꺾쇠 둘로 감싼 이름이고, 요소는 태그와 그 안의 내용 전부다.A tag is a name in angle brackets; an element is the tags and everything inside.
-
콘텐츠 (내용)kontencheu
content칸텐트
태그 사이에 들어가는 실제 글과 요소The actual text and elements that sit between the tags
같은 태그라도 안에 담은 콘텐츠가 다르면 다른 쪽이 된다.The same tags with different content inside make a different page.
-
시맨틱 (의미)simaentik
semantics시맨틱스
글의 생김새가 아니라 그것이 무엇인지를 가리키는 뜻What a piece of text is, rather than how it looks
굵게 보이는 것과 중요하다는 뜻은 다르다 — 뒤쪽이 시맨틱이다.Looking bold and meaning important are not the same; the second is semantics.
-
웹 표준wep pyojun
web standard웨브 스탠더드
브라우저가 모두 같이 따르도록 공개로 적어 둔 규칙The rules written down in public so that every browser follows the same thing
표준에 적힌 것만 쓰면 어느 브라우저에서나 같이 돈다.Use only what the standard writes down and it works the same in every browser.
-
리빙 스탠다드 (살아 있는 표준)ribing seutaendadeu
living standard을리뷩 스탠더드
판 번호를 올리지 않고 늘 그 자리에서 고쳐 나가는 표준의 꼴A standard kept in one place and corrected as it goes, with no version numbers
HTML 은 판 번호를 더 올리지 않는다 — 한 자리에서 고쳐 나간다.HTML no longer raises a version number: it is corrected in one place.
-
브라우저beuraujeo
browser브라우저
HTML 을 받아 읽고 화면에 그려 주는 프로그램The program that takes HTML, reads it, and draws it on the screen
브라우저가 다르면 그린 모습은 조금 달라도 읽은 구조는 같다.Browsers may draw it a little differently, but the structure they read is the same.
-
사용자 에이전트sayongja eijeonteu
user agent유저 에이전트
표준에서 브라우저처럼 문서를 읽는 프로그램을 가리키는 말What the standard calls any program that reads the document, a browser included
표준이 「사용자 에이전트」라 적은 곳은 브라우저만이 아니다.Where the standard says user agent it does not mean only a browser.
-
파서 (해석기)paseo
parser파서
적어 둔 글자를 한 글자씩 읽어 요소의 나무로 바꾸는 부분The part that reads the written characters one by one and turns them into a tree of elements
파서는 멈추지 않는다 — 어긋난 곳도 정해진 방식대로 메워 읽는다.The parser does not stop: it fills in the broken places by a fixed rule and reads on.
-
파싱 (해석)pasing
parsing파싱
글자를 규칙대로 읽어 구조를 알아내는 일Reading characters by the rules to work out the structure
파싱이 끝나면 적어 둔 글자는 나무가 되어 있다.When parsing is done, the characters written down have become a tree.
-
DOM (문서 객체 모델)DOM
DOM돔
브라우저가 문서를 메모리에 올려 둔 모양 — 코드가 만지는 것은 이쪽이다The shape the browser holds the document in, in memory; this is what code touches
코드가 쪽을 바꿀 때 바꾸는 것은 적어 둔 글자가 아니라 DOM 이다.When code changes a page, what it changes is the DOM, not the characters written down.
-
DOM 트리 (문서 나무)DOM teuri
DOM tree돔 트리
요소가 부모와 자식으로 이어져 나무처럼 된 구조The structure where elements hang from one another as parent and child, like a tree
DOM 트리는 적어 둔 중첩을 그대로 닮는다 — 그래서 중첩을 바로 적는 것이 중요하다.The DOM tree mirrors the nesting as written, which is why nesting matters.
-
노드nodeu
node노우드
나무에 달린 한 점 — 요소 하나, 글자 덩이 하나, 주석 하나One point on the tree: an element, a run of text, or a comment
요소 사이의 줄바꿈도 글자 노드로 남는다.Even the newline between two elements stays as a text node.
-
렌더링 (그리기)rendeoring
rendering렌더링
나무로 만든 문서를 실제 화면의 그림으로 바꾸는 일Turning the document tree into what is actually drawn on screen
그리는 일은 CSS 의 몫이고, 무엇인지 적는 일은 HTML 의 몫이다.Drawing is CSS's part; saying what it is stays HTML's part.
-
오류 복구oryu bokgu
error recovery에러 리커븨리
적은 글이 규칙에 어긋나도 브라우저가 정해진 방식대로 메워 읽는 것The fixed way a browser fills in and keeps reading when the markup breaks the rules
닫지 않은 태그를 브라우저가 메워 주므로 틀려도 화면은 나온다 — 그래서 더 위험하다.The browser closes the tag you left open, so a mistake still shows: that is the danger.
-
하위 호환hawi hohwan
backward compatibility배쿼드 컴패터빌러티
오래전에 적은 문서도 새 브라우저에서 그대로 열리는 성질That a document written long ago still opens the same in a new browser
웹은 옛 문서를 버리지 않기로 했기 때문에 배운 것이 오래 남는다.The web chose not to drop old documents, so what is learned lasts.
-
명세myeongse
specification스페시퓌케이션
무엇이 어떻게 되어야 하는지 말로 적어 둔 문서The document that writes down in words what must be so and how
한 브라우저에서 되는 것과 표준에 적힌 것은 다르다.What works in one browser and what the standard writes down are not the same.
-
개발자 도구gaebalja dogu
developer tools디뷀러퍼 툴즈
브라우저가 지금 읽어 들인 나무와 값을 보여 주는 창The browser window that shows the tree and the values it has actually read in
적은 글과 개발자 도구에 보이는 나무가 다르면 중첩이 어긋난 것이다.If the tree in the tools differs from what you wrote, the nesting is broken.
-
구조gujo
structure스트럭처
어느 부분이 어느 부분 안에 들어 있는지의 짜임How the parts sit inside one another
구조가 바르면 꾸미기와 읽어 주기가 둘 다 쉬워진다.Get the structure right and both styling and reading aloud get easier.
-
독타입 (문서 종류 선언)doktaip
<!DOCTYPE html>독타입 에이치티엠엘
문서 맨 앞에 적어 표준 방식으로 읽으라고 알리는 한 줄The one line at the very top that asks for the document to be read the standard way
맨 첫 줄에 한 번만 적는다. 없으면 브라우저가 옛 방식으로 읽는다.Written once on the very first line; without it the browser reads the old way.
-
<html> 요소<html> yoso
<html>에이치티엠엘
문서 전체를 감싸는 가장 바깥 요소The outermost element that wraps the whole document
<html> 에 lang 을 적어 어느 말인지 알린다.Put lang on <html> to say which language this is.
-
<head> 요소<head> yoso
<head>헤드
문서에 대한 정보를 담고 화면에는 나오지 않는 부분The part that holds information about the document and is not drawn
<head> 안의 것은 보이지 않지만 창 이름과 검색 결과를 바꾼다.Nothing in <head> is seen, yet it changes the window name and the search result.
-
<body> 요소<body> yoso
<body>바디
사람이 보는 내용이 들어가는 부분The part that holds what a person sees
보이는 것은 모두 <body> 안에 있다.Everything that is seen sits inside <body>.
-
문자 인코딩munja inkoding
character encoding케릭터 인코우딩
글자를 숫자로 적어 둔 방식 — 이것이 어긋나면 글자가 깨진다The way characters are written down as numbers; mismatch it and the text breaks
문자 인코딩을 안 적으면 한글이 깨져 나올 수 있다.Leave the character encoding out and the text can come back broken.
-
UTF-8UTF-8
UTF-8유티에프 에잇
세상의 글자를 모두 담는 문자 인코딩 — 지금은 이것 하나로 적는다The character encoding that holds every writing system; today everything is written in it
UTF-8 한 가지만 쓰면 어느 글자든 깨지지 않는다.Use only UTF-8 and no writing system breaks.
-
<meta> 요소<meta> yoso
<meta>메타
문서에 대한 정보 한 가지를 적는 요소The element that writes down one piece of information about the document
<meta> 는 닫는 태그가 없는 빈 요소다.<meta> is a void element: there is no closing tag.
-
뷰포트 (보이는 칸)byupoteu
viewport뷰포트
화면에서 문서가 보이는 네모 — 휴대폰에서는 이 크기를 알려 주어야 한다The rectangle the document is seen through; on a phone its size must be declared
뷰포트를 알려 주지 않으면 휴대폰이 넓은 화면인 척 작게 줄여 보여 준다.Without the viewport line a phone pretends to be a wide screen and shrinks everything.
-
<title> 요소<title> yoso
<title>타이틀
창 이름과 검색 결과에 쓰이는 문서의 제목The document's title, used in the window name and in search results
<title> 은 쪽마다 다르게 적는다 — 탭이 여러 개일 때 가려야 하니까.Give every page a different <title>: tabs have to be told apart.
-
lang 속성lang sokseong
lang을랭
이 글이 어느 말로 적혀 있는지 알리는 속성The attribute that says which language the text is written in
lang 이 맞아야 읽어 주는 목소리가 바른 말로 읽는다.Get lang right and the reading voice says it in the right language.
-
메타데이터metadeiteo
metadata미터데이타
내용이 아니라 내용에 대한 정보Information about the content rather than the content itself
제목·설명·언어는 모두 메타데이터다.Title, description, and language are all metadata.
-
<link> 요소<link> yoso
<link>을링크
바깥 파일이나 다른 주소와 이 문서의 관계를 적는 요소The element that states this document's relation to an outside file or address
<link> 는 꾸밈 파일만 붙이는 것이 아니라 관계를 적는 요소다.<link> does not only attach styling: it states a relation.
-
스타일시트 연결seutailsiteu yeongyeol
stylesheet link스타일시트 을링크
꾸밈을 적어 둔 바깥 파일을 문서에 붙이는 한 줄The line that attaches an outside file of styling to the document
꾸밈은 바깥 파일로 빼 두면 여러 쪽이 같이 쓴다.Put the styling in an outside file and many pages share it.
-
<script> 요소<script> yoso
<script>스크립트
움직이는 코드를 문서에 붙이는 요소The element that attaches running code to the document
<script> 를 머리에 그냥 두면 문서를 읽던 일이 거기서 멈춘다.Leave a plain <script> in the head and reading the document stops there.
-
deferdefer
defer디퍼
문서를 다 읽은 뒤에 코드를 돌리라고 미루는 표시The mark that puts the code off until the document has been read to the end
defer 를 적으면 문서를 다 읽은 뒤에 코드가 돈다.Write defer and the code runs after the document has been read.
-
<base> 요소<base> yoso
<base>베이스
문서 안의 모든 상대 경로가 어디서 출발하는지 정하는 요소The element that sets where every relative path in the document starts from
<base> 를 적으면 짧게 적은 경로가 모두 그 자리를 기준으로 바뀐다.With <base> every short path is taken from that place instead.
-
파비콘pabikon
favicon퐤비칸
탭과 즐겨찾기에 나오는 작은 그림The small picture that shows on the tab and in bookmarks
파비콘은 <link> 로 붙인다.The favicon is attached with <link>.
-
문서munseo
document다큐멘트
한 쪽을 이루는 HTML 한 벌One set of HTML that makes up a page
한 문서는 한 독타입, 한 <html>, 한 <head>, 한 <body> 다.One document is one doctype, one <html>, one <head>, one <body>.
-
쿼크스 모드 (옛 방식)kwokeuseu modeu
quirks mode쿼크스 모우드
독타입이 없을 때 옛 브라우저 흉내로 읽는 방식The way a document is read, imitating old browsers, when the doctype is missing
독타입 한 줄을 빼면 쪽 전체가 옛 방식으로 읽힌다.Drop that one doctype line and the whole page is read the old way.
-
표준 모드pyojun modeu
standards mode스탠더즈 모우드
독타입이 있어 표준대로 읽히는 방식The way a document is read by the standard, because the doctype is there
독타입만 제대로 적으면 표준 모드다 — 더 할 일이 없다.Write the doctype properly and you are in standards mode; nothing more is needed.
-
글 방향geul banghyang
text direction텍스트 더렉션
글자가 왼쪽에서 가는지 오른쪽에서 가는지Whether the text runs from the left or from the right
오른쪽에서 가는 말은 dir 속성으로 알린다.For a language that runs from the right, say so with the dir attribute.
-
QHTML 은 무엇을 적는 언어야?HTML eun mueoseul jeongneun eoneoya?What does HTML write down?왓 더즈 에이치티엠엘 라잇 다운
A글의 각 부분이 무엇인지 적는다. 어떻게 보일지는 적지 않는다.geurui gak bubuni mueosinji jeongneunda. eotteoke boiljineun jeokji anneunda.What each part of the text is. Not how it will look.왓 이치 파트 어븨 둬 텍스트 이즈. 낫 하우 잇 윌 을룩.
-
Q태그와 요소는 뭐가 달라?taegeuwa yosoneun mwoga dalla?How do a tag and an element differ?하우 두 어 태그 앤드 앤 엘러먼트 디풔
A태그는 꺾쇠 안의 이름 하나고, 요소는 그 태그 둘과 사이의 내용을 합한 덩이다.taegeuneun kkeoksoe anui ireum hanago, yosoneun geu taegeu dulgwa saiui naeyongeul hapan deongida.A tag is one name in angle brackets; an element is both of its tags and what sits between them.어 태그 이즈 원 네임 인 앵글 브래킷츠 앤 엘러먼트 이즈 보우쓰 어븨 잇츠 태그즈 앤드 왓 싯츠 비트윈 뒘.
-
Q브라우저는 HTML 을 어떻게 읽어?beuraujeoneun HTML eul eotteoke ilgeo?How does a browser read HTML?하우 더즈 어 브라우저 레드 에이치티엠엘
A파서가 글자를 차례로 읽어 요소의 나무를 만들고, 그 나무를 화면에 그린다.paseoga geuljareul charyero ilgeo yosoui namureul mandeulgo, geu namureul hwamyeone geurinda.The parser reads the characters in order, builds a tree of elements, and draws that tree.둬 파서 리즈 둬 캐럭터즈 인 오더 빌즈 어 트리 어븨 엘러먼츠 앤드 드로즈 됏 트리.
-
Q적어 둔 글과 DOM 이 다를 수 있어?jeogeo dun geulgwa DOM i dareul su isseo?Can the written markup and the DOM differ?캔 둬 리튼 마크업 앤드 둬 돔 디풔
A그렇다. 중첩이 어긋나면 파서가 정해진 방식대로 메워 다른 나무가 된다.geureota. jungcheobi eogeunnamyeon paseoga jeonghaejin bangsikdaero mewo dareun namuga doenda.Yes. Where the nesting breaks, the parser fills it in by a fixed rule and a different tree comes out.예스. 웨어 둬 네스팅 브레이크스 둬 파서 퓔즈 잇 인 바이 어 퓍스트 룰 앤드 어 디풔런트 트리 컴즈 아웃.
-
Q코드가 쪽을 바꿀 때 무엇을 바꾸는 거야?kodeuga jjogeul bakkul ttae mueoseul bakkuneun geoya?What does code change when it changes a page?왓 더즈 코우드 체인지 웬 잇 체인지즈 어 페이지
A적어 둔 글자가 아니라 DOM 을 바꾼다. 다시 받아 오면 처음 글자로 돌아간다.jeogeo dun geuljaga anira DOM eul bakkunda. dasi bada omyeon cheoeum geuljaro doraganda.The DOM, not the characters written down. Fetch it again and you are back at the first characters.둬 돔 낫 둬 캐럭터즈 리튼 다운. 풰치 잇 어겐 앤드 유 아 백 앳 둬 풔스트 캐럭터즈.
-
QHTML 이 틀려도 쪽이 나오는 이유가 뭐야?HTML i teullyeodo jjogi naoneun iyuga mwoya?Why does a page still show when the HTML is wrong?와이 더즈 어 페이지 스틸 쇼우 웬 둬 에이치티엠엘 이즈 롱
A표준이 오류 복구를 정해 두었기 때문이다. 멈추지 않는 대신 틀린 것을 알려 주지도 않는다.pyojuni oryu bokgureul jeonghae dueotgi ttaemunida. meomchuji anneun daesin teullin geoseul allyeo jujido anneunda.Because the standard fixed error recovery. It does not stop, and it does not tell you either.비코즈 둬 스탠더드 퓍스트 에러 리커븨리. 잇 더즈 낫 스탑 앤드 잇 더즈 낫 텔 유 이둬.
-
Q리빙 스탠다드가 무슨 뜻이야?ribing seutaendadeuga museun tteusiya?What does living standard mean?왓 더즈 을리뷩 스탠더드 민
A판 번호를 올리지 않고 한 자리에서 고쳐 나가는 표준이라는 뜻이다. HTML5 라는 판이 더는 없다.pan beonhoreul olliji anko han jarieseo gochyeo naganeun pyojuniraneun tteusida. HTML5 raneun pani deoneun eopda.That the standard is corrected in one place with no version numbers; there is no HTML5 version any more.됏 둬 스탠더드 이즈 커렉티드 인 원 플레이스 위듸 노우 붜전 넘버즈 뒈어 이즈 노우 에이치티엠엘 퐈이븨 붜전 에니 모.
-
Q오래된 HTML 을 지금 열면 어떻게 돼?oraedoen HTML eul jigeum yeolmyeon eotteoke dwae?What happens opening old HTML today?왓 해픈즈 오우퍼닝 오울드 에이치티엠엘 터데이
A거의 그대로 열린다. 웹은 하위 호환을 지키기로 했기 때문이다.geoui geudaero yeollinda. webeun hawi hohwaneul jikigiro haetgi ttaemunida.It near enough opens as it was, because the web chose to keep backward compatibility.잇 니어 이너픠 오우픈즈 애즈 잇 워즈 비코즈 둬 웨브 초우즈 투 킵 배쿼드 컴패터빌러티.
-
Q「되는지」를 어디서 확인해?「doeneunji」reul eodiseo hwaginhae?Where do you settle whether something works?웨어 두 유 세틀 웨둬 섬씽 워크스
A한 브라우저에서 돌려 보는 것이 아니라 표준과 레퍼런스에서 그 줄을 찾는다.han beuraujeoeseo dollyeo boneun geosi anira pyojungwa repeoreonseueseo geu jureul channeunda.Not by running it in one browser, but by finding the line in the standard and the reference.낫 바이 러닝 잇 인 원 브라우저 벗 바이 퐈인딩 둬 을라인 인 둬 스탠더드 앤드 둬 레풔런스.
-
Q개발자 도구는 언제 봐?gaebalja doguneun eonje bwa?When do you look at the developer tools?웬 두 유 을룩 앳 둬 디뷀러퍼 툴즈
A적은 것과 실제로 읽힌 나무가 같은지 볼 때다. 다르면 중첩부터 의심한다.jeogeun geotgwa siljero ilkin namuga gateunji bol ttaeda. dareumyeon jungcheopbuteo uisimhanda.When checking whether what you wrote and the tree actually read in are the same; if not, suspect the nesting.웬 체킹 웨둬 왓 유 로우트 앤드 둬 트리 액추얼리 레드 인 아 둬 세임 이픠 낫 서스펙트 둬 네스팅
-
QAI 가 적어 준 쪽이 화면에는 잘 나와.AI ga jeogeo jun jjogi hwamyeoneneun jal nawa.The page AI wrote shows fine on screen.둬 페이지 에이아이 로우트 쇼우즈 퐈인 안 스크린.
A화면은 틀려도 나온다. 브라우저가 어긋난 곳을 메워 읽기 때문이다. 나무를 보고 검사기를 돌린다.hwamyeoneun teullyeodo naonda. beuraujeoga eogeunnan goseul mewo ikgi ttaemunida. namureul bogo geomsagireul dollinda.It shows even when wrong, because the browser fills in the broken places. Look at the tree and run the checker.잇 쇼우즈 이븬 웬 롱 비코즈 둬 브라우저 퓔즈 인 둬 브로우큰 플레이시즈. 을룩 앳 둬 트리 앤드 런 둬 체커.
-
QAI 가 「HTML5 에서는 이렇게 씁니다」라고 적어 왔어.AI ga 「HTML5 eseoneun ireoke sseumnida」rago jeogeo wasseo.AI said 'in HTML5 you write it like this'.에이아이 세드 인 에이치티엠엘 퐈이븨 유 라잇 잇 을라이크 뒤스.
AHTML 에는 이제 판 번호가 없다. 지금 표준에 그렇게 적혀 있는지 그 줄을 묻는다.HTML eneun ije pan beonhoga eopda. jigeum pyojune geureoke jeokyeo inneunji geu jureul munneunda.HTML has no version numbers any more. Ask for the line in the standard as it stands now.에이치티엠엘 해즈 노우 붜전 넘버즈 에니 모. 애스크 푀 둬 을라인 인 둬 스탠더드 애즈 잇 스탠즈 나우.
차례 — 17장Contents — 17 chapters
- 0처음Starting out
- 1문서의 뼈대The skeleton of a document
- 2요소와 속성Elements and attributes
- 3담을 수 있는 것What may go inside
- 4의미 구조Meaning in the structure
- 5제목 위계Heading hierarchy
- 6글과 목록Text and lists
- 7뜻이 다른 강조Emphasis that means different things
- 8링크와 경로Links and paths
- 9그림Images
- 10소리와 영상Audio and video
- 11표Tables
- 12폼 한 벌A form, end to end
- 13폼 검사와 묶음Form validation and grouping
- 14접근성Accessibility
- 15메타데이터와 나눠 보기Metadata and sharing
- 16템플릿과 확인하기Templates and checking