0422
HTML
- HyperText Markup Language
* HyperText: 문서의 링크를 클릭하면 연결된 다른 문서로 이동할 수 있는 기능을 제공하는 텍스트
* Markup: 문서의 어느 부분이 제목이고, 어느 부분이 본문이고, 어느 부분이 링크인지를 표시하기 위해서 특별한 기호(마크업, 태그)이 사용된다.
- 웹에서 웹 문서간에 빠르게 이동할 수 있는 문서를 만들 때 사용되는 언어가 HTML이다.

태그
- 태그는 '<'와 '>'로 구성된다.
* <body> <img> <table> <ul><br> - 태그의 이름은 소문자로 적는다.<br> - 태그는 여는 태그와 닫는 태그가 쌍으로 구성된다.<br> * 여는 태그: <table> <body> <head> <script type="text/javascript">if (!window.T) { window.T = {} } window.T.config = {"TOP_SSL_URL":"https://www.tistory.com","PREVIEW":false,"ROLE":"guest","PREV_PAGE":"","NEXT_PAGE":"","BLOG":{"id":1777466,"name":"monkey-k777","title":"N의 창고","isDormancy":false,"nickName":"monkey-k777","status":"open","profileStatus":"normal"},"NEED_COMMENT_LOGIN":false,"COMMENT_LOGIN_CONFIRM_MESSAGE":"","LOGIN_URL":"https://www.tistory.com/auth/login/?redirectUrl=https://monkey-k777.tistory.com/124","DEFAULT_URL":"https://monkey-k777.tistory.com","USER":{"name":null,"homepage":null,"id":0,"profileImage":null},"SUBSCRIPTION":{"status":"none","isConnected":false,"isPending":false,"isWait":false,"isProcessing":false,"isNone":true},"IS_LOGIN":false,"HAS_BLOG":false,"IS_SUPPORT":false,"TOP_URL":"http://www.tistory.com","JOIN_URL":"https://www.tistory.com/member/join","ROLE_GROUP":"visitor"}; window.T.entryInfo = {"entryId":124,"isAuthor":false,"categoryId":801851,"categoryLabel":"html"}; window.appInfo = {"domain":"tistory.com","topUrl":"https://www.tistory.com","loginUrl":"https://www.tistory.com/auth/login","logoutUrl":"https://www.tistory.com/auth/logout"}; window.initData = {}; window.TistoryBlog = { basePath: "", url: "https://monkey-k777.tistory.com", tistoryUrl: "https://monkey-k777.tistory.com", manageUrl: "https://monkey-k777.tistory.com/manage", token: "RslzDHkqsPHSHLzaWPEw7eNq5YLKHBgUvtORH6jdbQyuGwe5JudU3Vbny1IHOIRR" }; var servicePath = ""; var blogURL = "";</script> <br> * 닫는 태그: </table> <script type="text/javascript">(function($) { $(document).ready(function() { lightbox.options.fadeDuration = 200; lightbox.options.resizeDuration = 200; lightbox.options.wrapAround = false; lightbox.options.albumLabel = "%1 / %2"; }) })(tjQuery);</script> <div style="margin:0; padding:0; border:none; background:none; float:none; clear:none; z-index:0"></div> <script type="text/javascript" src="https://tistory1.daumcdn.net/tistory_admin/userblog/tistory-c9fbfae426e43fbd9d07ad246065fb3a17523cb3/static/script/common.js"></script> <script type="text/javascript">window.roosevelt_params_queue = window.roosevelt_params_queue || [{channel_id: 'dk', channel_label: '{tistory}'}]</script> <script type="text/javascript" src="//t1.daumcdn.net/midas/rt/dk_bt/roosevelt_dk_bt.js" async="async"></script> <script type="text/javascript" src="https://tistory1.daumcdn.net/tistory_admin/userblog/tistory-c9fbfae426e43fbd9d07ad246065fb3a17523cb3/static/script/menubar.min.js"></script> <script>window.tiara = {"svcDomain":"user.tistory.com","section":"글뷰","trackPage":"글뷰_보기","page":"글뷰","key":"1777466-124","customProps":{"userId":"0","blogId":"1777466","entryId":"124","role":"guest","trackPage":"글뷰_보기","filterTarget":false},"entry":{"entryId":"124","categoryName":"html","categoryId":"801851","author":"1330149","image":"","plink":"/124","tags":[]},"kakaoAppKey":"3e6ddd834b023f24221217e370daed18","appUserId":"null"}</script> <script type="module" src="https://t1.daumcdn.net/tistory_admin/frontend/tiara/v1.0.0/index.js"></script> <script src="https://t1.daumcdn.net/tistory_admin/frontend/tiara/v1.0.0/polyfills-legacy.min.js" nomodule="true" defer="true"></script> <script src="https://t1.daumcdn.net/tistory_admin/frontend/tiara/v1.0.0/index-legacy.js" nomodule="true" defer="true"></script> </body> <style type="text/css">.another_category { border: 1px solid #E5E5E5; padding: 10px 10px 5px; margin: 10px 0; clear: both; } .another_category h4 { font-size: 12px !important; margin: 0 !important; border-bottom: 1px solid #E5E5E5 !important; padding: 2px 0 6px !important; } .another_category h4 a { font-weight: bold !important; } .another_category table { table-layout: fixed; border-collapse: collapse; width: 100% !important; margin-top: 10px !important; } * html .another_category table { width: auto !important; } *:first-child + html .another_category table { width: auto !important; } .another_category th, .another_category td { padding: 0 0 4px !important; } .another_category th { text-align: left; font-size: 12px !important; font-weight: normal; word-break: break-all; overflow: hidden; line-height: 1.5; } .another_category td { text-align: right; width: 80px; font-size: 11px; } .another_category th a { font-weight: normal; text-decoration: none; border: none !important; } .another_category th a.current { font-weight: bold; text-decoration: none !important; border-bottom: 1px solid !important; } .another_category th span { font-weight: normal; text-decoration: none; font: 10px Tahoma, Sans-serif; border: none !important; } .another_category_color_gray, .another_category_color_gray h4 { border-color: #E5E5E5 !important; } .another_category_color_gray * { color: #909090 !important; } .another_category_color_gray th a.current { border-color: #909090 !important; } .another_category_color_gray h4, .another_category_color_gray h4 a { color: #737373 !important; } .another_category_color_red, .another_category_color_red h4 { border-color: #F6D4D3 !important; } .another_category_color_red * { color: #E86869 !important; } .another_category_color_red th a.current { border-color: #E86869 !important; } .another_category_color_red h4, .another_category_color_red h4 a { color: #ED0908 !important; } .another_category_color_green, .another_category_color_green h4 { border-color: #CCE7C8 !important; } .another_category_color_green * { color: #64C05B !important; } .another_category_color_green th a.current { border-color: #64C05B !important; } .another_category_color_green h4, .another_category_color_green h4 a { color: #3EA731 !important; } .another_category_color_blue, .another_category_color_blue h4 { border-color: #C8DAF2 !important; } .another_category_color_blue * { color: #477FD6 !important; } .another_category_color_blue th a.current { border-color: #477FD6 !important; } .another_category_color_blue h4, .another_category_color_blue h4 a { color: #1960CA !important; } .another_category_color_violet, .another_category_color_violet h4 { border-color: #E1CEEC !important; } .another_category_color_violet * { color: #9D64C5 !important; } .another_category_color_violet th a.current { border-color: #9D64C5 !important; } .another_category_color_violet h4, .another_category_color_violet h4 a { color: #7E2CB5 !important; } </style> <link rel="stylesheet" type="text/css" href="https://tistory1.daumcdn.net/tistory_admin/userblog/tistory-c9fbfae426e43fbd9d07ad246065fb3a17523cb3/static/style/revenue.css"/> <link rel="canonical" href="https://monkey-k777.tistory.com/124"/> <!-- BEGIN STRUCTURED_DATA --> <script type="application/ld+json"> {"@context":"http://schema.org","@type":"BlogPosting","mainEntityOfPage":{"@id":"https://monkey-k777.tistory.com/124","name":null},"url":"https://monkey-k777.tistory.com/124","headline":"0422","description":"0422 HTML - HyperText Markup Language * HyperText: 문서의 링크를 클릭하면 연결된 다른 문서로 이동할 수 있는 기능을 제공하는 텍스트 * Markup: 문서의 어느 부분이 제목이고, 어느 부분이 본문이고, 어느 부분이 링크인지를 표시하기 위해서 특별한 기호(마크업, 태그)이 사용된다. - 웹에서 웹 문서간에 빠르게 이동할 수 있는 문서를 만들 때 사용되는 언어가 HTML이다. 태그 - 태그는 &#39;&#39;로 구성된다. * - 태그의 이름은 소문자로 적는다. - 태그는 여는 태그와 닫는 태그가 쌍으로 구성된다. * 여는 태그: - 여는 태그와 닫는 태그 사이에는 컨텐츠나 다른 태그가 포함될 수 있다. * html 태그 연습 * html은 웹 문서를 만들 때 사용..","author":{"@type":"Person","name":"monkey-k777","logo":null},"image":{"@type":"ImageObject","url":"https://img1.daumcdn.net/thumb/R800x0/?scode=mtistory2&fname=https%3A%2F%2Ft1.daumcdn.net%2Ftistory_admin%2Fstatic%2Fimages%2FopenGraph%2Fopengraph.png","width":"800px","height":"800px"},"datePublished":"2019-06-17T20:19:03+09:00","dateModified":"2019-06-17T20:19:03+09:00","publisher":{"@type":"Organization","name":"TISTORY","logo":{"@type":"ImageObject","url":"https://t1.daumcdn.net/tistory_admin/static/images/openGraph/opengraph.png","width":"800px","height":"800px"}}} </script> <!-- END STRUCTURED_DATA --> <link rel="stylesheet" type="text/css" href="https://tistory1.daumcdn.net/tistory_admin/userblog/tistory-c9fbfae426e43fbd9d07ad246065fb3a17523cb3/static/style/dialog.css"/> <link rel="stylesheet" type="text/css" href="//t1.daumcdn.net/tistory_admin/www/style/top/font.css"/> <link rel="stylesheet" type="text/css" href="https://tistory1.daumcdn.net/tistory_admin/userblog/tistory-c9fbfae426e43fbd9d07ad246065fb3a17523cb3/static/style/postBtn.css"/> <link rel="stylesheet" type="text/css" href="https://tistory1.daumcdn.net/tistory_admin/userblog/tistory-c9fbfae426e43fbd9d07ad246065fb3a17523cb3/static/style/comment.css"/> <link rel="stylesheet" type="text/css" href="https://tistory1.daumcdn.net/tistory_admin/userblog/tistory-c9fbfae426e43fbd9d07ad246065fb3a17523cb3/static/style/tistory.css"/> <script type="text/javascript" src="https://tistory1.daumcdn.net/tistory_admin/userblog/tistory-c9fbfae426e43fbd9d07ad246065fb3a17523cb3/static/script/common.js"></script> <script type="text/javascript" src="https://tistory1.daumcdn.net/tistory_admin/userblog/tistory-c9fbfae426e43fbd9d07ad246065fb3a17523cb3/static/script/comment.js" defer=""></script> </head><br> - 여는 태그와 닫는 태그 사이에는 컨텐츠나 다른 태그가 포함될 수 있다.<br> * <h1>html 태그 연습</h1><br> * <p>html은 웹 문서를 만들 때 사용되는 언어다.</p><br> * <p><span>1위</span>방탄소년단</p><br> - 태그는 속성을 가질 수 있다.<br> * 속성은 속성명="속성값"으로 구성된다.<br> * <img src="images/cat.jpg" width="300" height="200" alt="예쁜 고양이"><br> - 태그간의 포함관계를 정확하게 표현해야 된다.<br> * <div><p>태그안에 다른 태그가 포함될 때는 여는 태그와 닫는 태그의 쌍을 맞춰야 한다.</p></div></p> <ul><li></li></ul> <p>html의 기본 구조<br><!doctype html></p> <html> <head> <script type="text/javascript">if (!window.T) { window.T = {} } window.T.config = {"TOP_SSL_URL":"https://www.tistory.com","PREVIEW":false,"ROLE":"guest","PREV_PAGE":"","NEXT_PAGE":"","BLOG":{"id":1777466,"name":"monkey-k777","title":"N의 창고","isDormancy":false,"nickName":"monkey-k777","status":"open","profileStatus":"normal"},"NEED_COMMENT_LOGIN":false,"COMMENT_LOGIN_CONFIRM_MESSAGE":"","LOGIN_URL":"https://www.tistory.com/auth/login/?redirectUrl=https://monkey-k777.tistory.com/124","DEFAULT_URL":"https://monkey-k777.tistory.com","USER":{"name":null,"homepage":null,"id":0,"profileImage":null},"SUBSCRIPTION":{"status":"none","isConnected":false,"isPending":false,"isWait":false,"isProcessing":false,"isNone":true},"IS_LOGIN":false,"HAS_BLOG":false,"IS_SUPPORT":false,"TOP_URL":"http://www.tistory.com","JOIN_URL":"https://www.tistory.com/member/join","ROLE_GROUP":"visitor"}; window.T.entryInfo = {"entryId":124,"isAuthor":false,"categoryId":801851,"categoryLabel":"html"}; window.appInfo = {"domain":"tistory.com","topUrl":"https://www.tistory.com","loginUrl":"https://www.tistory.com/auth/login","logoutUrl":"https://www.tistory.com/auth/logout"}; window.initData = {}; window.TistoryBlog = { basePath: "", url: "https://monkey-k777.tistory.com", tistoryUrl: "https://monkey-k777.tistory.com", manageUrl: "https://monkey-k777.tistory.com/manage", token: "RslzDHkqsPHSHLzaWPEw7eNq5YLKHBgUvtORH6jdbQyuGwe5JudU3Vbny1IHOIRR" }; var servicePath = ""; var blogURL = "";</script> <meta charset="utf-8" /> <title>처음으로 작성하는 html 문서

문서의 제목을 포함한다.

내용을 포함한다.

* : 현재 문서가 html5 작성 규칙에 맞춰서 작성된 웹 문서임을 나타낸다. * ~ : 웹 문서의 시작과 끝을 나타낸다. * ~ : 웹브라우저가 웹 문서를 해석하는데 필요한 정보를 입력하는 부분이다. 이 부분에 있는 정보는 실제 문서 내용이 아니기 때문에 화면에 표시되지 않는다. * ~
: 실제로 웹 브라우저에 표시되는 내용을 포함한다. 우리가 배우는 거의 대부분의 태그는 태그 안에 들어간다. *
: 줄 바꾸기. 콘텐츠를 포함하지 않음. 열자마자 닫는다. 브라우저: html 문서 -> 파싱(해석) -> Document 객체 생성 -> 태그마다 엘리먼트 객체 생성 -> 렌더링 -> 화면에 표시

0423
블록 엘리먼트(block element)와 인라인 엘리먼트(inline element)
- html 태그(엘리먼트)는 블록 엘리먼트와 인라인 엘리먼트로 나뉜다.
- 블록 엘리먼트는 인라인 엘리먼트로, 인라인 엘리먼트는 블록 엘리먼트로 바꿀 수 있다.
- 블록 엘리먼트
- 언제나 새로운 줄에서 시작한다.
- 좌우 양쪽으로 최대한 늘어나 가능한 모든 너비를 차지한다.
- 폭을 지정할 수 있다.
- 블록 엘리먼트 내의 콘텐츠를 왼쪽/오른쪽/가운데 정렬시킬 수 있다.
- div, h1 ~ h6, p, table, ul, ol, li, dl, dt, dd, form
- 인라인 엘리먼트
- 콘텐츠의 흐름을 끊지 않는다.
- 새로운 줄을 만들지 않고, 콘텐츠가 필요한 너비만 차지한다.
- span, a, img, strong, em, input, select, textarea, label, button
* 인라인 엘리먼트는 단독으로 표시되지 않는다.
인라인 엘리먼트는 블록 엘리먼트 안에 있어야 된다.

div, span 엘리먼트
- 통용 컨테이너 태그(엘리먼트다).
- CSS로 꾸미기 전에는 콘텐츠나 레이아웃에 어떤 영향도 주지 않는다.
- div 태그
- 블록 엘리먼트다.
- div나 다른 블록 엘리먼트, 인라인 엘리먼트들을 콘텐츠로 가진다.
- 여러 엘리먼트(태그)를 묶어서 스타일의 지정을 돕는 용도로 사용된다.
- 여러 엘리먼트(태그)를 묶어서 특정 영역으로 구분하는 용도로 사용된다.
- span 태그
- 인라인 엘리먼트다.
- 텍스트 콘텐츠를 묶어서 스타일의 지정을 돕는 용도로 사용된다.

id, class 속성
- 모든 엘리먼트(태그)는 id속성과 class속성을 가질 수 있다.
- id 속성은 해당 엘리먼트(태그)를 다른 엘리먼트와 구별하기 위해서 사용한다.
* html문서 안에 동일한 id속성값을 갖는 엘리먼트가 없어야 한다.
* id 속성값으로 특수문자를 사용할 수 없다.("_"와 "-"는 사용가능하다.)
* id 속성값은 문자(영어 대소문자)와 숫자를 사용할 수 있고, 숫자로 시작할 수 없다.
- class 속성은 엘리먼트(태그)에 동일한 스타일을 적용할 목적으로 사용한다.
* html 문서 안에 동일한 스타일이 적용될 엘리먼트는 동일한 class 속성값을 가지게 한다.
* class 속성값은 하나 이상의 값을 가질 수 있다.



버튼을 생성할 때 사용한다.

- input 태그
    - type 속성값에 따라서 다양한 입력 콘트롤을 생성할 수 있다.
    - 주요 타입 속성
        type="hidden"       사용자에게 보이지 않는 필드를 만든다.
        type="text"          한 줄 입력 텍스트필드를 만든다.
        type="password"   비밀번호 입력필드를 만든다.
        type="date"         날짜 입력 필드를 만든다.
        type="time"         시간 입력 필드를 만든다.
        type="number"     숫자 입력 필드를 만든다.
        type="email"        이메일 입력 필드를 만든다.
        type="url"            url 입력 필드를 만든다.
        type="file"           파일을 첨부할 수 있는 필드를 만든다.
        type="checkbox"  주어진 항목을 2개 이상 선택할 수 있는 체크박스를 만든다.
        type="radio"         주어진 항목에서 하나만 선택할 수 있는 라디오버튼을 만든다.
        type="submit"       입력된 값을 서버로 제출하는 버튼을 만든다.
        type="reset"        폼의 입력값을 원래 상태로 되돌리는 버튼을 만든다.
        type="button"       버튼을 만든다.
    - 주요 속성
        - type 속성: 입력 콘트롤의 형식을 지정한다.
        - name 속성: 입력된 값을 서버로 전송할 때 사용된다(필수).
        - id 속성: 입력 콘트롤을 식별하기 위해서 사용된다.
        - readonly 속성: 읽기 전용 입력 콘트롤로 만든다. 값을 변경할 수 없다.
        - disabled 속성:입력 콘트롤을 비활성화 시킨다. 값을 변경할 수 없고, 해당 입력 콘트롤의 같은 서버로 전송되지 않는다.
        - placeholder: 입력값 힌트를 제공한다.
        - maxlength: 최대 입력 문자 개수를 지정한다.
        - value: 입력값을 지정한다.
        - checked: 라디오버튼, 체크박스를 미리 선택되게 한다.

- select 태그
    - 콤보박스 생성
    - 사용자가 값을 입력하는 대신 나열된 값 중에 하나를 선택하도록 하는 드롭다운 목록을 생성한다.
       <select name="서버에전달할이름">
           <option value="값1">내용</option>
           <option value="값2">내용</option>
           <option value="값3">내용</option>
           <option value="값4">내용</option>
       </select>
        * 서버에는 선택된 옵션의 value에 설정된 값이 전달된다. 내용이 전달되지 않는다.
        - option태그의 주요 속성
            value: 서버로 전달될 값을 설정한다.
            disabled: 해당 항목을 선택하지 못하게 한다.
            selected: 해당 항목이 미리 선택되어 있게 한다.

    - textarea 태그
        - 여러 줄을 입력할 수 있는 텍스트영역을 만든다.
        - 주요 속성
            rows: 텍스트 영역의 세로 길이(행의 길이)를 설정한다.
            cols: 텍스트 영역의 가로 길이(문자 길이)를 설정한다.

'html' 카테고리의 다른 글

sample19~27(div, span, id, class, form 등)  (0) 2019.06.09
sample14~18(link, text, element)  (0) 2019.06.09
sample8~13 (table, img)  (0) 2019.06.09
sample1~7(title, text, list, table)  (0) 2019.06.09

+ Recent posts