Category: Web Design

  • HTML 레이아웃 요소 구성하기

    HTML 레이아웃 요소 구성하기

    Heading은 문서에서 새로운 섹션(new section)이나 하위 섹션(sub-section)의 시작을 정의 할 때 완벽하게 효율적인 접근이지만, 더 명확하고 정확한 의미 구조(semantic structure)를 확립하기 위해 잘못 사용될 수 있는 여지가 있습니다.

    div 엘리먼트는 주로 CSS를 걸 수 있는 스캐폴딩(scaffolding)으로 사용되는 섹션을 포함하는 데 사용할 수 있지만 큰 의미는 없습니다. 단면 처리(sectioning)에는 기사(articles), 머리글(headers), 바닥 글(footers) 및 내비게이션(navigation)과 같이 페이지의 특정 부분을 정의하는 데 사용할 수 있는 몇 개의 태그가 포함됩니다.

    Articles과 Sections

    article 요소는 독립형 콘텐츠 섹션을 마크업하는 데 사용할 수 있습니다. 예를 들어 블로그 게시물을 기사로 생각하거나 많은 기사가 담긴 전통적인 신문 페이지를 복제하는 경우 여러 번 생각하면 이 작업은 한 번만 사용할 수 있습니다.

    섹션 요소는 보다 일반적인 섹션을 나타내며 예를 들어 기사를 분할하거나 챕터(chapters)를 나타내는 데 사용할 수 있습니다.

    <article>
        <section id="intro">
            <p>[An introduction]</p>
        </section>
        <section id="main_content">
            <p>[Content]</p>
        </section>
        <section id="related">
            <ul>
                <li><a href="that.html">That related article</a></li>
                <li><a href="this.html">This related article</a></li>
            </ul>
        </section>
    </article>

    div가 이러한 분리를 만드는 데 사용될 수 있지만 ( 또는 스타일링을 위해 이러한 구분이 필요하지 않은 경우에도 ) 훨씬 풍부하고 의미 있는 문서를 제공합니다.

    Headers와 Footers

    머리글(Headers)과 바닥 글(Footers)은 보다 전문화되고 자체 설명이 가능한 섹션을 제공합니다.

    <body>
        <article>
            <header>
                <h1>Alternatively…</h1>
                <p>[An introduction]</p>
            </header>
            <section id="main_content">
                <p>[Content]</p>
            </section>
            <footer>
                <p>[End notes]</p>
            </footer>
        </article>
        <footer>
            <p>[Copyright bumf]</p>
        </footer>
    </body>

    바닥 글(Footers)은 포함되어있는 섹션의 꼬리말입니다. 위의 예에서 첫 번째 바닥 글은 집필의 바닥 글이고 두 번째 바닥 글은 페이지의 바닥 글입니다.

    Asides

    Aside는 콘텐츠를 둘러싼 콘텐츠와 관련된 콘텐츠를 나타내는 데 사용할 수 있습니다.
    Article에서 관련 정보의 인용 내용 또는 미리보기를 생각해보십시오.

    <section id="main_content">
        <h1>Tixall</h1>
        <p>[All about Tixall]</p>
        <aside>
            <h2>Tixall Obelisk</h2>
            <p>[A short note about Tixall Obelisk]</p>
        </aside>
        <p>[Maybe a bit more about Tixall]</p>
    </section>

    Aside는 콘텐츠를 둘러싼 콘텐츠와 관련된 콘텐츠를 나타내는 데 사용할 수 있습니다.
    Article에서 관련 정보의 인용 내용 또는 미리보기를 생각해보십시오.

    우리가 이 구조에 집중하는 동안,
    figures를 포함 시키려면, 그 일을하기위한 두 개의 태그가있을 수 있습니다.

    <figure>
        <img src="pictures.jpg">
        <figcaption>My Birthday Party</figcaption>
    </figure>

    img 요소는 alt 속성이 필요 없다는 것을 명심하십시오. figcaption (맞춤법이 필요한 경우 “figure caption”)이 해당 작업을 수행하면됩니다.

    Navigation

    마지막으로 내비게이션 링크 그룹을 마크업하는 데 사용되는 nav가 있습니다.

    <nav id="main_nav">
        <ul>
            <li><a href="/tutorials/">Tutorials</a></li>
            <li><a href="/techniques/">Techniques</a></li>
            <li><a href="/examples/">Examples</a></li>
            <li><a href="/references/">References</a></li>
        </ul>
    </nav>
  • HTML 레이아웃 구성 태그

    HTML 레이아웃 구성 태그

    HTML Tag : article

    독립적인 HTML 문서의 독립 섹션. 예를 들어 블로그 게시물을 기사로 생각하면 이 요소를 한 번만 사용할 수 있습니다. 많은 기사가 포함된 전통적인 신문 페이지를 복제한다고 생각하면 여러 번 사용할 수 있습니다.

    <h1>The Daily News</h1>
    
    <article>
        <h2>Man Eats House</h2>
        <!-- article content -->
    </article>
    
    <article>
        <h2>Martian Mice Invade Ecuador</h2>
        <!-- article content -->
    </article>

    HTML Tag : section

    HTML 문서의 일반적인 섹션을 예를 들어, 기사(articles)를 분할하거나 챕터(chapters)를 나타내는 데 사용할 수 있습니다.

    <article>
        <section id="intro">
            <!-- An introduction -->
        </section>
        <section id="main_content">
            <!-- Main content -->
        </section>
        <section id="related">
            <ul>
                <li><a href="that.html">That related article</a></li>
                <li><a href="this.html">This related article</a></li>
            </ul>
        </section>
    </article>

    HTML Tag : header

    소개 콘텐츠 또는 내비게이션 기능이 포함 된 페이지 또는 섹션의 머리글(headers)입니다.

    <body>
        <header>
            <!-- A header for the page. -->
        </header>
    
        <section>
            <header>
                <!-- A header for the section. -->
            </header>
        </section>
    </body>

    페이지 또는 섹션의 바닥 글(footers). 여기에는 포스트 스크립트, 부록 또는 관련 페이지에 대한 링크와 같은 내용이 포함될 수 있습니다.

    <body>
        <section>
            <!-- stuff -->
            <footer>
                <!-- A footer for the section. -->
            </footer>
        </section>
    
        <footer>
            <!-- A footer for the page. -->
        </footer>
    </body>

    HTML Tag : aside

    콘텐츠를 둘러싼 콘텐츠와 관련이 있지만, 콘텐츠와 별개입니다. 기사(articles)에서 관련 정보의 인용 글 또는 미리보기는 aside 태그로 마크업 할 수 있는 콘텐츠의 예입니다.

    <section id="main_content">
        <h1>Tixall</h1>
        <!-- All about Tixall -->
        <aside>
            <h2>Tixall Obelisk</h2>
            <!-- A short note about Tixall Obelisk -->
        </aside>
        <!-- A bit more about Tixall -->
    </section>

    HTML Tag : nav

    내비게이션 영역 – 다른 페이지 또는 페이지의 섹션에 대한 주요 연결 그룹입니다.

    <nav id="main_nav">
        <ul>
            <li><a href="/tutorials/">Tutorials</a></li>
            <li><a href="/techniques/">Techniques</a></li>
            <li><a href="/examples/">Examples</a></li>
            <li><a href="/references/">References</a></li>
        </ul>
    </nav>

    HTML Tag : figure

    그림(Figure). 일반적으로 페이지의 주 콘텐츠에서 참조되는 자체 포함 된 설명 콘텐츠. 관련 사진이나 차트를 원하는 곳에 사용됩니다.

    <figure>
        <img src="obelisk.jpg">
        <figcaption>Tixall Obelisk</figcaption>
    </figure>
  • HTML 레이아웃 표현 방법 III

    HTML 레이아웃 표현 방법 III

    페이지 레이아웃 1 : 2 columns – 1 단계 : 네비게이션 열의 위치 지정.
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Page layout 1</title>
        <style>
            body {
                font: 80% arial, helvetica, sans-serif;
                margin: 0;
            }
            
            #navigation {
                position: absolute;
                left: 0;
                width: 15em;
            }
    
            #content {
                color: #ccc;
            }
            
            
        </style>
    </head>
    <body>
    
        <div id="navigation">
            <ul>
                <li><a href="">Biology</a></li>
                <li><a href="">Evolution</a></li>
                <li><a href="">Natural Selection</a></li>
                <li><a href="">Genetics</a></li>
            </ul>
            <ul>
                <li><a href="">Erasmus Darwin</a></li>
                <li><a href="">Lamarck</a></li>
                <li><a href="">Charles Darwin</a></li>
                <li><a href="">Wallace</a></li>
                <li><a href="">Dawkins</a></li>
            </ul>
        </div>
    
        <div id="content">
            <h2>On the Origin of The Origin</h2>
            <p>Darwin's father was dead set on his son becoming a cleric but even though the young rapscallion began to study theology he found worms much more interesting.</p>
            <p>When a lonely man with a moustache asked Darwin to ride with him on his boat named after a dog, Darwin agreed and set off around the world fiddling with wildlife.</p>
            <p>Some say it was a load of birds from a bunch of islands hundreds of miles off the Ecuadorean coast that inspired his now widely accepted explanation of the mechanism of evolution. "Why does that bird on that island have a beak like that while that finch on that island has a beak like that? AHA! I've got it! Natural Selection!" he thought. It wasn't actually quite like that, but, y'know, it's a fine, popular romantic myth.</p>
    
            <h2>The Origin</h2>
            <p>Upon return from his jaunt, Charles chronicled his escapades (as <em>The Voyage of the Beagle</em>) and got a bit carried away with barnacles, although his theory of evolution was always ticking away in the back of his mind.</p>
            <p>Some 20 or so year after he returned to England, a Welsh naturalist by the name of Wallace popped up with a similar idea to Darwin's grand theory. Darwin got a move on.</p>
            <p>In 1858 a paper jointly attributed to Darwin and Wallace was presented to the Linnean Society of London that sent rumbles across the establishment and really ticked off a fair few people. The next year saw the publication of Darwin's 500-page "abstract" - <em>On The Origin of Species by Means of Natural Selection or the Preservation of Favoured Races In The Struggle For Life</em> (or <abbr>OTOOSBMONSOTPOFRITSFL</abbr> for short).</p>
            <p>Darwin, already a prominent arc in scientific circles, was propelled into megastardom.</p>
    
            <h2>After The Origin</h2>
            <p>Chuck D revised The Origin five times, toning down each one a bit more than the one before it, partly to appease his religious wife. Who also happened to be his cousin. But some years later he'd had enough of trying to disguise the logical conclusion that humans are descended from the same common ancestor as all other animals and his third classic, <em>The Descent of Man</em>, was published and <em>really</em> pissed off the religious establishment.</p>
        </div>
    
    </body>
    </html>
    페이지 레이아웃 2 : 2 columns – 2 단계 : 여백을 사용하여 네비게이션 열 아래에서 콘텐츠를 밀어냅니다.
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Page layout 2</title>
        <style>
            body {
                font: 80% arial, helvetica, sans-serif;
                margin: 0;
            }
            
            #navigation {
                position: absolute;
                left: 0;
                width: 15em;
            }
            #content {
                margin-left: 15em;
            }
        </style>
    </head>
    <body>
        <div id="navigation">
            <ul>
                <li><a href="">Biology</a></li>
                <li><a href="">Evolution</a></li>
                <li><a href="">Natural Selection</a></li>
                <li><a href="">Genetics</a></li>
            </ul>
            <ul>
                <li><a href="">Erasmus Darwin</a></li>
                <li><a href="">Lamarck</a></li>
                <li><a href="">Charles Darwin</a></li>
                <li><a href="">Wallace</a></li>
                <li><a href="">Dawkins</a></li>
            </ul>
        </div>
        <div id="content">
            <h2>On the Origin of The Origin</h2>
            <p>Darwin's father was dead set on his son becoming a cleric but even though the young rapscallion began to study theology he found worms much more interesting.</p>
            <p>When a lonely man with a moustache asked Darwin to ride with him on his boat named after a dog, Darwin agreed and set off around the world fiddling with wildlife.</p>
            <p>Some say it was a load of birds from a bunch of islands hundreds of miles off the Ecuadorean coast that inspired his now widely accepted explanation of the mechanism of evolution. "Why does that bird on that island have a beak like that while that finch on that island has a beak like that? AHA! I've got it! Natural Selection!" he thought. It wasn't actually quite like that, but, y'know, it's a fine, popular romantic myth.</p>
            <h2>The Origin</h2>
            <p>Upon return from his jaunt, Charles chronicled his escapades (as <em>The Voyage of the Beagle</em>) and got a bit carried away with barnacles, although his theory of evolution was always ticking away in the back of his mind.</p>
            <p>Some 20 or so year after he returned to England, a Welsh naturalist by the name of Wallace popped up with a similar idea to Darwin's grand theory. Darwin got a move on.</p>
            <p>In 1858 a paper jointly attributed to Darwin and Wallace was presented to the Linnean Society of London that sent rumbles across the establishment and really ticked off a fair few people. The next year saw the publication of Darwin's 500-page "abstract" - <em>On The Origin of Species by Means of Natural Selection or the Preservation of Favoured Races In The Struggle For Life</em> (or <abbr>OTOOSBMONSOTPOFRITSFL</abbr> for short).</p>
            <p>Darwin, already a prominent arc in scientific circles, was propelled into megastardom.</p>
            <h2>After The Origin</h2>
            <p>Chuck D revised The Origin five times, toning down each one a bit more than the one before it, partly to appease his religious wife. Who also happened to be his cousin. But some years later he'd had enough of trying to disguise the logical conclusion that humans are descended from the same common ancestor as all other animals and his third classic, <em>The Descent of Man</em>, was published and <em>really</em> pissed off the religious establishment.</p>
        </div>
    </body>
    </html>
    페이지 레이아웃 3 : 테두리를 사용하여 열의 배경을 제공합니다.
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Page layout 3</title>
        <style>
            body {
                font: 80% arial, helvetica, sans-serif;
                margin: 0;
            }
            
            h2 {
                margin-top: 0;
            }
            
            #navigation {
                position: absolute;
                left: 0;
                width: 15em;
            }
            #content {
                border-left: 15em solid #ccf;
            }
        </style>
    </head>
    <body>
        <div id="navigation">
            <ul>
                <li><a href="">Biology</a></li>
                <li><a href="">Evolution</a></li>
                <li><a href="">Natural Selection</a></li>
                <li><a href="">Genetics</a></li>
            </ul>
            <ul>
                <li><a href="">Erasmus Darwin</a></li>
                <li><a href="">Lamarck</a></li>
                <li><a href="">Charles Darwin</a></li>
                <li><a href="">Wallace</a></li>
                <li><a href="">Dawkins</a></li>
            </ul>
        </div>
        <div id="content">
            <h2>On the Origin of The Origin</h2>
            <p>Darwin's father was dead set on his son becoming a cleric but even though the young rapscallion began to study theology he found worms much more interesting.</p>
            <p>When a lonely man with a moustache asked Darwin to ride with him on his boat named after a dog, Darwin agreed and set off around the world fiddling with wildlife.</p>
            <p>Some say it was a load of birds from a bunch of islands hundreds of miles off the Ecuadorean coast that inspired his now widely accepted explanation of the mechanism of evolution. "Why does that bird on that island have a beak like that while that finch on that island has a beak like that? AHA! I've got it! Natural Selection!" he thought. It wasn't actually quite like that, but, y'know, it's a fine, popular romantic myth.</p>
            <h2>The Origin</h2>
            <p>Upon return from his jaunt, Charles chronicled his escapades (as <em>The Voyage of the Beagle</em>) and got a bit carried away with barnacles, although his theory of evolution was always ticking away in the back of his mind.</p>
            <p>Some 20 or so year after he returned to England, a Welsh naturalist by the name of Wallace popped up with a similar idea to Darwin's grand theory. Darwin got a move on.</p>
            <p>In 1858 a paper jointly attributed to Darwin and Wallace was presented to the Linnean Society of London that sent rumbles across the establishment and really ticked off a fair few people. The next year saw the publication of Darwin's 500-page "abstract" - <em>On The Origin of Species by Means of Natural Selection or the Preservation of Favoured Races In The Struggle For Life</em> (or <abbr>OTOOSBMONSOTPOFRITSFL</abbr> for short).</p>
            <p>Darwin, already a prominent arc in scientific circles, was propelled into megastardom.</p>
            <h2>After The Origin</h2>
            <p>Chuck D revised The Origin five times, toning down each one a bit more than the one before it, partly to appease his religious wife. Who also happened to be his cousin. But some years later he'd had enough of trying to disguise the logical conclusion that humans are descended from the same common ancestor as all other animals and his third classic, <em>The Descent of Man</em>, was published and <em>really</em> pissed off the religious establishment.</p>
        </div>
    </body>
    </html>
    페이지 레이아웃 4 : 3 columns
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Page layout 4</title>
        <style>
            body {
                font: 80% arial, helvetica, sans-serif;
                margin: 0;
            }
            
            h2 {
                margin-top: 0;
            }
            
            #navigation1 {
                position: absolute;
                left: 0;
                width: 200px;
            }
            #navigation2 {
                position: absolute;
                right: 0;
                width: 150px;
            }
        
            #content {
                margin: 0 150px 0 200px;
            }
        </style>
    </head>
    <body>
        <div id="navigation1">
            <ul>
                <li><a href="">Biology</a></li>
                <li><a href="">Evolution</a></li>
                <li><a href="">Natural Selection</a></li>
                <li><a href="">Genetics</a></li>
            </ul>
        </div>
        <div id="navigation2">
            <ul>
                <li><a href="">Erasmus Darwin</a></li>
                <li><a href="">Lamarck</a></li>
                <li><a href="">Charles Darwin</a></li>
                <li><a href="">Wallace</a></li>
                <li><a href="">Dawkins</a></li>
            </ul>
        </div>
        <div id="content">
            <h2>On the Origin of The Origin</h2>
            <p>Darwin's father was dead set on his son becoming a cleric but even though the young rapscallion began to study theology he found worms much more interesting.</p>
            <p>When a lonely man with a moustache asked Darwin to ride with him on his boat named after a dog, Darwin agreed and set off around the world fiddling with wildlife.</p>
            <p>Some say it was a load of birds from a bunch of islands hundreds of miles off the Ecuadorean coast that inspired his now widely accepted explanation of the mechanism of evolution. "Why does that bird on that island have a beak like that while that finch on that island has a beak like that? AHA! I've got it! Natural Selection!" he thought. It wasn't actually quite like that, but, y'know, it's a fine, popular romantic myth.</p>
            <h2>The Origin</h2>
            <p>Upon return from his jaunt, Charles chronicled his escapades (as <em>The Voyage of the Beagle</em>) and got a bit carried away with barnacles, although his theory of evolution was always ticking away in the back of his mind.</p>
            <p>Some 20 or so year after he returned to England, a Welsh naturalist by the name of Wallace popped up with a similar idea to Darwin's grand theory. Darwin got a move on.</p>
            <p>In 1858 a paper jointly attributed to Darwin and Wallace was presented to the Linnean Society of London that sent rumbles across the establishment and really ticked off a fair few people. The next year saw the publication of Darwin's 500-page "abstract" - <em>On The Origin of Species by Means of Natural Selection or the Preservation of Favoured Races In The Struggle For Life</em> (or <abbr>OTOOSBMONSOTPOFRITSFL</abbr> for short).</p>
            <p>Darwin, already a prominent arc in scientific circles, was propelled into megastardom.</p>
            <h2>After The Origin</h2>
            <p>Chuck D revised The Origin five times, toning down each one a bit more than the one before it, partly to appease his religious wife. Who also happened to be his cousin. But some years later he'd had enough of trying to disguise the logical conclusion that humans are descended from the same common ancestor as all other animals and his third classic, <em>The Descent of Man</em>, was published and <em>really</em> pissed off the religious establishment.</p>
        </div>
    </body>
    </html>
    페이지 레이아웃 5 : 헤더(Header) 추가
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Page layout 5</title>
        <style>
            body {
                font: 80% arial, helvetica, sans-serif;
                margin: 0;
            }
            
            h1, h2 {
                margin: 0;
            }
            
            #header {
                background: #ccc;
            }
            
            #navigation {
                position: absolute;
                left: 0;
                top: 70px;
                width: 150px;
            }
            
            #content {
                margin-left: 150px;
            }
        </style>
    </head>
    <body>
        <div id="header">
            <h1>Charles Darwin</h1>
        </div>
        <div id="navigation">
            <ul>
                <li><a href="">Biology</a></li>
                <li><a href="">Evolution</a></li>
                <li><a href="">Natural Selection</a></li>
                <li><a href="">Genetics</a></li>
            </ul>
            <ul>
                <li><a href="">Erasmus Darwin</a></li>
                <li><a href="">Lamarck</a></li>
                <li><a href="">Charles Darwin</a></li>
                <li><a href="">Wallace</a></li>
                <li><a href="">Dawkins</a></li>
            </ul>
        </div>
        <div id="content">
            <h2>On the Origin of The Origin</h2>
            <p>Darwin's father was dead set on his son becoming a cleric but even though the young rapscallion began to study theology he found worms much more interesting.</p>
            <p>When a lonely man with a moustache asked Darwin to ride with him on his boat named after a dog, Darwin agreed and set off around the world fiddling with wildlife.</p>
            <p>Some say it was a load of birds from a bunch of islands hundreds of miles off the Ecuadorean coast that inspired his now widely accepted explanation of the mechanism of evolution. "Why does that bird on that island have a beak like that while that finch on that island has a beak like that? AHA! I've got it! Natural Selection!" he thought. It wasn't actually quite like that, but, y'know, it's a fine, popular romantic myth.</p>
            <h2>The Origin</h2>
            <p>Upon return from his jaunt, Charles chronicled his escapades (as <em>The Voyage of the Beagle</em>) and got a bit carried away with barnacles, although his theory of evolution was always ticking away in the back of his mind.</p>
            <p>Some 20 or so year after he returned to England, a Welsh naturalist by the name of Wallace popped up with a similar idea to Darwin's grand theory. Darwin got a move on.</p>
            <p>In 1858 a paper jointly attributed to Darwin and Wallace was presented to the Linnean Society of London that sent rumbles across the establishment and really ticked off a fair few people. The next year saw the publication of Darwin's 500-page "abstract" - <em>On The Origin of Species by Means of Natural Selection or the Preservation of Favoured Races In The Struggle For Life</em> (or <abbr>OTOOSBMONSOTPOFRITSFL</abbr> for short).</p>
            <p>Darwin, already a prominent arc in scientific circles, was propelled into megastardom.</p>
            <h2>After The Origin</h2>
            <p>Chuck D revised The Origin five times, toning down each one a bit more than the one before it, partly to appease his religious wife. Who also happened to be his cousin. But some years later he'd had enough of trying to disguise the logical conclusion that humans are descended from the same common ancestor as all other animals and his third classic, <em>The Descent of Man</em>, was published and <em>really</em> pissed off the religious establishment.</p>
        </div>
    </body>
    </html>
    페이지 레이아웃 6 : Footer은(는) 절대 위치(absolute)의 열(columns)과 항상 작동하지 않습니다.
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Page layout 6</title>
        <style>
            body {
                font: 80% arial, helvetica, sans-serif;
                margin: 0;
            }
            
            h1, h2 {
                margin: 0;
            }
            
            #header {
                background: #ccc;
            }
            
            #navigation {
                position: absolute;
                left: 0;
                width: 150px;
            }
            
            #content {
                margin-left: 150px;
            }
            
            #footer {
                background: #ccc;
            }
            
            #footer p {
                margin: 0;
            }
        </style>
    </head>
    <body>
        <div id="header">
            <h1>Charles Darwin</h1>
        </div>
        <div id="navigation">
            <ul>
                <li><a href="">Biology</a></li>
                <li><a href="">Evolution</a></li>
                <li><a href="">Natural Selection</a></li>
                <li><a href="">Genetics</a></li>
            </ul>
            <ul>
                <li><a href="">Erasmus Darwin</a></li>
                <li><a href="">Lamarck</a></li>
                <li><a href="">Charles Darwin</a></li>
                <li><a href="">Wallace</a></li>
                <li><a href="">Dawkins</a></li>
            </ul>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
        </div>
        <div id="content">
            <h2>On the Origin of The Origin</h2>
            <p>Darwin's father was dead set on his son becoming a cleric but even though the young rapscallion began to study theology he found worms much more interesting.</p>
            <p>When a lonely man with a moustache asked Darwin to ride with him on his boat named after a dog, Darwin agreed and set off around the world fiddling with wildlife.</p>
            <p>Some say it was a load of birds from a bunch of islands hundreds of miles off the Ecuadorean coast that inspired his now widely accepted explanation of the mechanism of evolution. "Why does that bird on that island have a beak like that while that finch on that island has a beak like that? AHA! I've got it! Natural Selection!" he thought. It wasn't actually quite like that, but, y'know, it's a fine, popular romantic myth.</p>
            <h2>The Origin</h2>
            <p>Upon return from his jaunt, Charles chronicled his escapades (as <em>The Voyage of the Beagle</em>) and got a bit carried away with barnacles, although his theory of evolution was always ticking away in the back of his mind.</p>
            <p>Some 20 or so year after he returned to England, a Welsh naturalist by the name of Wallace popped up with a similar idea to Darwin's grand theory. Darwin got a move on.</p>
            <p>In 1858 a paper jointly attributed to Darwin and Wallace was presented to the Linnean Society of London that sent rumbles across the establishment and really ticked off a fair few people. The next year saw the publication of Darwin's 500-page "abstract" - <em>On The Origin of Species by Means of Natural Selection or the Preservation of Favoured Races In The Struggle For Life</em> (or <abbr>OTOOSBMONSOTPOFRITSFL</abbr> for short).</p>
            <p>Darwin, already a prominent arc in scientific circles, was propelled into megastardom.</p>
            <h2>After The Origin</h2>
            <p>Chuck D revised The Origin five times, toning down each one a bit more than the one before it, partly to appease his religious wife. Who also happened to be his cousin. But some years later he'd had enough of trying to disguise the logical conclusion that humans are descended from the same common ancestor as all other animals and his third classic, <em>The Descent of Man</em>, was published and <em>really</em> pissed off the religious establishment.</p>
        </div>
        <div id="footer">
            <p>Content is © Copyright Patrick Griffiths.</p>
            <p>This page is valid HTML5.</p>
        </div>
    </body>
    </html>
    페이지 레이아웃 7 : 플로팅 된 열(columns)을 사용하여 Footer 추가
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Page layout 7</title>
        <style>
            body {
                font: 80% arial, helvetica, sans-serif;
                margin: 0;
            }
            
            h1, h2 {
                margin: 0;
            }
            
            #header {
                background: #ccc;
            }
            
            #navigation {
                float: left;
                width: 150px;
            }
            
            #content {
                margin-left: 150px;
            }
            
            #footer {
                clear: left;
                background: #ccc;
            }
            
            #footer p {
                margin: 0;
            }
            
        </style>
    </head>
    <body>
        <div id="header">
            <h1>Charles Darwin</h1>
        </div>
        <div id="navigation">
            <ul>
                <li><a href="">Biology</a></li>
                <li><a href="">Evolution</a></li>
                <li><a href="">Natural Selection</a></li>
                <li><a href="">Genetics</a></li>
            </ul>
            <ul>
                <li><a href="">Erasmus Darwin</a></li>
                <li><a href="">Lamarck</a></li>
                <li><a href="">Charles Darwin</a></li>
                <li><a href="">Wallace</a></li>
                <li><a href="">Dawkins</a></li>
            </ul>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
        </div>
        <div id="content">
            <h2>On the Origin of The Origin</h2>
            <p>Darwin's father was dead set on his son becoming a cleric but even though the young rapscallion began to study theology he found worms much more interesting.</p>
            <p>When a lonely man with a moustache asked Darwin to ride with him on his boat named after a dog, Darwin agreed and set off around the world fiddling with wildlife.</p>
            <p>Some say it was a load of birds from a bunch of islands hundreds of miles off the Ecuadorean coast that inspired his now widely accepted explanation of the mechanism of evolution. "Why does that bird on that island have a beak like that while that finch on that island has a beak like that? AHA! I've got it! Natural Selection!" he thought. It wasn't actually quite like that, but, y'know, it's a fine, popular romantic myth.</p>
            <h2>The Origin</h2>
            <p>Upon return from his jaunt, Charles chronicled his escapades (as <em>The Voyage of the Beagle</em>) and got a bit carried away with barnacles, although his theory of evolution was always ticking away in the back of his mind.</p>
            <p>Some 20 or so year after he returned to England, a Welsh naturalist by the name of Wallace popped up with a similar idea to Darwin's grand theory. Darwin got a move on.</p>
            <p>In 1858 a paper jointly attributed to Darwin and Wallace was presented to the Linnean Society of London that sent rumbles across the establishment and really ticked off a fair few people. The next year saw the publication of Darwin's 500-page "abstract" - <em>On The Origin of Species by Means of Natural Selection or the Preservation of Favoured Races In The Struggle For Life</em> (or <abbr>OTOOSBMONSOTPOFRITSFL</abbr> for short).</p>
            <p>Darwin, already a prominent arc in scientific circles, was propelled into megastardom.</p>
            <h2>After The Origin</h2>
            <p>Chuck D revised The Origin five times, toning down each one a bit more than the one before it, partly to appease his religious wife. Who also happened to be his cousin. But some years later he'd had enough of trying to disguise the logical conclusion that humans are descended from the same common ancestor as all other animals and his third classic, <em>The Descent of Man</em>, was published and <em>really</em> pissed off the religious establishment.</p>
        </div>
        <div id="footer">
            <p>Content is © Copyright Patrick Griffiths.</p>
            <p>This page is valid HTML5.</p>
        </div>
    </body>
    </html>
    찰스 다윈 (Charles Darwin) : 이전 예제의 기본 원리를 스타일 업 한 버전입니다.
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Charles Darwin</title>
        <style>
            body {
                font: 80% arial, helvetica, sans-serif;
                background: #ccc url(./img/lizards2.gif);
                margin: 0;
            }
            
            .accessaid, h1 {
                position: absolute;
                height: 0;
                overflow: hidden;
            }
            
            #header {
                background: #036 url(./img/charlesdarwin.gif);
                height: 60px;
            }
            
            #navigation {
                position: absolute;
                top: 60px;
                margin-top: 0.5em;
                left: 0;
                width: 134px;
            }
            
            #navigation ul {
                margin: 0 0 1em 0;
                padding: 0;
                list-style: none;
            }
            
            #navigation ul a {
                color: white;
                text-decoration: none;
                display: block;
                background: #17a;
                border-left: 3px solid #28b;
                padding: 0 0.5em;
                margin: 0 1em 3px 1em;
            }
            
            #navigation a:visited {
                color: #ccc;
            }
            
            #navigation a:hover {
                background: #39c;
                border-color: white;
            }
            
            #content {
                border-left: 134px solid #069;
                background: white url(./img/lizards.gif) repeat-y;
                padding: 1px 20px 1em 40px;
            }
            h2 {
                font-size: 1.5em;
                color: #036;
            }
            
            h3 {
                font-size: 1.25em;
                color: #036;
            }
            
            #content img {
                width: 100px;
                height: 150px;
                padding: 1px;
                border: 1px solid #333;
                float: right;
                margin: 0 0 1em 1em;
            }
            
            #container {
                position: relative;
                width: 580px;
                border: solid #036;
                border-width: 0 3px;
                margin: auto;
            }
        </style>
    </head>
    <body>
        <div id="container">
            <div id="header">
                <h1>Charles Darwin</h1>
            </div>
            <div id="navigation">
                <p><a href="#content" class="accessaid">Skip navigation</a></p>
                <ul>
                    <li><a href="">Biology</a></li>
                    <li><a href="">Evolution</a></li>
                    <li><a href="">Natural Selection</a></li>
                    <li><a href="">Genetics</a></li>
                </ul>
                <ul>
                    <li><a href="">Erasmus Darwin</a></li>
                    <li><a href="">Lamarck</a></li>
                    <li><a href="">Charles Darwin</a></li>
                    <li><a href="">Wallace</a></li>
                    <li><a href="">Dawkins</a></li>
                </ul>
                <ul>
                    <li><a href="">Home</a></li>
                    <li><a href="">About</a></li>
                    <li><a href="">Contact Us</a></li>
                    <li><a href="">Site map</a></li>
                </ul>
            </div>
            <div id="content">
                <h2>On the Origin of The Origin</h2>
                <p><img src="./img/darwin.jpg" alt="Darwin">Darwin's father was dead set on his son becoming a cleric but even though the young rapscallion began to study theology he found worms much more interesting.</p>
                <p>When a lonely man with a moustache asked Darwin to ride with him on his boat named after a dog, Darwin agreed and set off around the world fiddling with wildlife.</p>
                <p>Some say it was a load of birds from a bunch of islands hundreds of miles off the Ecuadorean coast that inspired his now widely accepted explanation of the mechanism of evolution. "Why does that bird on that island have a beak like that while that finch on that island has a beak like that? AHA! I've got it! Natural Selection!" he thought. It wasn't actually quite like that, but, y'know, it's a fine, popular romantic myth.</p>
                <h2>The Origin</h2>
                <p>Upon return from his jaunt, Charles chronicled his escapades (as <em>The Voyage of the Beagle</em>) and got a bit carried away with barnacles, although his theory of evolution was always ticking away in the back of his mind.</p>
                <p>Some 20 or so year after he returned to England, a Welsh naturalist by the name of Wallace popped up with a similar idea to Darwin's grand theory. Darwin got a move on.</p>
                <p>In 1858 a paper jointly attributed to Darwin and Wallace was presented to the Linnean Society of London that sent rumbles across the establishment and really ticked off a fair few people. The next year saw the publication of Darwin's 500-page "abstract" - <em>On The Origin of Species by Means of Natural Selection or the Preservation of Favoured Races In The Struggle For Life</em> (or <abbr>OTOOSBMONSOTPOFRITSFL</abbr> for short).</p>
                <p>Darwin, already a prominent arc in scientific circles, was propelled into megastardom.</p>
                <h2>After The Origin</h2>
                <p>Chuck D revised The Origin five times, toning down each one a bit more than the one before it, partly to appease his religious wife. Who also happened to be his cousin. But some years later he'd had enough of trying to disguise the logical conclusion that humans are descended from the same common ancestor as all other animals and his third classic, <em>The Descent of Man</em>, was published and <em>really</em> pissed off the religious establishment.</p>
            </div>
        </div>
    </body>
    </html>
    2D Transforms : 변형 속성을 사용하여 상자의 크기, 모양 및 위치 조작
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>2D Transforms</title>
        <style>
            body {
                font: 15px/1.5 helvetica, arial, sans-serif;
                background: #333;
                color: #ccc;
                margin: 50px 0 50px 50px;
            }
            a, code { color: #fff }
            p { margin-bottom: 50px }
        
            pre, #htmldog {
                float: left;
                height: 300px;
                width: 300px;
                background-color: #666;
                margin: 0 50px 50px 0;
                white-space: normal;
            }
            pre code {
                display: block;
                height: 260px;
                background: rgba(255,204,000,.7);
                padding: 20px;
            }
            #c0 {
                -webkit-transform: none; /* for some older browsers */
                -ms-transform: none; /* for IE9 */
                transform: none; /* default, obvs */
            }
            #c1 {
                -webkit-transform: rotate(10deg);
                -ms-transform: rotate(10deg);
                transform: rotate(10deg);
            }
            #c2 {
                -webkit-transform: skewX(10deg);
                -ms-transform: skewX(10deg);
                transform: skewX(10deg);
            }
            #c3 {
                -webkit-transform: skewY(-10deg);
                -ms-transform: skewY(-10deg);
                transform: skewY(-10deg);
            }
            #c4 {
                -webkit-transform: skew(10deg, -10deg);
                -ms-transform: skew(10deg, -10deg);
                transform: skew(10deg, -10deg);
            }
            #c5 {
                -webkit-transform: scale(0.8);
                -ms-transform: scale(0.8);
                transform: scale(0.8);
            }
            #c6 {
                -webkit-transform: scale(0.8, 1.2);
                -ms-transform: scale(0.8, 1.2);
                transform: scale(0.8, 1.2);
            }
            #c7 {
                -webkit-transform: translate(25px, 10px);
                -ms-transform: translate(25px, 10px);
                transform: translate(25px, 10px);
            }
            #c8 {
                -webkit-transform: scale(0.8) rotate(10deg) translate(25px, 10px);
                -ms-transform: scale(0.8) rotate(10deg) translate(25px, 10px);
                transform: scale(0.8) rotate(10deg) translate(25px, 10px);
            }
            #c9 {
                -webkit-transform: matrix(0.787846, 0.138919, -0.138919, 0.787846, 18.307, 11.3514);
                -ms-transform: matrix(0.787846, 0.138919, -0.138919, 0.787846, 18.307, 11.3514);
                transform: matrix(0.787846, 0.138919, -0.138919, 0.787846, 18.307, 11.3514);
            }
            #htmlknu a {
                display: block;
                padding: 105px 90px;
                background: rgba(255,204,000,.7);
                -webkit-transform: scale(.8);
                -ms-transform: scale(.8);
                transform: scale(.8);
                transition: .7s transform cubic-bezier(0.5,1.5,0.5,-0.5);
            }
            #htmlknu a:hover {
                -webkit-transform: scale(1);
                -ms-transform: scale(1);
                transform: scale(1);
            }
        </style>
    </head>
    <body>
        <h1>2D Transforms</h1>
        <p>Using the <code>transform</code> CSS property.</p>
        <pre><code id="c0">transform: none;</code></pre>
        <pre><code id="c1">transform: rotate(10deg);</code></pre>
        <pre><code id="c2">transform: skewX(10deg);</code></pre>
        <pre><code id="c3">transform: skewY(-10deg);</code></pre>
        <pre><code id="c4">transform: skew(10deg, -10deg);</code></pre>
        <pre><code id="c5">transform: scale(0.8);</code></pre>
        <pre><code id="c6">transform: scale(0.8, 1.2);</code></pre>
        <pre><code id="c7">transform: translate(25px, 10px);</code></pre>
        <pre><code id="c8">transform: scale(0.8) rotate(10deg) translate(25px, 10px);</code></pre>
        <pre><code id="c9">transform: matrix(0.787846, 0.138919, -0.138919, 0.787846, 18.307, 11.3514);</code></pre>
        <p id="htmlknu"><a href="#"><img src="./img/knulab.png" alt="HTML KNULAB" width="120" height="90"></a></p>
    </body>
    </html>
    Transform origin : 변환이 측정되는 지점을 변경합니다.
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Transform origin</title>
        <style>
            body {
                font: 15px/1.5 helvetica, arial, sans-serif;
                background: #333;
                color: #ccc;
                margin: 50px 0 50px 50px;
            }
            a, code { color: white }
            p { margin-bottom: 50px }
        
            pre, #htmlknu {
                float: left;
                height: 300px;
                width: 300px;
                background-color: #666;
                margin: 0 50px 50px 0;
                white-space: normal;
                position: relative;
            }
            pre code {
                display: block;
                height: 260px;
                background: rgba(255,204,000,.7);
                padding: 20px;
            }
            pre:after {
                content: "";
                position: absolute;
                width: 10px;
                height: 10px;
                background: red;
                border: 5px solid white;
                border-radius: 10px;
                margin: -10px 0 0 -10px;
            }
            #p0 code {
                -webkit-transform: rotate(10deg); /* for some older browsers */
                -webkit-transform-origin: 50% 50%;
                -ms-transform: rotate(10deg); /* for IE9 */
                -ms-transform-origin: 50% 50%;
                transform: rotate(10deg);
                transform-origin: 50% 50%; /* default */
            }
            #p0:after {
                top: 50%;
                left: 50%;
            }
            #p1 code {
                -webkit-transform: rotate(10deg);
                -webkit-transform-origin: top;
                -ms-transform: rotate(10deg);
                -ms-transform-origin: top;
                transform: rotate(10deg);
                transform-origin: top;
            }
            #p1:after {
                top: 0;
                left: 50%;
            }
            #p2 code {
                -webkit-transform: rotate(10deg);
                -webkit-transform-origin: right;
                -ms-transform: rotate(10deg);
                -ms-transform-origin: right;
                transform: rotate(10deg);
                transform-origin: right;
            }
            #p2:after {
                top: 50%;
                right: 0;
                margin: -10px -10px 0 0;
            }
            #p3 code {
                -webkit-transform: rotate(10deg);
                -webkit-transform-origin: right top;
                -ms-transform: rotate(10deg);
                -ms-transform-origin: right top;
                transform: rotate(10deg);
                transform-origin: right top;
            }
            #p3:after {
                top: 0;
                right: 0;
                margin: -10px -10px 0 0;
            }
            #p4 code {
                -webkit-transform: rotate(10deg);
                -webkit-transform-origin: 25% 25%;
                -ms-transform: rotate(10deg);
                -ms-transform-origin: 25% 25%;
                transform: rotate(10deg);
                transform-origin: 25% 25%;
            }
            #p4:after {
                top: 25%;
                left: 25%;
            }
            #p5 code {
                -webkit-transform: rotate(10deg);
                -webkit-transform-origin: -20px 20px;
                -ms-transform: rotate(10deg);
                -ms-transform-origin: -20px 20px;
                transform: rotate(10deg);
                transform-origin: -20px 20px;
            }
            #p5:after {
                top: 20px;
                left: -20px;
            }
            #htmlknu a {
                display: block;
                padding: 105px 90px;
                background: rgba(255,204,000,.7);
                -webkit-transform: rotate(10deg);
                -webkit-transform-origin: 0 0;
                -ms-transform: rotate(10deg);
                -ms-transform-origin: 0 0;
                transform: rotate(10deg);
                transform-origin: 0 0;
                transition: 1s;
            }
            #htmlknu a:hover {
                -webkit-transform: rotate(-10deg);
                -webkit-transform-origin: right top;
                -ms-transform: rotate(-10deg);
                -ms-transform-origin: right top;
                transform: rotate(-10deg);
                transform-origin: right top;
            }
        </style>
    </head>
    <body>
        <h1>Transform origin</h1>
        <p>Using the <code>transform-origin</code> CSS property to alter the point at which transformations are measured from. Using a rotated 2D transformation as an example.</p>
        <pre id="p0"><code id="c0">transform: rotate(10deg);
    transform-origin: 50% 50%;
    /* default */</code></pre>
        <pre id="p1"><code id="c1">transform: rotate(10deg);
    transform-origin: top;</code></pre>
        <pre id="p2"><code id="c2">transform: rotate(10deg);
    transform-origin: right;</code></pre>
        <pre id="p3"><code id="c3">transform: rotate(10deg);
    transform-origin: right top;</code></pre>
        <pre id="p4"><code id="c4">transform: rotate(10deg);
    transform-origin: 25% 25%;</code></pre>
        <pre id="p5"><code id="c5">transform: rotate(10deg);
    transform-origin: -20px 20px;</code></pre>
        <p id="htmlknu"><a href="#"><img src="./img/knulab.png" alt="HTML KNULAB" width="120" height="118"></a></p>
    </body>
    </html>
  • HTML 레이아웃 표현 방법 II

    HTML 레이아웃 표현 방법 II

    HTML 문서를 레이아웃하는데 있어서 디자이너들이 가장 어려움을 느끼는 것이 바로 포지셔닝(Positioning)과 디스플레이(Display) 입니다. 하지만 단계적인 접근으로 좀 더 쉽게 이해할 수 있을 것입니다.

    위치 지정(Positioning) : 정적(static) : 정상적인 흐름을 따르기~

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Positioning: static</title>
        <style>
            body {
                font: 1em/1.5 arial, helvetica, sans-serif;
            }
            
            div {
                width: 700px;
            }
            
            span {
                background: #f99;
                padding: 0 1em;
            }
            
            em {
                padding: 0 1em;
                background: #c00;
                color: white;
                font-weight: bold;
            }
        </style>
    </head>
    <body>
    
        <div>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore <span>R2D2</span><em>Torquil</em><span>Fred</span> magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
        </div>
    
    </body>
    </html>

    위치 지정(Positioning) : 상대적(relative) : 상자의 초기 위치에서 오프셋(Offsetting)

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Positioning: relative</title>
        <style>
            body {
                font: 1em/1.5 arial, helvetica, sans-serif;
            }
            
            div {
                width: 700px;
            }
            
            span {
                background: #f99;
                padding: 0 1em;
            }
            
            em {
                position: relative;
                top: 2em;
                left: 2em;
                padding: 0 1em;
                background: #c00;
                color: white;
                font-weight: bold;
            }
        </style>
    </head>
    <body>
    
        <div>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore <span>R2D2</span><em>Torquil</em><span>Fred</span> magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
        </div>
    
    </body>
    </html>

    위치 지정(Positioning) : 절대(absolute) 1 : 상자의 컨테이너를 기준으로 배치

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Positioning: absolute</title>
        <style>
            body {
                font: 1em/1.5 arial, helvetica, sans-serif;
            }
            
            div {
                width: 700px;
            }
            
            span {
                background: #f99;
                padding: 0 1em;
            }
            
            em {
                position: absolute;
                top: 2em;
                left: 2em;
                padding: 0 1em;
                background: #c00;
                color: white;
                font-weight: bold;
            }
        </style>
    </head>
    <body>
    
        <div>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore <span>R2D2</span><em>Torquil</em><span>Fred</span> magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
        </div>
    
    </body>
    </html>

    위치 지정(Positioning) : 절대(absolute) 2 : 배치 된 상자 내부

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Positioning: absolute 2</title>
        <style>
            body {
                font: 1em/1.5 arial, helvetica, sans-serif;
            }
            
            div {
                width: 700px;
            }
            
            p {
                position: relative;
            }
            
            span {
                background: #f99;
                padding: 0 1em;
            }
            
            em {
                position: absolute;
                top: 2em;
                left: 2em;
                padding: 0 1em;
                background: #c00;
                color: white;
                font-weight: bold;
            }
        </style>
    </head>
    <body>
    
        <div>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore <span>R2D2</span><em>Torquil</em><span>Fred</span> magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
        </div>
    
    </body>
    </html>

    위치 지정(Positioning) : 고정(fixed) : 뷰포트를 기준으로 함

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Positioning: Fixed</title>
        <style>
            body {
                font: 1em/1.5 arial, helvetica, sans-serif;
            }
            
            div {
                width: 700px;
            }
            
            p {
                position: relative;
            }
            
            span {
                background: #f99;
                padding: 0 1em;
            }
            
            em {
                position: fixed;
                top: 2em;
                left: 2em;
                padding: 0 1em;
                background: #c00;
                color: white;
                font-weight: bold;
            }
        </style>
    </head>
    <body>
    
        <div>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore <span>R2D2</span><em>Torquil</em><span>Fred</span> magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
        </div>
    
    </body>
    </html>

    z- index : 배치 된 상자에 쌓입니다. (Stacking)

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Z-index</title>
        <style>
            body {
                font: 14px courier;
                background: #c72 url("./img/opacityBg.gif");
                color: #000;
                padding: 0;
            }
        
            p {
                position: absolute;
                width: 400px;
                height: 200px;
                background: white;
                border: 1px solid #ccc;
                box-shadow: 0 0 10px #999;
                margin: 0;
            }
            code {
                padding: 0 15px;
            }
    
            .p1 {
                top: 80px;
                left: 80px;
                z-index: 4;
            }
            .p2 {
                top: 60px;
                left: 60px;
                z-index: 3;
            }
            .p3 {
                top: 40px;
                left: 40px;
                z-index: 2;
            }
            .p4 {
                top: 20px;
                left: 20px;
                z-index: 1;
            }
            p:hover {
                z-index: 6;
            }
            
            #borderKnu {
                top: 100px;
                left: 100px;
                z-index: 5;
            }
            #borderKnu a {
                display: block;
                width: 120px;
                height: 90px;
                padding: 55px 140px;
            }
        </style>
    </head>
    <body>
        <p class="p1"><code>z-index: 4;</code></p>
        <p class="p2"><code>z-index: 3;</code></p>
        <p class="p3"><code>z-index: 2;</code></p>
        <p class="p4"><code>z-index: 1;</code></p>
        <p id="borderKnu"><a href="#"><img src="./img/knulab.png" alt="HTML KNULAB"></a></p>
    </body>
    </html>

    플로팅(Floating) 1 : 간단한 플로트(float) 박스

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Floating 1</title>
        <style>
            body {
                font: 80%/1.5 arial, helvetica, sans-serif;
            }
            
            code {
                font: bold 1em courier;
            }
            
            #second {
                width: 7em;
                float: left;
                
                color: white;
                background: #060;
                padding: 1em;
                margin: 0;
            }
        </style>
    </head>
    <body>
    
        <p>First paragraph. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
        <p id="second">Second paragraph. Has the CSS <code>width: 7em; float: left</code> applied.</p>
        <p>Third paragraph. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
        <p>Fourth paragraph. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
        <p>Fifth paragraph. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
        <p>Sixth paragraph. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
        <p>Seventh paragraph. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
    
    </body>
    </html>

    플로팅(Floating) 2 : 두 개의 플로팅 박스

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Floating 2</title>
        <style>
            body {
                font: 80%/1.5 arial, helvetica, sans-serif;
            }
            
            code {
                font: bold 1em courier;
            }
            
            #second {
                width: 7em;
                float: left;
                
                color: white;
                background: #060;
                padding: 1em;
                margin: 0;
            }
            
            #fourth {
                width: 20em;
                float: right;
                
                color: white;
                background: #006;
                padding: 1em;
                margin: 0;
            }
        </style>
    </head>
    <body>
    
        <p>First paragraph. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
        <p id="second">Second paragraph. Has the CSS<br><code>width: 7em; float: left</code><br>applied.</p>
        <p>Third paragraph. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
        <p id="fourth">Fourth paragraph. Has the CSS<br><code>width: 20em; float: right</code><br>applied.</p>
        <p>Fifth paragraph. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
        <p>Sixth paragraph. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
        <p>Seventh paragraph. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
    
    </body>
    </html>

    플로팅(Floating) 3 : 떠 다니는 상자 지우기(Clear)

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Floating 3</title>
        <style>
            body {
                font: 80%/1.5 arial, helvetica, sans-serif;
            }
            
            code {
                font: bold 1em courier;
            }
            
            #second {
                width: 7em;
                float: left;
                
                color: white;
                background: #060;
                padding: 1em;
                margin: 0;
            }
            
            #fourth {
                clear: left;
                border: 1px solid black;
            }
            
        </style>
    </head>
    <body>
    
        <p>First paragraph. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
        <p id="second">Second paragraph. Has the CSS <code>width: 7em; float: left</code> applied.</p>
        <p>Third paragraph. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
        <p id="fourth">Fourth paragraph. Has the CSS <code>clear: left</code> applied.</p>
        <p>Fifth paragraph. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
        <p>Sixth paragraph. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
        <p>Seventh paragraph. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
    
    </body>
    </html>
  • HTML 레이아웃 표현 방법 I

    HTML 레이아웃 표현 방법 I

    레이아웃 접근에 있어서 기본적인 원리와 각 요소의 특성을 먼저 이해해야 복잡한 구성 요소로 된 레이아웃을 설계하고 디자인할 수 있습니다.

    너비(Widths) 및 높이(Heights) : width, height, max-width, min-height 등.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Widths and heights</title>
        <style>
            body {
                font-size: 20px;
                background: #fc0;
                color: #000;
            }
            p {
                background: white;
            }
    
            #p1 {
                width: 300px;
            }
            #p2 {
                height: 100px;
            }
            #p3 {
                width: 50%;
            }
            #p4 {
                max-width: 500px;
            }
            #p5, #p6 {
                min-height: 100px;
            }
        </style>
    </head>
    <body>
        <h1>Widths and heights</h1>
        <p>A bunch o' paragraphs…</p>
        <p id="p1"><code>width: 300px; /* and height is just the height of the content */</code></p>
        <p id="p2"><code>height: 100px; /* and width, on paragraphs like this one at least, is 100% by default */</code></p>
        <p id="p3"><code>width: 50%; /* 50% of the width of the paragraph's parent, which in this case is the body */</code></p>
        <p id="p4"><code>max-width: 500px; /* width of 100% (because that's the paragraph's default) but only up to 500 pixels */</code></p>
        <p id="p5"><code>min-height: 100px; /* At least 100 pixels high  */</code></p>
        <p id="p6"><code>min-height: 100px; /* This could be higher than 100 pixels. If a paragraph were to waffle on, about this, that, the other, about anything really, like, really, really, really waffle on, about elephants or bubbles or poached eggs or Russian dolls or antidisestablishmentarianism, for example, if, in those cases, in those waffley case, or, if, for (another) example, there wasn't actual waffle but genuine very necessary things to say, like if there was a sentence about elephants and a paragraph didn't in fact talk about bubbles or poached eggs or Russian dolls or antidisestablishmentarianism, or anything else for that matter, if, in that case, the paragraph were to detail tusks or pachyderms or trunks or anything elephant-related, then, although it could well still be waffle, there is also the chance that it could be very relevant and non-waffley but, in either case, the point is that content could go on, and on, and on, and on, and on, and, in such circumstances, a bog standard paragraph, waffle or not, could be rather long and could, quite reasonably, require a greater height than 100 pixels, waffle or not.  */</code></p>
    
    </body>
    </html>

    테두리(Borders) : Thick, thin, this color, that color, solid, dotted, dashed…

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Borders</title>
        <style>
            body {
                font-size: 80%;
                color: #000; /* 명시적 색상이 없는 테두리는 이 색상 선언을 사용합니다. */
                margin: 0;
                padding: 0;
            }
        
            p {
                padding: 4em;
                margin: 2em;
            }
            
            code {
                font: 1em/1.5 Courier;
            }
        
            #border1 {  
                border: 1px solid;
                
            }
            
            #border2 {
                border: 1px dotted;
            }
            
            #border3 {
                border: 2px dashed #ccc;
            }
            
            #border4 {
                border: solid;
                border-width: 1px 5px 10px 15px;
            }
            
            #border5 {
                border: 5px;
                border-style: solid dotted dashed solid;
            }
            
            #border6 {
                border: 5px solid;
                border-color: black #444 #888 #ccc;
            }
            
            #borderKnu {
                border: 3px dotted #06c;
            }
        </style>
    </head>
    <body>
        
        <p id="border1"><code>border: 1px solid;</code></p>
        <p id="border2"><code>border: 1px dotted;</code></p>
        <p id="border3"><code>border: 2px dashed #ccc;</code></p>
        <p id="border4"><code>border: solid;<br>
                    border-width: 1px 5px 10px 15px;</code></p>
        <p id="border5"><code>border: 5px;<br>
                    border-style: solid dotted dashed solid;</code></p>
        <p id="border6"><code>border: 5px solid;<br>
                    border-color: black #444 #888 #ccc;</code></p>
        <p id="borderKnu"><img src="./img/knulab.png" alt="HTML KNULAB"></p>
        
    </body>
    </html>

    둥근 모서리(Rounded corners) : border-radius 속성 사용.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Rounded corners: border-radius</title>
        <style>
            body {
                font: 14px courier;
                background: #06c;
                color: #000;
            }
        
            p {
                width: 300px;
                height: 100px;
                padding: 50px;
                margin: 20px 0 0 20px;
                background: white;
                float: left;
            }
            code {
                display: block;
                padding: 10px;
                background: #def;
                border-radius: 10px;
            }
            #corners1 {
                border-top-left-radius: 100px;
            }
            #corners2 {
                border-radius: 100px;
            }
            #corners3 {
                border-radius: 0 50px 100px 200px;
            }
            #corners4 {
                padding: 30px;
                background: none;
                border-radius: 50px;
                border: 20px solid #fff;
            }
            #corners5 {
                border-radius: 25%;
            }
            #corners6 {
                border-radius: 200px/100px;
            }
            #borderKnu {
                border-radius: 75px/125px;
                border-bottom-left-radius: 75px;
                border-bottom-right-radius: 75px;
                width: 120px;
                height: 90px;
                padding: 80px 15px 30px 15px;
            }
        </style>
    </head>
    <body>
        <p id="corners1"><code>border-top-left-radius: 100px;</code></p>
        <p id="corners2"><code>border-radius: 100px;</code></p>
        <p id="corners3"><code>border-radius: 0 50px 100px 200px;</code></p>
        <p id="corners4"><code>border-radius: 50px;<br>border: 20px solid #fff;</code></p>
        <p id="corners5"><code>border-radius: 25%;</code></p>
        <p id="corners6"><code>border-radius: 200px/100px;</code></p>
        <p id="borderKnu"><img src="./img/knulab.png" alt="HTML KNULAB"></p>
    </body>
    </html>

    박스 그림자(Box shadows) : pop 추가.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Box shadows</title>
        <style>
            body {
                font: 14px courier, monospace;
                padding: 25px;
                margin: 0;
                background: #edc;
                color: #000;
            }
        
            p {
                width: 400px;
                height: 50px;
                padding: 50px;
                margin: 25px;
                background: white;
                float: left;
            }
            #shadow1 {
                box-shadow: 5px 5px;
            }
            #shadow2 {
                box-shadow: 5px 5px 3px 1px #999;
            }
            #shadow3 {
                box-shadow: 5px 5px 3px 1px rgba(0,0,0,.4);
            }
            #shadow4 {
                box-shadow: 0 0 10px 0 rgba(0,0,0,.4);
            }
            #shadow5 {
                box-shadow: inset 0 0 10px 0 rgba(0,0,0,.4);
            }
    
    
            #shadowKnu {
                width: 120px;
                height: 90px;
                padding: 30px 40px;
                box-shadow: 0 0 20px 5px #06c;
            }
        </style>
    </head>
    <body>
        <p id="shadow1"><code>box-shadow: 5px 5px;</code></p>
        <p id="shadow2"><code>box-shadow: 5px 5px 3px 1px #999;</code></p>
        <p id="shadow3"><code>box-shadow: 5px 5px 3px 1px rgba(0,0,0,.4);</code></p>
        <p id="shadow4"><code>box-shadow: 0 0 10px 0 rgba(0,0,0,.4);</code></p>
        <p id="shadow5"><code>box-shadow: inset 0 0 10px 0 rgba(0,0,0,.4);</code></p>
        <p id="shadowKnu"><img src="./img/knulab.png" alt="HTML KNULAB"></p>
    </body>
    </html>

    여백 축소(Margin collapsing) : 수직 여백이 서로 병합 또는 “collapse”되는 방식.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Margin collapsing</title>
        <style>
            div {
                background: #666;
                margin: 1em;
            }
        
            div p {
                margin: 1em;
                background: #ccc;
            }
    
            #two {
                border: 1px solid black;
            }
        </style>
    </head>
    <body>
    
        <div>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
        </div>
        <div id="two">
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
        </div>
    
    </body>
    </html>

    윤곽선(Outlines) : 테두리의 “경계선”

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Outlines</title>
        <style>
            * {
                margin: 0;
            }
            body {
                margin: 20px;
                padding: 20px;
            }
            h1 {
                font-size: 80px;
            }
            pre {
                padding: 20px;
                border: 20px dotted;
                outline: 20px solid red;
                margin: 40px 0;
            }
            p {
                font-size: 40px;
                outline-color: #999;
                outline-style: dashed;
                outline-width: thin;
                margin: 40px 0;
            }
            p strong {
                outline: 20px double rgba(0,255,0,.2);
            }
            
            #borderKnu {
                outline: 0;
            }
            #borderKnu a {
                outline: medium solid rgba(0,0,255,.1);
                transition: outline 1s;
            }
            #borderKnu a:hover {
                outline: 400px solid rgba(0,0,255,.9);
            }
        </style>
    </head>
    <body>
    
        <h1>Outlines</h1>
    
        <pre><code>padding: 20px;
    border: 20px dotted;
    outline: 20px solid red;</code></pre>
    
        <p>The width, style, and color of the outline around a box. An outline is rendered around the outside of the border of a box. <strong>It does not affect the size or position of the box, or any other box.</strong></p>
        <p id="borderKnu"><a href="#"><img src="./img/knulab.png" alt="HTML KNULAB"></a></p>
    
    </body>
    </html>

    오버플로(Overflows) : 상자 안에 들어 가지 않는 콘텐츠 부분을 관리

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Overflow</title>
        <style>
            body {
                font-size: 25px;
                background: #dcb;
                color: #000;
                margin: 20px;
            }
        
            p {
                background-color: #fff;
                margin: 0 20px 90px 0;
                width: 300px;
                height: 90px;
                float: left;
                line-height: 1.4;
            }
            code {
                color: #c00;
            }
    
            #p1 {
                overflow: visible;
            }
            #p2 {
                overflow: hidden;
            }
            #p3 {
                overflow: scroll;
            }
            #p4 {
                overflow: auto;
            }
            #htmlknu {
                overflow: auto;
            }
    
            #htmlknu a {
                display: block;
                text-align: center;
            }
        </style>
    </head>
    <body>
    
        <h1><a href="#">CSS Property: <code>overflow</code></a></h1>
        <p id="p1"><code>overflow: visible</code>: Non-fitting content spills outside of the edges of the box for all to see. Default.</p>
        <p id="p2"><code>overflow: hidden</code>: Box is clipped, non-fitting content is unseen and the browser does not offer a way to see it.</p>
        <p id="p3"><code>overflow: scroll</code>: Box is clipped, non-fitting content is initially unseen and the browser offers up a scrolling mechanism (or equivalent) so that the it can be seen upon user interaction.</p>
        <p id="p4"><code>overflow: auto</code>: Browser dependent, but typically similar to <code>scroll</code>.</p>
        <p id="htmlknu"><a href="#"><img src="./img/knulab.png" alt="HTML KNULAB"></a></p>
    
    </body>
    </html>

    블록(Block) 및 인라인(Inline) 1 : display 속성을 사용하여 상자의 비헤이비어(behavior) 변경.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Block and inline boxes 1</title>
        <style>
            body {
                font: 80% arial, helvetica, sans-serif;
            }
            
            h1 {
                font-size: 1.5em;
            }
            
            h2 {
                font-size: 1em;
            }
            
            code {
                font-family: courier;
            }
            
            #example1, #example2 {
                background: #ccc;
                border: 2px solid black;
            }
    
            span {
                background: white;
                display: block;
            }
            
            span.altern8 {
                background: #5b5;
            }
            
            #example2 span {
                display: inline;
            }
        </style>
    </head>
    <body>
    
        <h1>Block and inline boxes</h1>
        <p>Each of these examples contains the same HTML, but the elements in the first are set to <code>display: block</code> and the elements in the second are set to <code>display: inline</code>.</p>
    
        <h2>Block</h2>
        <p id="example1"><span>This</span><span class="altern8">That</span><span>The Other</span><span class="altern8">4</span></p>
    
        <h2>Inline</h2>
        <p id="example2"><span>This</span><span class="altern8">That</span><span>The Other</span><span class="altern8">4</span></p>
    
    </body>
    </html>

    블록(Block) 및 인라인(Inline) 2 : 블록 및 인라인 상자 간의 차이가 더 큽니다.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Block and inline boxes 2</title>
        <style>
            body {
                font: 80% arial, helvetica, sans-serif;
            }
            
            h1 {
                font-size: 1.5em;
            }
            
            h2 {
                font-size: 1em;
            }
            
            code {
                font-family: courier;
            }
            
            #example1, #example2 {
                background: #ccc;
                border: 2px solid black;
            }
    
            span {
                background: white;
                display: block;
                border: 0.5em solid red;
                padding: 1em;
                margin: 0.5em;
            }
            
            span.altern8 {
                background: #5b5;
            }
            
            #example2 span {
                display: inline;
            }
        </style>
    </head>
    <body>
    
        <h1>Block and inline boxes (with padding, border and margin)</h1>
        <p>Each of these examples contains the same HTML, but the elements in the first are set to <code>display: block</code> and the elements in the second are set to <code>display: inline</code>.</p>
    
        <h2>Block</h2>
        <p id="example1"><span>This</span><span class="altern8">That</span><span>The Other</span><span class="altern8">4</span></p>
    
        <h2>Inline</h2>
        <p id="example2"><span>This</span><span class="altern8">That</span><span>The Other</span><span class="altern8">4</span></p>
    
    </body>
    </html>

    블록(Block) 및 인라인(Inline) 3 : display: inline-block 적용

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Block and inline boxes 3</title>
        <style>
            body {
                font: 80% arial, helvetica, sans-serif;
            }
            
            h1 {
                font-size: 1.5em;
            }
            
            h2 {
                font-size: 1em;
            }
            
            code {
                font-family: courier;
            }
            
            #example2, #example3 {
                background: #ccc;
                border: 2px solid black;
            }
    
            span {
                background: white;
                display: inline;
                border: 0.5em solid red;
                padding: 1em;
                margin: 0.5em;
            }
            
            span.altern8 {
                background: #5b5;
            }
            
            #example3 span {
                display: inline-block;
            }
        </style>
    </head>
    <body>
    
        <h1>Block and inline boxes (with padding, border and margin)</h1>
        <p>Each of these examples contains the same HTML, but the elements in the first are set to <code>display: inline</code> and the elements in the second are set to <code>display: inline-block</code>.</p>
    
        <h2>Inline</h2>
        <p id="example2"><span>This</span><span class="altern8">That</span><span>The Other</span><span class="altern8">4</span></p>
    
        <h2>Inline-Block</h2>
        <p id="example3"><span>This</span><span class="altern8">That</span><span>The Other</span><span class="altern8">4</span></p>
    
    </body>
    </html>
  • HTML Forms 표현 방법

    HTML Forms 표현 방법

    입력, 선택, 업로드, 확인 등을 구현하는 것은 HTML을 배우는 마지막 단계입니다.

    텍스트 상자(Text boxes) : 텍스트 및 암호 유형 input 요소.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Text and password inputs</title>
        <style>
            body {
                font: 100% arial, helvetica, sans-serif;
            }
    
            fieldset {
                padding: 0 1em 1em 1em;
            }
    
            legend {
                padding: 1em;
            }
        </style>
    </head>
    <body>
    
        <form action="someplace.php">
            <fieldset>
                <legend>Text and Password</legend>
                <label for="username">Username:</label>
                <input name="username" id="username" value="Some Text">
                <label for="password">Password:</label>
                <input type="password" name="password" id="password" value="Password">
            </fieldset>
        </form>
    
    </body>
    </html>

    확인란(Checkboxes) 및 라디오 버튼(Radio buttons) : input 요소 유형이 많습니다.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Checkbox and radio inputs</title>
        <style>
            body {
                font: 100% arial, helvetica, sans-serif;
            }
    
            fieldset {
                padding: 0 1em 1em 1em;
            }
    
            legend {
                padding: 1em;
            }
    
            label {
                float: left;
                width: 6em;
            }
        </style>
    </head>
    <body>
    
        <form action="someplace.php">
            <fieldset>
                <legend>Films you like</legend>
                <div>
                    <label for="drama">Drama</label>
                    <input type="checkbox" name="drama" id="drama" value="drama">
                </div>
                <div>
                    <label for="action">Action</label>
                    <input type="checkbox" name="action" id="action" value="action">
                </div>
                <div>
                    <label for="comedy">Comedy</label>
                    <input type="checkbox" name="comedy" id="comedy" value="comedy">
                </div>
                <div>
                    <label for="horror">Horror</label>
                    <input type="checkbox" name="horror" id="horror" value="horror">
                </div>
                <div>
                    <label for="scifi">Sci-fi</label>
                    <input type="checkbox" name="scifi" id="scifi" value="scifi">
                </div>
            </fieldset>
    
            <fieldset>
                <legend>Your age</legend>
                <div>
                    <label for="lt20">19 or under</label>
                    <input type="radio" name="age" id="lt20" value="lt20">
                </div>
                <div>
                    <label for="20to39">20 to 39</label>
                    <input type="radio" name="age" id="20to39" value="20to39">
                </div>
                <div>
                    <label for="40to59">40 to 59</label>
                    <input type="radio" name="age" id="40to59" value="40to59">
                </div>
                <div>
                    <label for="gt59">60 or over</label>
                    <input type="radio" name="age" id="gt59" value="gt59">
                </div>
            </fieldset>
        </form>
    
    </body>
    </html>

    파일 입력(File input) : 업로드 용.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>File inputs</title>
        <style>
            body {
                font: 100% arial, helvetica, sans-serif;
            }
        
            fieldset {
                padding: 0 1em 1em 1em;
            }
        
            legend {
                padding: 1em;
            }
        </style>
    </head>
    <body>
    
        <form action="someplace.php" method="post" enctype="multipart/form-data">
            <fieldset>
                <legend>Upload file</legend>
                <label for="uploadfile">File name: </label>
                <input type="file" name="uploadfile" id="uploadfile">
            </fieldset>
        </form>
    
    </body>
    </html>

    텍스트 영역(Text areas) : textarea 요소입니다.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Text areas</title>
        <style>
            body {
                font: 100% arial, helvetica, sans-serif;
            }
    
            fieldset {
                padding: 0 1em 1em 1em;
            }
    
            legend {
                padding: 1em;
            }
    
            label {
                float: left;
                clear: left;
                width: 7em;
            }
        </style>
    </head>
    <body>
    
        <form action="someplace.php">
            <fieldset>
                <legend>Contact us</legend>
                <div>
                    <label for="name">Name: </label>
                    <input name="name" id="name">
                </div>
                <div>
                    <label for="email">Email address: </label>
                    <input name="email" id="email">
                </div>
                <div>
                    <label for="message">Message: </label>
                    <textarea rows="10" cols="40" name="message" id="message"></textarea>
                </div>
            </fieldset>
        </form>
    
    </body>
    </html>

    선택 상자(Select boxes) : select 및 option 요소의 기본 사용.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Select menus</title>
        <style>
            body {
                font: 100% arial, helvetica, sans-serif;
            }
    
            fieldset {
                padding: 0 1em 1em 1em;
            }
    
            legend {
                padding: 1em;
            }
        </style>
    </head>
    <body>
    
        <form action="someplace.php">
            <fieldset>
                <legend>Favourite book</legend>
                <label for="book">Name: </label>
                <select name="book" id="book">
                    <option>The Trial</option>
                    <option>The Outsider</option>
                    <option>Things Fall Apart</option>
                    <option>Animal Farm</option>
                </select>
            </fieldset>
        </form>
    
    </body>
    </html>

    선택 상자 옵션 그룹 : optgroup 요소 사용.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Select menus: option groups</title>
        <style>
            body {
                font: 100% arial, helvetica, sans-serif;
            }
    
            fieldset {
                padding: 0 1em 1em 1em;
            }
    
            legend {
                padding: 1em;
            }
        </style>
    </head>
    <body>
    
        <form action="someplace.php">
            <fieldset>
                <legend>Favourite book</legend>
                <label for="book">Name: </label>
                <select name="book" id="book">
                    <optgroup label="Camus">
                        <option>The Outsider</option>
                        <option>The Rebel</option>
                        <option>The Plague</option>
                    </optgroup>
                    <optgroup label="Orwell">
                        <option>Animal Farm</option>
                        <option>Nineteen Eighty-Four</option>
                        <option>Down and Out in Paris and London</option>
                    </optgroup>
                </select>
            </fieldset>
        </form>
    
    </body>
    </html>

    다중 선택 선택 상자 : multiple 속성 사용.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Select menus: multiple selections</title>
        <style>
            body {
                font: 100% arial, helvetica, sans-serif;
            }
    
            fieldset {
                padding: 0 1em 1em 1em;
            }
    
            legend {
                padding: 1em;
            }
        </style>
    </head>
    <body>
    
        <form action="someplace.php">
            <fieldset>
                <legend>Favourite book</legend>
                <label for="book">Name: </label>
                <select name="book" id="book" size="5" multiple="multiple">
                    <option>The Outsider</option>
                    <option>The Rebel</option>
                    <option>The Plague</option>
                    <option>Things Fall Apart</option>
                    <option>Animal Farm</option>
                    <option>Nineteen Eighty-Four</option>
                    <option>Down and Out in Paris and London</option>
                </select>
            </fieldset>
        </form>
    
    </body>
    </html>
  • HTML 테이블 표현 방법

    HTML 테이블 표현 방법

    엑셀과 같은 형식을 표현하려면 HTML에서는 테이블이라는 태그를 사용합니다.

    기본 테이블(Basic table) : table, trtd 요소
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Basic table</title>
        <style>
            td {
                border: 1px solid #999;
                padding: 0.1em 1em;
            }
        </style>
    </head>
    <body>
    
        <table>
            <tr>
                <td>Cats</td>
                <td>Dogs</td>
                <td>Lemurs</td>
            </tr>
            <tr>
                <td>Tiger</td>
                <td>Grey Wolf</td>
                <td>Indri</td>
            </tr>
            <tr>
                <td>Cheetah</td>
                <td>Cape hunting dog</td>
                <td>Sifaka</td>
            </tr>
            <tr>
                <td>Caracal</td>
                <td>Red fox</td>
                <td>Brown lemur</td>
            </tr>
            <tr>
                <td>Wildcat</td>
                <td>Fennec</td>
                <td>Dwarf lemur</td>
            </tr>
        </table>
    
    </body>
    </html>
    머리글 셀(Header cells) : th 요소.
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Header cells</title>
        <style>
            table {
                margin-bottom: 2em;
            }
    
            td, th {
                border: 1px solid #999;
                padding: 0.1em 1em;
            }
        </style>
    </head>
    <body>
    
        <table>
            <tr>
                <th>Cats</th>
                <th>Dogs</th>
                <th>Lemurs</th>
            </tr>
            <tr>
                <td>Tiger</td>
                <td>Grey Wolf</td>
                <td>Indri</td>
            </tr>
            <tr>
                <td>Cheetah</td>
                <td>Cape hunting dog</td>
                <td>Sifaka</td>
            </tr>
            <tr>
                <td>Caracal</td>
                <td>Red fox</td>
                <td>Brown lemur</td>
            </tr>
            <tr>
                <td>Wildcat</td>
                <td>Fennec</td>
                <td>Dwarf lemur</td>
            </tr>
        </table>
    
        <table>
            <tr>
                <th>Cats</th>
                <td>Tiger</td>
                <td>Cheetah</td>
                <td>Caracal</td>
                <td>Wildcat</td>
            </tr>
            <tr>
                <th>Dogs</th>
                <td>Grey Wolf</td>
                <td>Cape hunting dog</td>
                <td>Red fox</td>
                <td>Fennec</td>
            </tr>
            <tr>
                <th>Lemurs</th>
                <td>Indri</td>
                <td>Sifaka</td>
                <td>Brown lemur</td>
                <td>Dwarf lemur</td>
            </tr>
        </table>
    
    </body>
    </html>
    셀 병합(Merging cells) 1 : rowspan 속성.
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Row spans</title>
        <style>
            td, th {
                border: 1px solid #999;
                padding: 0.1em 1em;
            }
        </style>
    </head>
    <body>
    
        <table>
            <tr>
                <th rowspan="2">Carnivores</th>
                <td>Tiger</td>
                <td>Cheetah</td>
                <td>Caracal</td>
                <td>Wildcat</td>
            </tr>
            <tr>
                <td>Grey Wolf</td>
                <td>Cape hunting dog</td>
                <td>Red fox</td>
                <td>Fennec</td>
            </tr>
            <tr>
                <th>Primates</th>
                <td>Indri</td>
                <td>Sifaka</td>
                <td>Brown lemur</td>
                <td>Dwarf lemur</td>
            </tr>
        </table>
    
    </body>
    </html>
    셀 병합(Merging cells) 2 : colspan 속성.
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Column spans</title>
        <style>
            td, th {
                border: 1px solid #999;
                padding: 0.1em 1em;
            }
        </style>
    </head>
    <body>
    
        <table>
            <tr>
                <th colspan="2">Carnivores</th>
                <th>Primates</th>
            </tr>
            <tr>
                <td>Tiger</td>
                <td>Grey Wolf</td>
                <td>Indri</td>
            </tr>
            <tr>
                <td>Cheetah</td>
                <td>Cape hunting dog</td>
                <td>Sifaka</td>
            </tr>
            <tr>
                <td>Caracal</td>
                <td>Red fox</td>
                <td>Brown lemur</td>
            </tr>
            <tr>
                <td>Wildcat</td>
                <td>Fennec</td>
                <td>Dwarf lemur</td>
            </tr>
        </table>
    
    </body>
    </html>
    테두리 축소(Border collapsing) 1 : 표 셀 테두리 축소.
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Border collapsing 1</title>
        <style>
            td, th {
                padding: 0.1em 1em;
                border: 1px solid #999;
            }
    
            #t2 {
                border-collapse: collapse;
            }
        </style>
    </head>
    <body>
    
        <h1>Border collapsing 1</h1>
    
        <h2><code>border-collapse: separate;</code> (default)</code></h2>
        <table>
            <tr>
                <th colspan="2">Carnivores</th>
                <th>Primates</th>
            </tr>
            <tr>
                <td>Tiger</td>
                <td>Grey Wolf</td>
                <td>Indri</td>
            </tr>
            <tr>
                <td>Cheetah</td>
                <td>Cape hunting dog</td>
                <td>Sifaka</td>
            </tr>
            <tr>
                <td>Caracal</td>
                <td>Red fox</td>
                <td>Brown lemur</td>
            </tr>
            <tr>
                <td>Wildcat</td>
                <td>Fennec</td>
                <td>Dwarf lemur</td>
            </tr>
        </table>
    
        <h2><code>border-collapse: collapse;</code></code></h2>
        <table id="t2">
            <tr>
                <th rowspan="2">Carnivores</th>
                <td>Tiger</td>
                <td>Cheetah</td>
                <td>Caracal</td>
                <td>Wildcat</td>
            </tr>
            <tr>
                <td>Grey Wolf</td>
                <td>Cape hunting dog</td>
                <td>Red fox</td>
                <td>Fennec</td>
            </tr>
            <tr>
                <th>Primates</th>
                <td>Indri</td>
                <td>Sifaka</td>
                <td>Brown lemur</td>
                <td>Dwarf lemur</td>
            </tr>
        </table>
    
    </body>
    </html>
    테두리 축소(Border collapsing) 2 : 표 셀 테두리 및 표 테두리 축소.
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Border collapsing 2</title>
        <style>
            table {
                border: 1px solid black;
            }
    
            td, th {
                padding: 0.1em 1em;
                border: 10px solid #ccc;
            }
    
            #t2 {
                border-collapse: collapse;
            }
        </style>
    </head>
    <body>
    
        <h1>Border collapsing 2</h1>
    
        <h2><code>border-collapse: separate;</code> (default)</code></h2>
        <table>
            <tr>
                <th colspan="2">Carnivores</th>
                <th>Primates</th>
            </tr>
            <tr>
                <td>Tiger</td>
                <td>Grey Wolf</td>
                <td>Indri</td>
            </tr>
            <tr>
                <td>Cheetah</td>
                <td>Cape hunting dog</td>
                <td>Sifaka</td>
            </tr>
            <tr>
                <td>Caracal</td>
                <td>Red fox</td>
                <td>Brown lemur</td>
            </tr>
            <tr>
                <td>Wildcat</td>
                <td>Fennec</td>
                <td>Dwarf lemur</td>
            </tr>
        </table>
    
        <h2><code>border-collapse: collapse;</code></code></h2>
        <table id="t2">
            <tr>
                <th rowspan="2">Carnivores</th>
                <td>Tiger</td>
                <td>Cheetah</td>
                <td>Caracal</td>
                <td>Wildcat</td>
            </tr>
            <tr>
                <td>Grey Wolf</td>
                <td>Cape hunting dog</td>
                <td>Red fox</td>
                <td>Fennec</td>
            </tr>
            <tr>
                <th>Primates</th>
                <td>Indri</td>
                <td>Sifaka</td>
                <td>Brown lemur</td>
                <td>Dwarf lemur</td>
            </tr>
        </table>
    
    </body>
    </html>
    열 그룹(Column groups) : colcolgroup 요소
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Column groups</title>
        <style>
            body {
                font: 80%/1.5 arial, helvetica, sans-serif;
            }
        
            table {
                border: 1px solid #668;
                border-collapse: collapse;
                caption-side: bottom;
            }
        
            td {
                padding: 0.1em 2em;
                border-spacing: 1em;
            }
    
        
            col.alternative {
                background: #ddf;
            }
        </style>
    </head>
    <body>
    
        <table>
            <caption>Caption</caption>
            <colgroup>
                <col>
                <col class="alternative">
                <col>
                <col class="alternative">
                <col>
            </colgroup>
            <tr>
                <td>This</td>
                <td>That</td>
                <td>The other</td>
                <td>Lunch</td>
                <td>Lunch</td>
            </tr>
            <tr>
                <td>Ladybird</td>
                <td>Locust</td>
                <td>Lunch</td>
                <td>Lunch</td>
                <td>Lunch</td>
            </tr>
            <tr>
                <td>Ladybird</td>
                <td>Locust</td>
                <td>Lunch</td>
                <td>Lunch</td>
                <td>Lunch</td>
            </tr>
            <tr>
                <td>Ladybird</td>
                <td>Locust</td>
                <td>Lunch</td>
                <td>Lunch</td>
                <td>Lunch</td>
            </tr>
            <tr>
                <td>Ladybird</td>
                <td>Locust</td>
                <td>Lunch</td>
                <td>Lunch</td>
                <td>Lunch</td>
            </tr>
        </table>
    
    </body>
    </html>
    빈 셀(Empty cells) : 빈 셀(empty-cells) 속성을 사용하여 빈 셀을 표시하는 방법을 지정합니다.
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Empty cells</title>
        <style>
            table {
                width: 100%;
            }
    
            td, th {
                border: 1px solid #999;
                padding: 0.1em 1em;
                empty-cells: hide;
            }
    
            .alternative {
                background-color: #ddf;
            }
        </style>
    </head>
    <body>
    
        <table>
            <caption>Animal groups</caption>
            <colgroup>
                <col span="3">
                <col class="alternative">
                <col>
            </colgroup>
            <tr>
                <th>Apes</th>
                <th colspan="2">Cats</th>
                <th style="background: #ddf;">Dogs</th>
                <th>Lemurs</th>
            </tr>
            <tr>
                <td>Gorilla</td>
                <td></td>
                <td>Cheetah</td>
                <td style="background: #ddf;">Grey Wolf</td>
                <td></td>
            </tr>
            <tr>
                <td></td>
                <td>Lion</td>
                <td>Puma</td>
                <td style="background: #ddf;"></td>
                <td></td>
            </tr>
            <tr>
                <td></td>
                <td></td>
                <td>Serval</td>
                <td style="background: #ddf;"></td>
                <td>Red ruffed lemur</td>
            </tr>
            <tr>
                <td>Chimpanzee</td>
                <td>Leopard</td>
                <td>Caracal</td>
                <td style="background: #ddf;">Red Fox</td>
                <td>Ring tailed lemur</td>
            </tr>
            <tr>
                <td>Bonobo</td>
                <td> </td><!-- a non-breaking space makes this not an empty cell -->
                <td>Wild cat</td>
                <td style="background: #ddf;"> </td>
                <td> </td>
            </tr>
        </table>
    
    </body>
    </html>
    자동 테이블 레이아웃(Automatic table layout) : 테이블이 사용하는 기본 레이아웃 알고리즘.
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Automatic table layout</title>
        <style>
            table {
                border-collapse: collapse;
                width: 100%;
            }
    
            td, th {
                border: 1px solid #999;
                padding: 0.1em 1em;
            }
    
            .alternative {
                background-color: #ddf;
            }
        </style>
    </head>
    <body>
    
        <table>
            <caption>Animal groups</caption>
            <colgroup>
                <col span="3">
                <col class="alternative">
                <col>
            </colgroup>
            <tr>
                <th>Apes</th>
                <th colspan="2">Cats</th>
                <th style="background: #ddf;">Dogs</th>
                <th>Lemurs</th>
            </tr>
            <tr>
                <td>Gorilla</td>
                <td>Tiger</td>
                <td>Cheetah</td>
                <td style="background: #ddf;">Grey Wolf</td>
                <td>Indri</td>
            </tr>
            <tr>
                <td>Orangutan</td>
                <td>Lion</td>
                <td>Puma</td>
                <td style="background: #ddf;">Cape hunting dog</td>
                <td>Sifaka</td>
            </tr>
            <tr>
                <td>Man</td>
                <td>Jaguar</td>
                <td>Serval</td>
                <td style="background: #ddf;">Very silly big long-long named dog woof</td>
                <td>Red ruffed lemur</td>
            </tr>
            <tr>
                <td>Chimpanzee</td>
                <td>Leopard</td>
                <td>Caracal</td>
                <td style="background: #ddf;">Red Fox</td>
                <td>Ring tailed lemur</td>
            </tr>
            <tr>
                <td>Bonobo</td>
                <td>Snow leopard</td>
                <td>Wild cat</td>
                <td style="background: #ddf;">Fennec</td>
                <td>Dwarf lemur</td>
            </tr>
        </table>
    
    </body>
    </html>
    고정 테이블 레이아웃(Fixed table layout) : table-layout 속성을 사용하여 설정합니다.
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Fixed table layout</title>
        <style>
            table {
                border-collapse: collapse;
                table-layout: fixed;
                width: 100%;
            }
    
            td, th {
                border: 1px solid #999;
                padding: 0.1em 1em;
            }
    
            .alternative {
                background-color: #ddf;
            }
        </style>
    </head>
    <body>
    
        <table>
            <caption>Animal groups</caption>
            <colgroup>
                <col span="3">
                <col class="alternative">
                <col>
            </colgroup>
            <tr>
                <th>Apes</th>
                <th colspan="2">Cats</th>
                <th style="background: #ddf;">Dogs</th>
                <th>Lemurs</th>
            </tr>
            <tr>
                <td>Gorilla</td>
                <td>Tiger</td>
                <td>Cheetah</td>
                <td style="background: #ddf;">Grey Wolf</td>
                <td>Indri</td>
            </tr>
            <tr>
                <td>Orangutan</td>
                <td>Lion</td>
                <td>Puma</td>
                <td style="background: #ddf;">Cape hunting dog</td>
                <td>Sifaka</td>
            </tr>
            <tr>
                <td>Man</td>
                <td>Jaguar</td>
                <td>Serval</td>
                <td style="background: #ddf;">Very silly big long-long named dog woof</td>
                <td>Red ruffed lemur</td>
            </tr>
            <tr>
                <td>Chimpanzee</td>
                <td>Leopard</td>
                <td>Caracal</td>
                <td style="background: #ddf;">Red Fox</td>
                <td>Ring tailed lemur</td>
            </tr>
            <tr>
                <td>Bonobo</td>
                <td>Snow leopard</td>
                <td>Wild cat</td>
                <td style="background: #ddf;">Fennec</td>
                <td>Dwarf lemur</td>
            </tr>
        </table>
    
    </body>
    </html>
  • HTML Lists와 Navigation 표현 방법

    HTML Lists와 Navigation 표현 방법

    웹 디자인에 있어서 list와 navigation은 다양한 방법으로 사용할 수 있습니다.

    기본 목록 : ul, ol 및 li 요소 만들기.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Basic lists</title>
    </head>
    <body>
    
        <ul>
            <li>This</li>
            <li>That</li>
            <li>The Other</li>
        </ul>
    
        <ol>
            <li>The first thing</li>
            <li>The second thing</li>
            <li>The third thing</li>
        </ol>
    
    </body>
    </html>

    중첩 목록 : 내부 목록을 나열하기.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Nested lists</title>
    </head>
    <body>
        
        <ul>
            <li>This
                <ul>
                    <li>This type of this</li>
                    <li>That type of this
                        <ul>
                            <li>This type of that type of this</li>
                            <li>That type of that type of this</li>
                            <li>The other type of that type of this</li>
                        </ul>
                    </li>
                    <li>The other type of this</li>
                </ul>
            </li>
            <li>That</li>
            <li>The Other</li>
        </ul>
    
    </body>
    </html>

    설명 목록 : dl, dt 및 dd

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Description lists</title>
    </head>
    <body>
    
        <dl>
            <dt>Cat</dt>
            <dd>Any member of the family Felidae.</dd>
            <dd>The domesticated species of that family, Felis silvestris.</dd>
            <dd>A little furry thing that purrs.</dd>
    
            <dt>Dog</dt>
            <dt>Yo Momma</dt>
            <dd>A big shaggy thing that barks.</dd>
        </dl>
    
    </body>
    </html>

    목록 표시자 : 목록 스타일 유형을 사용하여 글 머리 기호 및 번호 매기기 변경.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>List markers</title>
        <style>
            ol { list-style-type: lower-roman; }
    
            ul { list-style-type: square; }
    
            ul ul { list-style-type: circle; }
        </style>
    </head>
    <body>
    
        <ul>
            <li>This
                <ul>
                    <li>This type of this</li>
                    <li>That type of this
                        <ul>
                            <li>This type of that type of this</li>
                            <li>That type of that type of this</li>
                            <li>The other type of that type of this</li>
                        </ul>
                    </li>
                    <li>The other type of this</li>
                </ul>
            </li>
            <li>That</li>
            <li>The Other</li>
        </ul>
    
        <ol>
            <li>The first thing</li>
            <li>The second thing</li>
            <li>The third thing</li>
        </ol>
    
    </body>
    </html>

    목록 항목 표시자에 이미지 : list-style-image 사용.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Images as list item markers</title>
        <style>
            ul {
                list-style-image: url("./img/tick.gif");
                list-style-type: square; /* 이것을 추가하는 것이 좋습니다. */
            }
        </style>
    </head>
    <body>
        
        <ul>
            <li>List item image markers</li>
            <li>Can be defined with <code>list-style-image</code></li>
            <li>Can also be defined with the <code>list-style</code> shorthand property</li>
            <li>Remember to use a generic list item marker (using <code>list-style-type</code>) as fallback</li>
        </ul>
    
    </body>
    </html>

    내부 및 외부 목록 표시자 : list-style-position 사용.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Lists marker position</title>
        <style>
            body {
                font: 1em arial, helvetica, sans-serif;
            }
        
            ul {
                border: 2px solid black;
            }
        
            li {
                border: 2px dotted #ccc;
                bfackground: #ccc;
            }
        
            .second {
                list-style-position: inside;
            }
        </style>
    </head>
    <body>
        
        <ul>
            <li>This</li>
            <li>That</li>
            <li class="second">The other</li>
        </ul>
    
    </body>
    </html>

    드롭 다운 1(Dropdown menu) : 드롭 다운 메뉴의 기본 사항.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Dropdowns 1: Basic, single level</title>
        <style>
            body {
                font: 21px arial, helvetica, sans-serif;
                background: #333;
                color: #000;
            }
        
            a {
                color: #06c;
            }
        
            ul { /* 모든 목록... */
                padding: 0;
                margin: 0;
                background: #fff;
            }
        
            li { /* 모든 목록 항목... */
                display: inline; /* 목록 항목을 왼쪽에서 오른쪽으로 설정 */
                position: relative; /* 위치 할 자식 상자의 원점을 설정 */
            }
    
            ul ul { /* 목록 내에 목록을 만든다... */
                position: absolute; /* 모든 것의 위에 놓는다 */
                left: 0; /* 상위 목록 항목을 왼쪽에 정렬 - 일부 과거버전의 브라우저에 필요  */
                top: 100%; /* 부모 목록 항목의 맨 아래에 정렬하십시오. 이전 브라우저에서만 필요합니다. */
                display: none; /* 숨겨라 */
            }
        
            li:hover ul { /* 목록 항목을 마우스로 가리키면 해당 항목에 포함 된 목록으로 이동... */
                display: block; /* block 타입으로 보여라 */
            }
        </style>
    </head>
    
    <body>
    
        <ul>
            <li>
                <a href="">Birds</a>
                <ul>
                    <li><a href="">Ratites</a></li>
                    <li><a href="">Fowl</a></li>
                    <li><a href="">Neoaves</a></li>
                </ul>
            </li>
            <li>
                <a href="">Mammals</a>
                <ul>
                    <li><a href="">Monotremes</a></li>
                    <li><a href="">Marsupials</a></li>
                    <li><a href="">Placentals</a></li>
                </ul>
            </li>
            <li>
                <a href="">Reptiles</a>
                <ul>
                    <li><a href="">Lizards and snakes</a></li>
                    <li><a href="">Tortoises and turtles</a></li>
                    <li><a href="">Crocodilians</a></li>
                    <li><a href="">Tuatara</a></li>
                </ul>
            </li>
            <li>
                <a href="">Amphibians</a>
                <ul>
                    <li><a href="">Frogs and toads</a></li>
                    <li><a href="">Salamanders and newts</a></li>
                    <li><a href="">Caecilians</a></li>
                </ul>
            </li>
        </ul>
    
    </body>
    </html>

    드롭 다운 2(Dropdown menu) : 간단한 멀티 레벨 드롭 다운 메뉴.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Dropdowns 2: Multiple levels</title>
        <style>
            body {
                font: 21px arial, helvetica, sans-serif;
                background: #333;
                color: #fff;
            }
        
            a {
                color: #06c;
            }
        
            ul {
                padding: 0;
                margin: 0;
                background: #000;
                float: left;
            }
        
            li {
                float: left;
                display: inline;
                position: relative;
                width: 150px;
                list-style: none;
            }
        
            ul ul {
                position: absolute;
                left: 0;
                top: 100%;
                background: #ccc;
                display: none;
            }
        
            ul ul ul {
                left: 100%;
                top: 0;
                background: #999;
            }
        
            li:hover > ul {
                display: block;
            }
        
        
            p {
                clear: left;
                padding-top: 1em;
            }
        </style>
    </head>
    
    <body>
        
        <nav>
            <ul>
                <li>
                    <a href="">Birds</a>
                    <ul>
                        <li><a href="">Ratites</a></li>
                        <li><a href="">Fowl</a></li>
                        <li><a href="">Neoaves</a></li>
                    </ul>
                </li>
                <li>
                    <a href="">Mammals</a>
                    <ul>
                        <li>
                            <a href="">Monotremes</a>
                            <ul>
                                <li><a href="">Echidnas</a></li>
                                <li><a href="">Platypus</a></li>
                            </ul>
                        </li>
                        <li>
                            <a href="">Marsupials</a>
                            <ul>
                                <li><a href="">Opossums</a></li>
                                <li><a href="">Numbats, etc.</a></li>
                                <li><a href="">Bandicoots, etc.</a></li>
                                <li><a href="">Kangaroos, koalas, wombats, etc.</a></li>
                            </ul>
                        </li>
                        <li>
                            <a href="">Placentals</a>
                            <ul>
                                <li><a href="">Primates, ungulates, etc.</a></li>
                                <li><a href="">Anteaters, sloths, etc.</a></li>
                                <li><a href="">Elephants, etc.</a></li>
                            </ul>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="">Reptiles</a>
                    <ul>
                        <li><a href="">Lizards and snakes</a></li>
                        <li><a href="">Tortoises and turtles</a></li>
                        <li><a href="">Crocodilians</a></li>
                        <li><a href="">Tuatara</a></li>
                    </ul>
                </li>
                <li>
                    <a href="">Amphibians</a>
                    <ul>
                        <li><a href="">Frogs and toads</a></li>
                        <li><a href="">Salamanders and newts</a></li>
                        <li><a href="">Caecilians</a></li>
                    </ul>
                </li>
            </ul>
        </nav>
    
    </body>
    </html>

    드롭 다운 3(Dropdown menu) : 보다 세부적인 디자인의 멀티 레벨 드롭 다운.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Dropdowns 3: Prettying it up</title>
        <style>
            * {
                margin: 0;
                padding: 0;
            }
        
            body {
                font: 300 15px/1.5 "Helvetica Neue", helvetica, arial, sans-serif;
                background: #333;
                margin: 15px;
            }
        
            article {
                width: 600px;
                margin: 0 auto;
                background: #000;
                color: #fff;
                border-radius: 5px;
                box-shadow: 0 0 15px 2px #666;
            }
        
            section {
                clear: left;
            }
        
            h1 {
                font-size: 45px;
                font-weight: 100;
                letter-spacing: 15px;
                text-align: center;
            }
    
            h1, #main_content, #dog_link {
                padding: 15px;
            }
    
            p {
                margin: 15px 0;
            }
        
            a {
                color: #06c;
            }
        
            #main_nav ul {
                background: white;
                float: left;
                -webkit-transition: .5s;
                transition: .5s;
            }
        
            #main_nav li {
                float: left;
                position: relative;
                width: 150px;
                list-style: none;
                -webkit-transition: .5s;
                transition: .5s;
            }
        
            #main_nav > ul > li > a, h1 {
                text-transform: uppercase;
            }
        
            #main_nav a {
                display: block;
                text-decoration: none;
                padding: 5px 15px;
                color: #000;
            }
    
            #main_nav ul ul {
                position: absolute;
                left: 0;
                top: 100%;
                visibility: hidden;
                opacity: 0;
            }
        
            #main_nav ul ul ul {
                left: 100%;
                top: 0;
            }
        
            #main_nav li:hover, #main_nav li:hover li {
                background: #ddd;
            }
        
            #main_nav li li:hover, #main_nav li li:hover li {
                background: #bbb;
            }
        
            #main_nav li li li:hover {
                background: #999;
            }
        
            #main_nav li:hover > ul {
                visibility: visible;
                opacity: 1;
            }
        </style>
        <!--[if lt IE 9]><script src="./js/html5shiv.js"></script><![endif]-->
    </head>
    <body>
        <article>
            <h1>Tetrapods</h1>
    
            <nav id="main_nav">
                <ul>
                    <li>
                        <a href="">Birds</a>
                        <ul>
                            <li><a href="">Ratites</a></li>
                            <li><a href="">Fowl</a></li>
                            <li><a href="">Neoaves</a></li>
                        </ul>
                    </li>
                    <li>
                        <a href="">Mammals</a>
                        <ul>
                            <li>
                                <a href="">Monotremes</a>
                                <ul>
                                    <li><a href="">Echidnas</a></li>
                                    <li><a href="">Platypus</a></li>
                                </ul>
                            </li>
                            <li>
                                <a href="">Marsupials</a>
                                <ul>
                                    <li><a href="">Opossums</a></li>
                                    <li><a href="">Numbats, etc.</a></li>
                                    <li><a href="">Bandicoots, etc.</a></li>
                                    <li><a href="">Kangaroos, koalas, wombats, etc.</a></li>
                                </ul>
                            </li>
                            <li>
                                <a href="">Placentals</a>
                                <ul>
                                    <li><a href="">Primates, ungulates, etc.</a></li>
                                    <li><a href="">Anteaters, sloths, etc.</a></li>
                                    <li><a href="">Elephants, etc.</a></li>
                                </ul>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <a href="">Reptiles</a>
                        <ul>
                            <li><a href="">Lizards and snakes</a></li>
                            <li><a href="">Tortoises and turtles</a></li>
                            <li><a href="">Crocodilians</a></li>
                            <li><a href="">Tuatara</a></li>
                        </ul>
                    </li>
                    <li>
                        <a href="">Amphibians</a>
                        <ul>
                            <li><a href="">Frogs and toads</a></li>
                            <li><a href="">Salamanders and newts</a></li>
                            <li><a href="">Caecilians</a></li>
                        </ul>
                    </li>
                </ul>
            </nav>
        
            <section id="main_content">
                <p>A CSS dropdown menu example using tetrapod groups as navigation items. The "Mammals" item provides an example of a multi-level dropdown. See the HTML Dog Dropdowns tecnhique article for more information.</p>
    
                <p>Tetrapods are a major group of animals containing those that evolved from fish and developed four limbs. They comprise the major sub-groups of amphibians, reptiles, mammals, and birds. "Tetrapod" literally means four-footed.</p>
            </section>
    
    
        </article>
    </body>
    </html>

    인라인 탭(Inline tabs) : 디스플레이 속성을 사용하는 기본 탭 탐색.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Tabs 1</title>
        <style>
            body {
                font: 0.8em arial, helvetica, sans-serif;
            }
        
            #header ul {
                list-style: none;
                padding: 0;
                margin: 0;
            }
        
            #header li {
                display: inline;
                border: 1px solid;
                border-bottom-width: 0;
                margin: 0 0.5em 0 0;
            }
        
            #header li a {
                padding: 0 1em;
            }
        
            #header #selected {
                padding-bottom: 1px;
                background: white;
            }
        
            #content {
                border: 1px solid;
            }
        </style>
    </head>
    <body>
        
        <div id="header">
            <h1>Tabs</h1>
            <ul>
                <li><a href="#">This</a></li>
                <li id="selected"><a href="#">That</a></li>
                <li><a href="#">The Other</a></li>
                <li><a href="#">Banana</a></li>
            </ul>
        </div>
    
        <div id="content">
            <p>Ispum schmipsum.</p>
        </div>
    
    </body>
    </html>

    플로팅 탭(Floated tabs) : float 속성을 사용하는 기본 탭.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Tabs 2</title>
        <style>
            body {
                font: 0.8em arial, helvetica, sans-serif;
            }
        
            #header ul {
                list-style: none;
                padding: 0;
                margin: 0;
            }
        
            #header li {
                float: left;
                border: 1px solid;
                border-bottom-width: 0;
                margin: 0 0.5em 0 0;
            }
        
            #header a {
                display: block;
                padding: 0 1em;
            }
        
            #header #selected {
                position: relative;
                top: 1px;
                background: white;
            }
        
            #content {
                border: 1px solid;
                clear: both;
            }
        
            h1 {
                margin: 0;
                padding: 0 0 1em 0;
            }
        </style>
    </head>
    <body>
    
        <div id="header">
            <h1>Tabs</h1>
            <ul>
                <li><a href="#">This</a></li>
                <li id="selected"><a href="#">That</a></li>
                <li><a href="#">The Other</a></li>
                <li><a href="#">Banana</a></li>
            </ul>
        </div>
    
        <div id="content">
            <p>Ispum schmipsum.</p>
        </div>
    
    </body>
    </html>

    탭(tab style) 더보기 : 탭을 탭처럼 만들기.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Tabs 3</title>
        <style>
            body {
                font: 0.8em arial, helvetica, sans-serif;
            }
    
            #header ul {
                list-style: none;
                padding: 0;
                margin: 0;
            }
    
            #header li {
                float: left;
                border: 1px solid #bbb;
                border-bottom-width: 0;
                margin: 0;
            }
    
            #header a {
                text-decoration: none;
                display: block;
                background: #eee;
                padding: 0.24em 1em;
                color: #00c;
                width: 8em;
                text-align: center;
            }
    
            #header a:hover {
                background: #ddf;
            }
    
            #header #selected {
                border-color: black;
            }
    
            #header #selected a {
                position: relative;
                top: 1px;
                background: white;
                color: black;
                font-weight: bold;
            }
    
            #content {
                border: 1px solid black;
                clear: both;
                padding: 0 1em;
            }
    
            h1 {
                margin: 0;
                padding: 0 0 1em 0;
            }
        </style>
    </head>
    <body>
    
        <div id="header">
            <h1>Tabs</h1>
            <ul>
                <li><a href="#">This</a></li>
                <li id="selected"><a href="#">That</a></li>
                <li><a href="#">The Other</a></li>
                <li><a href="#">Banana</a></li>
            </ul>
        </div>
    
        <div id="content">
            <p>Ispum schmipsum.</p>
        </div>
    
    </body>
    </html>

    더 많은 탭 : 대체 탭(Alternative tab) 스타일.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Tabs 4</title>
        <style>
            body {
                font: small arial, helvetica, sans-serif;
            }
    
            #header ul {
                list-style: none;
                padding: 0;
                margin: 0;
            }
    
            #header li {
                display: inline;
                margin: 0 2px 0 0;
            }
    
            #header a {
                padding: 0 1em;
                text-decoration: none;
                color: #a80;
                background: #fe5;
            }
    
            #header a:hover {
                background: #fc0;
                color: #540;
            }
    
            #header #selected a {
                padding-bottom: 2px;
                font-weight: bold;
                color: black;
                color: black;
                background: #fc0;
            }
    
            #content {
                border-top: 2px solid white;
                background: #fc0;
                padding: 1em;
            }
    
            #content p {
                margin: 0;
                padding: 1em;
                background: white;
            }
    
            h1 {
                font-size: 1.5em;
                color: #fc0;
            }
        </style>
    </head>
    <body>
        
        <div id="header">
            <h1>Tabs</h1>
            <ul>
                <li><a href="#">This</a></li><!-- li 사이의 이러한 주석은 소스의 다른 줄에 나타나는 목록 항목 사이에 공백이 나타나지 않도록 IE의 문제를 해결합니다.
                --><li id="selected"><a href="#">That</a></li><!--
                --><li><a href="#">The Other</a></li><!--
                --><li><a href="#">Banana</a></li>
            </ul>
        </div>
    
        <div id="content">
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
        </div>
    
    </body>
    </html>

    Skinny tabs : 간단한 밑줄 사용.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Tabs 5</title>
        <style>
            body {
                background: #f80;
                font: 0.8em arial, helvetica, sans-serif;
                text-transform: lowercase;
                margin: 0;
                padding: 0;
            }
    
            #header {
                background-color: white;
            }
    
            #header ul {
                list-style: none;
                padding: 0;
                margin: 0;
                background: white;
                float: left;
                width: 100%;
            }
    
            #header li {
                float: left;
                margin: 0 1em 0 0;
            }
    
            #header a {
                text-decoration: none;
                display: block;
                width: 6em;
                padding: 0 0.5em;
                font-weight: bold;
                color: black;
                border-bottom: 0.5em solid #fc6;
                color: #fc6;
            }
    
            #header a:hover {
                color: #fa3;
                border-color: #fa3;
            }
    
            #header #selected a {
                color: #f80;
                border-color: #f80;
            }
    
            #content {
                clear: both;
                color: white;
                padding: 1em;
            }
    
            #content p {
                margin: 0 0 1em 0;
            }
    
            h1 {
                margin: 0;
                padding: 0.5em 0 1em 0.5em;
                color: #f80;
                font-size: 1.5em;
                font-style: italic;
            }
        </style>
    </head>
    <body>
    
        <div id="header">
            <h1>Tabs</h1>
            <ul>
                <li><a href="#">This</a></li>
                <li id="selected"><a href="#">That</a></li>
                <li><a href="#">The Other</a></li>
                <li><a href="#">Banana</a></li>
            </ul>
        </div>
    
        <div id="content">
            <p>Ispum schmipsum.</p>
        </div>
    
    </body>
    </html>

    Fancy tabs : CSS로 만들기

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Fancy tabs | HTML Dog</title>
        <style>
            *, #content :first-child, #content :last-child {
                margin: 0;
            }
    
            body {
                font: 300 15px/1.2 "Helvetica Neue", Helvetica, Arial, sans-serif;
                background: #333;
                margin: 20px;
            }
    
            h1 {
                margin-bottom: 20px;
                color: #fff;
                text-transform: uppercase;
                font-size: 55px;
                font-weight: 100;
                letter-spacing: 30px;
                text-shadow: 3px 3px 5px #000;
            }
    
            nav ul {
                list-style: none;
                padding: 0 0 0 10px;
                min-width: 460px;
            }
    
            nav li {
                float: left;
                position: relative;
                height: 30px;
                border-radius: 10px 30px 0 0;
                margin-left: -10px;
                text-shadow: 1px 1px 0 #bbb;
                box-shadow: 0px 0px 10px rgba(0,0,0,.5);
                transition: .2s;
            }
    
            nav a {
                display: block;
                position: relative;
                width: 90px;
                height: 20px;
                padding: 6px 10px 20px 0;
                border-radius: 10px 30px 0 0;
                background: #999;
                color: #444;
                text-align: center;
                text-decoration: none;
                transition: .2s;
            }
    
            nav li:hover {
                z-index: 1;
            }
    
            nav li:hover a {
                background: #ccc;
                color: #000;
            }
    
            #selected {
                z-index: 2;
            }
    
            #selected a {
                z-index: 3;
                background: #fff;
                color: #000;
                text-shadow: none;
                font-weight: 500;
            }
    
            #content {
                position: relative;
                z-index: 1;
                clear: both;
                min-width: 420px;
                padding: 20px;
                border-radius: 10px;
                box-shadow: 0px 0px 10px rgba(0,0,0,.5);
                background: #fff;
            }
    
            #content p {
                margin: 20px 0;
            }
        </style>
        <!--[if lt IE 9]><script src="./js/html5shiv.js"></script><![endif]-->
    </head>
    <body>
        
        <header>
            <h1>CSS Tabs</h1>
            <nav>
                <ul>
                    <li><a href="">This</a></li>
                    <li id="selected"><a href="">That</a></li>
                    <li><a href="">The other</a></li>
                    <li><a href="">Banana</a></li>
                    <li><a href="">Kumquat</a></li>
                </ul>
            </nav>
        </header>
        
        <section id="content">
            <p>"Tabbed navigation", using floated list items.</p>
            <p>Read the CSS Tabs HTML KNULAB Techniques article for more information.</p>
        </section>
        
    </body>
    </html>

    Show / hide navigation(JavaScript) : JavaScript를 사용하여 표시를 전환합니다.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>Show / hide navigation (JavaScript)</title>
        <style>
            body {
                background: #333;
                color: #000;
                margin: 0;
                font: 300 18px/27px "Helvetica Neue", Helvetica, Arial, sans-serif;
            }
        
            #container {
                width: 240px;
                position: relative;
                background: #fff;
                margin: 0 auto;
                padding: 40px;
                border-radius: 0 0 5px 5px;
                box-shadow: 0 0 8px 2px #000;
            }
        
            #main_nav {
                display: none;
                position: absolute;
                top: 0;
                left: 0;
                background: #fff;
                width: 100%;
                
                border-radius: 0 0 5px 5px;
                box-shadow: 0 0 8px 2px #000;
            }
    
            .with_nav #main_nav {
                display: block;
            }
    
            .access_aid {
                display: none;
            }
    
            #access_nav {
                display: block;
                position: absolute;
                top: 0;
                right: 0;
                width: 40px;
                height: 0;
                padding-top: 40px;
                overflow: hidden;
                border: 1px solid #ccc;
                background: white 10px 10px / 20px 20px no-repeat;
    
                background-image: -webkit-repeating-linear-gradient(#ccc, #ccc 2px, #fff 2px, #fff 4px);
                background-image: repeating-linear-gradient(#ccc, #ccc 2px, #fff 2px, #fff 4px);
                z-index: 1;
            }
    
            .with_nav #access_nav {
                background-image: linear-gradient(45deg, transparent 13px, #ccc 13px, #ccc 15px, transparent 0), linear-gradient(-45deg, white 13px, #ccc 13px, #ccc 15px, white 0);
            }
        </style>
    </head>
    <body id="body">
        
        <div id="container">
            <p><a href="#main_nav" id="access_nav" class="access_aid">Skip to navigation</a></p>
            <article>
                <h1>Show / Hide Navigation (JavaScript)</h1>
                <p>An example of a simple technique to show and hide navigation, using <em>JavaScript</em>. Particularly useful when designing for mobile.</p>
                <p>This also uses CSS gradients to produce the "show" and "hide" button icons instead of images.</p>
            </article>
    
            <nav id="main_nav">
                <ul>
                    <li><a href="">This</a></li>
                    <li><a href="">That</a></li>
                    <li><a href="">The other</a></li>
                </ul>
                <p><a href="#body" id="access_top" class="access_aid">Skip to top</a></p>
            </nav>
    
        </div>
        <script>
            var nav = document.getElementById('access_nav'),
                body = document.body;
        
            nav.addEventListener('click', function(e) {
                body.className = body.className? '' : 'with_nav';
                e.preventDefault();
            });
        </script>
    
    </body>
    </html>

    Show / hide navigation (target) : 가상 클래스( :target )를 사용하여 상태를 토글합니다.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>Show / hide navigation (target)</title>
        <style>
            body {
                background: #333;
                color: #000;
                margin: 0;
                font: 300 18px/27px "Helvetica Neue", Helvetica, Arial, sans-serif;
            }
        
            #container {
                width: 240px;
                position: relative;
                background: #fff;
                margin: 0 auto;
                padding: 40px;
                border-radius: 0 0 5px 5px;
                box-shadow: 0 0 8px 2px #000;
            }
        
            #main_nav {
                display: none;
                position: absolute;
                top: 0;
                left: 0;
                background: #fff;
                width: 100%;
                
                border-radius: 0 0 5px 5px;
                box-shadow: 0 0 8px 2px #000;
            }
    
            #main_nav:target {
                display: block;
            }
    
            .access_aid {
                display: block;
                position: absolute;
                top: 0;
                right: 0;
                width: 40px;
                height: 0;
                padding-top: 40px;
                overflow: hidden;
                border: 1px solid #ccc;
                background: white 10px 10px / 20px 20px no-repeat;
            }
    
            #access_nav {
                background-image: -webkit-repeating-linear-gradient(#ccc, #ccc 2px, #fff 2px, #fff 4px);
                background-image: repeating-linear-gradient(#ccc, #ccc 2px, #fff 2px, #fff 4px);
            }
    
            #access_top {
                background-image: linear-gradient(45deg, transparent 13px, #ccc 13px, #ccc 15px, transparent 0), linear-gradient(-45deg, white 13px, #ccc 13px, #ccc 15px, white 0);
            }
        </style>
    </head>
    <body id="body">
    
        <div id="container">
            <p><a href="#main_nav" id="access_nav" class="access_aid">Skip to navigation</a></p>
            <article>
                <h1>Show / Hide Navigation (target)</h1>
                <p>An example of a simple technique to show and hide navigation, manipulating the <code>:target</code> pseudo class. Particularly useful when designing for mobile.</p>
                <p>This also uses CSS gradients to produce the "show" and "hide" button icons instead of images.</p>
            </article>
    
            <nav id="main_nav">
                <ul>
                    <li><a href="">This</a></li>
                    <li><a href="">That</a></li>
                    <li><a href="">The other</a></li>
                </ul>
                <p><a href="#body" id="access_top" class="access_aid">Skip to top</a></p>
            </nav>
        </div>
        
    </body>
    </html>
  • HTML 링크 표현 방법

    HTML 링크 표현 방법

    HTML에 스타일을 적용하여 좀 더 다양한 링크 효과를 표현합니다.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Custom underlines</title>
        <style>
            body {
                font: 100% arial, helvetica, sans-serif;
            }
            p {
                line-height: 2;
            }
            a {
                color: blue;
                /* link1을 제외하고 모두 'text-decoration : none'이 기본 밑줄을 제거하기 위해 적용됩니다.
    이것들은 각각의 규칙이 어떻게 개별적으로 적용될 것인지를 보여주기 위해 각 선언에 보관되어 있습니다.
    모든 텍스트 스타일을 필요로하는 다양한 링크 스타일을 사용하는 경우 :
    각 선언문 블록이 아닌 여기에 배치해야합니다.*/
            }
            a:visited {
                color: #09c;
            }
            a:hover {
                color: lime;
            }
            a:active {
                color: red;
            }
    
            /* the default styling of a link: */
            #link1 {
        
            }
        
            #link1:hover {
                text-decoration: none;
            }
        
            /* underlines using borders: */
            #link2 {
                text-decoration: none;
                border-bottom: 2px dotted #0c0;
            }
        
            /* underlines using images: */
            #link3 {
                text-decoration: none;
                padding-bottom: 4px;
                background: url("./img/underline_vaguered.gif") bottom repeat-x;
            }
        
            #link4 {
                text-decoration: none;
                padding-bottom: 5px;
                background: url("./img/underline_greenspots.gif") bottom repeat-x;
            }
        
            #link5 {
                text-decoration: none;
                padding-bottom: 2px;
                background: url("./img/underline_zigzag.gif") bottom repeat-x;
            }
        
            #link6 {
                text-decoration: none;
                padding-bottom: 3px;
                background: url("./img/underline_arrowoff.gif") bottom repeat-x;
            }
        
            #link6:hover {
                background: url("./img/underline_arrowon.gif") bottom repeat-x;
            }
        
            #link7 {
                text-decoration: none;
                padding-bottom: 20px;
                background: url("./img/underline_ruler.gif") bottom repeat-x;
            }
        
            #link8 {
                text-decoration: none;
                padding-bottom: 6px;
                background: url("./img/underline_ragged.gif") bottom repeat-x;
            }
        </style>
    </head>
    <body>
    
        <p>The <a href="#" id="link1">green seed</a> of the <a href="#" id="link2">white-flowering</a> climbing <a href="#" id="link3">leguminous papilionaceous</a> plant, <a href="#" id="link4">pisum sativum</a>, has become a dining-table favourite <a href="#" id="link5">for good reason</a>.</p>
        <p><a href="#" id="link6">The perfect accompaniment</a> to any meal, the <a href="#" id="link7">diminutive spherical vegetable</a> brings joy to billions worldwide, be they <a href="#" id="link8">fresh, frozen, canned or dried</a>.</p>
    
    </body>
    </html>
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>The target pseudo class</title>
        <style>
            body {
                font: 100% arial, helvetica, sans-serif;
            }
        
            h2 {
                color: #f60;
            }
        
            h2:target {
                color: white;
                background: #f60;
            }
        </style>
    </head>
    
    <body>
    
        <p>You can read a whole load of content, or get straight to the <a href="#nittygritty">nitty-gritty</a>.</p>
        <p>Alternatively, you can read the  <a href="#grittynitty">gritty-nitty</a>.</p>
        <p>Or if you prefer, try the <a href="#wittyditty">witty ditty</a>.</p>
    
        <!--[A whole load of content]-->
    
        <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas consequat dui sit amet est pharetra luctus. Morbi ut lacus. Ut volutpat rutrum pede. Donec quis erat. Maecenas accumsan consectetuer tortor. Aliquam non enim. Morbi tristique mi ut quam.</p>
        <p>Etiam porta, erat in placerat sodales, tortor mauris gravida sapien, non congue erat mauris vitae purus. Nam eget ipsum non libero fermentum varius. In hac habitasse platea dictumst. Ut non neque. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
        <p>Suspendisse augue. Morbi elit nisl, commodo in, nonummy sit amet, eleifend a, quam. Mauris lorem. Nullam nec sem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum nulla sem, hendrerit sit amet, adipiscing quis, rhoncus nec, purus.</p>
        <p>Duis quis mi eget nisi pharetra venenatis. Ut sagittis erat vitae turpis tristique adipiscing.</p>
    
        <h2 id="nittygritty">Nitty-Gritty</h2>
        <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas consequat dui sit amet est pharetra luctus. Morbi ut lacus. Ut volutpat rutrum pede. Donec quis erat. Maecenas accumsan consectetuer tortor. Aliquam non enim. Morbi tristique mi ut quam.</p>
        <p>Etiam porta, erat in placerat sodales, tortor mauris gravida sapien, non congue erat mauris vitae purus. Nam eget ipsum non libero fermentum varius. In hac habitasse platea dictumst. Ut non neque. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
        <p>Suspendisse augue. Morbi elit nisl, commodo in, nonummy sit amet, eleifend a, quam. Mauris lorem. Nullam nec sem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum nulla sem, hendrerit sit amet, adipiscing quis, rhoncus nec, purus.</p>
        <p>Duis quis mi eget nisi pharetra venenatis. Ut sagittis erat vitae turpis tristique adipiscing.</p>
        <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas consequat dui sit amet est pharetra luctus. Morbi ut lacus. Ut volutpat rutrum pede. Donec quis erat. Maecenas accumsan consectetuer tortor. Aliquam non enim. Morbi tristique mi ut quam.</p>
        <p>Etiam porta, erat in placerat sodales, tortor mauris gravida sapien, non congue erat mauris vitae purus. Nam eget ipsum non libero fermentum varius. In hac habitasse platea dictumst. Ut non neque. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
        <p>Suspendisse augue. Morbi elit nisl, commodo in, nonummy sit amet, eleifend a, quam. Mauris lorem. Nullam nec sem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum nulla sem, hendrerit sit amet, adipiscing quis, rhoncus nec, purus.</p>
        <p>Duis quis mi eget nisi pharetra venenatis. Ut sagittis erat vitae turpis tristique adipiscing.</p>
    
        <h2 id="grittynitty">Gritty-Nitty</h2>
        <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas consequat dui sit amet est pharetra luctus. Morbi ut lacus. Ut volutpat rutrum pede. Donec quis erat. Maecenas accumsan consectetuer tortor. Aliquam non enim. Morbi tristique mi ut quam.</p>
        <p>Etiam porta, erat in placerat sodales, tortor mauris gravida sapien, non congue erat mauris vitae purus. Nam eget ipsum non libero fermentum varius. In hac habitasse platea dictumst. Ut non neque. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
        <p>Suspendisse augue. Morbi elit nisl, commodo in, nonummy sit amet, eleifend a, quam. Mauris lorem. Nullam nec sem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum nulla sem, hendrerit sit amet, adipiscing quis, rhoncus nec, purus.</p>
        <p>Duis quis mi eget nisi pharetra venenatis. Ut sagittis erat vitae turpis tristique adipiscing.</p>
    
        <h2 id="wittyditty">Witty-Ditty</h2>
        <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas consequat dui sit amet est pharetra luctus. Morbi ut lacus. Ut volutpat rutrum pede. Donec quis erat. Maecenas accumsan consectetuer tortor. Aliquam non enim. Morbi tristique mi ut quam.</p>
        <p>Etiam porta, erat in placerat sodales, tortor mauris gravida sapien, non congue erat mauris vitae purus. Nam eget ipsum non libero fermentum varius. In hac habitasse platea dictumst. Ut non neque. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
        <p>Suspendisse augue. Morbi elit nisl, commodo in, nonummy sit amet, eleifend a, quam. Mauris lorem. Nullam nec sem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum nulla sem, hendrerit sit amet, adipiscing quis, rhoncus nec, purus.</p>
        <p>Duis quis mi eget nisi pharetra venenatis. Ut sagittis erat vitae turpis tristique adipiscing.</p>
    
    </body>
    </html>
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Rollovers 1</title>
        <style>
            body {
                font: 12px arial, helvetica, sans-serif;
            }
            #toucan {
                display: block;
                width: 200px;
                height: 63px;
                background-image: url("./img/toucancombo.jpg");
                text-indent: -999em;
            }
            a:hover {
                background-position: bottom;
            }
        </style>
    </head>
    <body>
        <p><a href="#" id="toucan">Toucan</a></p>
    </body>
    </html>
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Rollovers 2</title>
        <style>
        body {
            font: 12px arial, helvetica, sans-serif;
        }
        div a {
            display: block;
            width: 200px;
            height: 63px;
            background-image: url("./img/toucancombo2.jpg");
            text-indent: -999em;
            text-decoration: none;
        }
        a:hover {
            background-position: center;
        }
        a:active {
            background-position: bottom;
        }
        </style>
    </head>
    <body>
        <div>
            <p><a href="#">Toucan</a></p>
            <p><a href="#">Toucan</a></p>
            <p><a href="#">Toucan</a></p>
        </div>
    </body>
    </html>
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Rollovers 3: Fading</title>
        <style>
            body {
                font: 12px arial, helvetica, sans-serif;
            }
            #toucan {
                display: block;
                width: 200px;
                height: 63px;
                background: url("./img/toucancombo.jpg");
                text-indent: -999em;
                position: relative;
            }
            #toucan:after {
                content: "";
                background: url("./img/toucancombo.jpg") bottom;
                display: block;
                position: absolute;
                top: 0;
                height: 63px;
                width: 200px;
                opacity: 0;
                -webkit-transition: .5s;
                transition: .5s;
            }
            #toucan:hover:after {
                opacity: 1;
            }
        </style>
    </head>
    <body>
        <p><a href="#" id="toucan">Toucan</a></p>
    </body>
    </html>
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Rollovers 4: Transformations</title>
        <style>
            * {
                margin: 0;
                padding: 0;
                list-style: none;
            }
        
            body {
                font: 50px arial, helvetica, sans-serif;
                background: #fed;
            }
        
            li a {
                display: block;
                width: 250px;
                padding: 25px;
                margin: 25px auto;
                background: white;
                box-shadow: 0 0 5px 0 rgba(63,31,0,.5);
                border-radius: 10px;
                text-align: center;
                text-decoration: none;
                -webkit-transition: .2s;
                transition: .2s;
            }
        
            li a:hover {
                -webkit-transform: rotate(-10deg) scale(2);
                transform: rotate(-10deg) scale(2);
            }
        </style>
    </head>
    <body>
        <ul>
            <li><a href="#">Toucan!</a></li>
            <li><a href="#">Toucan!</a></li>
            <li><a href="#">Toucan!</a></li>
            <li><a href="#">Toucan!</a></li>
            <li><a href="#">Toucan!</a></li>
        </ul>
    </body>
    </html>
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Simple CSS transitions: Text links</title>
        <style>
            * {
                margin: 0;
            }
            body {
                font: 20px/1.5 arial, helvetica, sans-serif;
                color: #000;
                margin: 20px;
            }
            p {
                margin: 20px 0;
            }
            a {
                -webkit-transition: .5s;
                transition: .5s;
            }
        
            #elephant {
                color: #999;
            }
            #elephant:hover {
                color: #f66;
            }
        
            #plesiosaur {
                color: #06c;
                text-decoration: none;
                border-bottom: 3px solid #ddd;
            }
            #plesiosaur:hover {
                border-color: #06c;
            }
        
            #tourist {
                color: #f66;
            }
            #tourist:hover {
                color: #c00;
                background: #fcc
            }
        
            #htmldog a:hover {
                transform: rotate(360deg);
            }
        </style>
    </head>
    <body>
        <h1>Simple <a href="#">CSS transitions</a></h1>
        <p>Using <a href="#">the <code>transition</code> property</a> for basic animated effects when links are hovered over.</p>
        <ul>
            <li><a href="" id="elephant">Changing color</a></li>
            <li><a href="" id="plesiosaur">Changing border color</a></li>
            <li><a href="" id="tourist">Changing color and background color</a></li>
        </ul>
    </body>
    </html>
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Transitions with border-radius and RGBa</title>
        <style>
            * {
                margin: 0;
            }
            body {
                font: 36px arial, helvetica, sans-serif;
                color: #000;
                background: #06c;
            }
            h1 {
                margin: 40px;
                font-size: 24px;
                color: white;
                text-align: center;
            }
            p {
                height: 360px;
                padding: 40px;
            }
            a, img {
                display: block;
                margin: 0 auto;
                color: rgba(255,255,255,.5);
                text-align: center;
                text-decoration: none;
                -webkit-transition: .5s;
                transition: .5s;
            }
            a:hover {
                background: rgba(255,255,255,.5);
                color: white;
                border-color: white;
            }
            #daddy {
                background: rgba(0,0,0,.3);
            }
            #daddy a {
                width: 120px;
                height: 120px;
                padding: 60px;
                border-radius: 80px;
                border: 60px solid rgba(255,255,255,.5);
            }
            #daddy a:hover {
                border-radius: 180px;
            }
            #spurt {
                background: rgba(0,0,0,.2);
            }
            #spurt a, #baby a {
                width: 80px;
                height: 80px;
                padding: 40px;
                border-radius: 60px;
                border: 40px solid rgba(255,255,255,.5);
                margin: 60px auto;
                font-size: 24px;
            }
            #spurt a:hover {
                width: 120px;
                height: 120px;
                padding: 60px;
                border-width: 60px;
                border-radius: 180px;
                margin: 0 auto;
                font-size: 36px;
            }
            #baby {
                background: rgba(0,0,0,.1);
            }
            #baby a:hover {
                width: 40px;
                height: 40px;
                padding: 20px;
                border-width: 20px;
                border-radius: 60px;
                margin: 120px auto;
                font-size: 12px;
            }
            #pet a {
                width: 120px;
                margin-top: 125px;
                background: white;
                border: 10px solid white;
                border-radius: 10px;
                opacity: .7;
            }
            #pet a:hover {
                background: white;
                box-shadow: 0 0 100px 50px rgba(255,255,255,.5);
                opacity: 1;
            }
        </style>
    </head>
    <body>
        <h1>CSS transitions, using <code>border-radius</code> and RGBa colors.</h1>
        <p id="daddy"><a href="">Big daddy link!</a></p>
        <p id="spurt"><a href="">Growth spurt link!</a></p>
        <p id="baby"><a href="">Shy baby link!</a></p>
    </body>
    </html>
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>CSS transitions: Timing functions</title>
        <style>
            * {
                padding: 0;
                margin: 0;
            }
            body {
                font: 15px arial, helvetica, sans-serif;
                text-align: center;
            }
            h1 {
                margin-top: 20px;
                color: #06c;
            }
            li {
                list-style: none;
                margin: 20px 0;
                background: #def;
            }
            li a {
                display: block;
                width: 300px;
                padding: 20px 0;
                background: #06c;
                color: white;
            }
            #timing1 {
                -webkit-transition: 1s;
                transition: 1s;
            }
            #timing2 {
                -webkit-transition: 1s linear;
                transition: 1s linear;
            }
            #timing3 {
                -webkit-transition: 1s ease-in;
                transition: 1s ease-in;
            }
            #timing4 {
                -webkit-transition: 1s ease-out;
                transition: 1s ease-out;
            }
            #timing5 {
                -webkit-transition: 1s ease-in-out;
                transition: 1s ease-in-out;
            }
            #timing6 {
                -webkit-transition: 1s cubic-bezier(0.5,0.25,0,1);
                transition: 1s cubic-bezier(0.5,0.25,0,1);
            }
            #timing7 {
                -webkit-transition: 1s cubic-bezier(0.5,1.5,0.5,-0.5);
                transition: 1s cubic-bezier(0.5,1.5,0.5,-0.5);
            }
            #timing8 {
                -webkit-transition: 1s steps(4);
                transition: 1s steps(4);
            }
            
            li a:hover {
                width: 100%;
            }
        </style>
    </head>
    <body>
        <h1>CSS transition timing functions</h1>
        <ul>
            <li><a href="" id="timing1"><code>ease</code> (default)</a></li>
            <li><a href="" id="timing2"><code>linear</code></a></li>
            <li><a href="" id="timing3"><code>ease-in</code></a></li>
            <li><a href="" id="timing4"><code>ease-out</code></a></li>
            <li><a href="" id="timing5"><code>ease-in-out</code></a></li>
            <li><a href="" id="timing6"><code>cubic-bezier(0.5,0.25,0,1)</code></a></li>
            <li><a href="" id="timing7"><code>cubic-bezier(0.5,1.5,0.5,-0.5)</code></a></li>
            <li><a href="" id="timing8"><code>steps(4)</code></a></li>
        </ul>
    </body>
    </html>
  • HTML 이미지 표현 방법

    HTML 이미지 표현 방법

    HTML 문서에 이미지 적용방법입니다.

    img 객체 사용방법

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Images: img</title>
        <style>
            body {
                font-size: 20px;
            }
            article {
                width: 480px;
                margin: auto;
            }
            h1 {
                text-align: center;
            }
        </style>
    </head>
    <body>
        <article>
    
            <h1>Images</h1>
            <p>HTML images, inserted using the <code>img</code> tag, are used for meaningful content.</p>
            <img src="./img/ecuador_anaconda.jpg" width="480" height="287" alt="Anaconda">
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
            <img src="./img/ecuador_tarantula.jpg" width="480" height="360" alt="Tarantula">
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
            <img src="./img/ecuador_owlMonkeys.jpg" width="480" height="315" alt="Owl monkeys">
        </article>
    
    </body>
    </html>

    배경 이미지 : background-image

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Images: background-image</title>
        <style>
            body {
                color: #fc6;
                background-color: #c72;
                background-image: url("./img/bg.gif");;
                font-size: 20px;
                margin: 0;
            }
            article {
                width: 480px;
                padding: 20px;
                margin: auto;
                background-color: rgba(0,0,0,.2);
            }
            h1 {
                text-align: center;
            }
            a {
                color: white;
            }
        </style>
    </head>
    <body>
        <article>
            <h1>Images</h1>
            <p>CSS images, applied using the <code>background-image</code> property, are used for decoration.</p>
            <p>HTML images, inserted using the <code>img</code> tag, are used for meaningful content.</p>
            <img src="./img/ecuador_anaconda.jpg" width="480" height="287" alt="Anaconda">
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
            <img src="./img/ecuador_tarantula.jpg" width="480" height="360" alt="Tarantula">
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
            <img src="./img/ecuador_owlMonkeys.jpg" width="480" height="315" alt="Owl monkeys">
        </article>
    </body>
    </html>

    배경 위치 지정 : background-position 속성 사용

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Positioning backgrounds</title>
        <style>
            body {
                font: 14px courier;
                background-color: #fff;
                color: #000;
                margin: 0;
                padding: 10px;
            }
            p {
                background-color: #ccc;
                background-image: url("./img/bg.gif") no-repeat;
                height: 200px;
                text-align: center;
                margin: 20px;
            }
            code {
                background-color: white;
                padding: 0 15px 2px;
            }
            
            #p0 {
                background: none;
                height: auto;
            }
            #p1 {
                background-position: center;
            }
            #p2 {
                background-position: right;
            }
            #p3 {
                background-position: bottom left;
            }
            #p4 {
                background-position: 20px;
            }
            #p5 {
                background-position: 50%;
            }
            #p6 {
                background-position: 75% 25px;
            }
            #p7 {
                background-position: top 99px right 9px;
            }
        </style>
    </head>
    <body>
        <p id="p0">In addition to <code>background-repeat: no-repeat</code>…</p>
        <p id="p1"><code>background-position: center;</code></p>
        <p id="p2"><code>background-position: right;</code></p>
        <p id="p3"><code>background-position: bottom left;</code></p>
        <p id="p4"><code>background-position: 20px;</code></p>
        <p id="p5"><code>background-position: 50%;</code></p>
        <p id="p6"><code>background-position: 75% 25px;</code></p>
        <p id="p7"><code>background-position: top 99px right 9px;</code></p>
    </body>
    </html>

    반복되는 배경 이미지 : background-repeat 속성 사용

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>background-repeat</title>
        <style>
            body {
                font: 14px courier;
                background: #fff;
                color: #000;
                margin: 0;
                padding: 10px;
            }
        
            p {
                background-color: #ccc;
                background-image: url("./img/bg.gif");
                margin: 10px;
                width: 300px;
                height: 300px;
                float: left;
                text-align: center;
            }
            code {
                background: white;
                padding: 0 15px 2px;
            }
            #p1 {
                background-repeat: repeat;
            }
            #p2 {
                background-repeat: no-repeat;
            }
            #p3 {
                background-repeat: repeat-x;
            }
            #p4 {
                background-repeat: repeat-y;
            }
            #p5 {
                background-repeat: space;
            }
            #p6 {
                background-repeat: round;
            }
        </style>
    </head>
    <body>
        <p id="p1"><code>background-repeat: repeat;</code></p>
        <p id="p2"><code>background-repeat: no-repeat;</code></p>
        <p id="p3"><code>background-repeat: repeat-x;</code></p>
        <p id="p4"><code>background-repeat: repeat-y;</code></p>
        <p id="p5"><code>background-repeat: space;</code></p>
        <p id="p6"><code>background-repeat: round;</code></p>
    </body>
    </html>

    배경 첨부 : 스크롤하는 내용으로 백그라운드가 작동하는 방식

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>background-attachment</title>
        <style>
            body {
                font: 20px courier;
                background-image: url("./img/bg.gif");
                background-color: #c72;
                background-attachment: fixed;
                color: #fff;
                margin: 20px;
                text-align: center;
            }
            article {
                max-width: 500px;
                margin: 0 auto;
            }
            h1 {
                font-size: 30px;
                margin: 80px 0;
            }
            h2 {
                font-size: 20px;
            }
            code {
                background: rgba(0,0,0,.25);
                padding: 0 15px 2px;
            }
        
            p {
                background-image: url("./img/x.png");
                height: 300px;
                padding: 20px;
                margin-bottom: 80px;
                overflow: auto;
            }
            #p1 {
                background-attachment: scroll;
            }
            #p2 {
                background-attachment: fixed;
            }
            #p3 {
                background-attachment: local;
            }
        </style>
    </head>
    <body>
        <article>
            <h1><code>background-attachment</code></h1>
            <h2><code>background-attachment: scroll;</code></h2>
            <p id="p1">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sollicitudin, nulla id efficitur condimentum, nisi eros rutrum arcu, vitae egestas tortor arcu eget lacus. Maecenas velit neque, blandit fringilla fringilla vitae, posuere eu enim. In hac habitasse platea dictumst. Praesent pretium ante nec massa sollicitudin rhoncus. Sed laoreet metus quam, vel congue nisi dictum pellentesque. Curabitur egestas augue nulla, sit amet mattis turpis finibus vitae. Duis varius neque sed venenatis aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sollicitudin, nulla id efficitur condimentum, nisi eros rutrum arcu, vitae egestas tortor arcu eget lacus. Maecenas velit neque, blandit fringilla fringilla vitae, posuere eu enim. In hac habitasse platea dictumst. Praesent pretium ante nec massa sollicitudin rhoncus. Sed laoreet metus quam, vel congue nisi dictum pellentesque. Curabitur egestas augue nulla, sit amet mattis turpis finibus vitae. Duis varius neque sed venenatis aliquet.</p>
            <h2><code>background-attachment: fixed;</code></h2>
            <p id="p2">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sollicitudin, nulla id efficitur condimentum, nisi eros rutrum arcu, vitae egestas tortor arcu eget lacus. Maecenas velit neque, blandit fringilla fringilla vitae, posuere eu enim. In hac habitasse platea dictumst. Praesent pretium ante nec massa sollicitudin rhoncus. Sed laoreet metus quam, vel congue nisi dictum pellentesque. Curabitur egestas augue nulla, sit amet mattis turpis finibus vitae. Duis varius neque sed venenatis aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sollicitudin, nulla id efficitur condimentum, nisi eros rutrum arcu, vitae egestas tortor arcu eget lacus. Maecenas velit neque, blandit fringilla fringilla vitae, posuere eu enim. In hac habitasse platea dictumst. Praesent pretium ante nec massa sollicitudin rhoncus. Sed laoreet metus quam, vel congue nisi dictum pellentesque. Curabitur egestas augue nulla, sit amet mattis turpis finibus vitae. Duis varius neque sed venenatis aliquet.</p>
            <h2><code>background-attachment: local;</code></h2>
            <p id="p3">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sollicitudin, nulla id efficitur condimentum, nisi eros rutrum arcu, vitae egestas tortor arcu eget lacus. Maecenas velit neque, blandit fringilla fringilla vitae, posuere eu enim. In hac habitasse platea dictumst. Praesent pretium ante nec massa sollicitudin rhoncus. Sed laoreet metus quam, vel congue nisi dictum pellentesque. Curabitur egestas augue nulla, sit amet mattis turpis finibus vitae. Duis varius neque sed venenatis aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sollicitudin, nulla id efficitur condimentum, nisi eros rutrum arcu, vitae egestas tortor arcu eget lacus. Maecenas velit neque, blandit fringilla fringilla vitae, posuere eu enim. In hac habitasse platea dictumst. Praesent pretium ante nec massa sollicitudin rhoncus. Sed laoreet metus quam, vel congue nisi dictum pellentesque. Curabitur egestas augue nulla, sit amet mattis turpis finibus vitae. Duis varius neque sed venenatis aliquet.</p>
        </article>
    </body>
    </html>

    배경 이미지 크기 : background-size

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>background-size</title>
        <style>
            body {
                font: 14px courier;
                background-color: #c72;
                background-image: url("./img/bg.gif");
                color: #000;
                margin: 0;
                padding: 10px;
            }
        
            p {
                background-color: #7a796b;
                background-image: url("./img/tikal.jpg");
                margin: 10px;
                width: 300px;
                height: 300px;
                float: left;
                text-align: center;
            }
            code {
                background: white;
                padding: 0 15px 2px;
            }
            #p1 {
                background-size: auto;
            }
            #p2 {
                background-size: 50%;
            }
            #p3 {
                background-size: 100px;
            }
            #p4 {
                background-size: 100px 100px;
            }
            #p5 {
                background-size: contain;
            }
            #p6 {
                background-size: cover;
            }
        </style>
    </head>
    <body>
        <p id="p1"><code>background-size: auto;</code></p>
        <p id="p2"><code>background-size: 50%;</code></p>
        <p id="p3"><code>background-size: 100px;</code></p>
        <p id="p4"><code>background-size: 100px 100px;</code></p>
        <p id="p5"><code>background-size: contain;</code></p>
        <p id="p6"><code>background-size: cover;</code></p>
    </body>
    </html>

    여러 배경 : 단일 상자 안에 배경을 겹쳐서 표시합니다.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Multiple backgrounds</title>
        <style>
            body {
                font: 14px/1.5 courier, monospace;
                background: white;
                color: black;
                margin: 20px;
            }
        
            pre, #htmldog {
                background-color: #c72;
                height: 200px;
                margin: 20px 0;
                overflow: auto;
            }
            pre code {
                background: white;
                padding: 2px 10px 4px 0;
            }
            #p0 {
                background-image: url("./img/bg.gif");
            }
            #p1 {
                background-image: url("./img/circle.png"), url("./img/bg.gif");
            }
            #p2 {
                background-image: url("./img/circle.png"), url("./img/bg.gif");
                background-repeat: no-repeat, repeat;
            }
            #p3 {
                background-image: url("./img/circle.png"), url("./img/bg.gif");
                background-repeat: no-repeat, repeat;
                background-position: center;
            }
            #p4 {
                background: url("./img/circle.png") center no-repeat, url("./img/bg.gif");
            }
        </style>
    </head>
    <body>
        <h1>Multiple backgrounds</h1>
        <p>Using the <code>background-image</code> and <code>background</code> CSS properties.</p>
        <pre id="p0"><code>background-image: url("bg.gif");</code></pre>
        <pre id="p1"><code>background-image: url("circle.png"), url("bg.gif");</code></pre>
        <pre id="p2"><code>background-image: url("circle.png"), url("bg.gif");</code>
    <code>background-repeat: no-repeat, repeat;</code></pre>
        <pre id="p3"><code>background-image: url("circle.png"), url("bg.gif");</code>
    <code>background-repeat: no-repeat, repeat;</code>
    <code>background-position: center;</code></pre>
        <pre id="p4"><code>background: url("circle.png") center no-repeat, url("bg.gif");</code></pre>
    </body>
    </html>

    선형 그래디언트 : CSS로 그라디언트 배경 만들기

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Linear gradients</title>
        <style>
            html {
                background: -webkit-linear-gradient(left, yellow, red);
                background: linear-gradient(to left, yellow, red);
                height: 100%;
            }
            body {
                font: 14px/1.5 courier;
                color: #000;
            }
        
            p {
                width: 200px;
                height: 200px;
                padding: 20px;
                margin: 20px 0 0 20px;
                float: left;
                border: 1px solid yellow;
            }
        
            #gradient1 {
                background-color: #888888; /* 그래디언트를 생성 할 수없는 브라우저에 배경 이미지를 사용할 수 있습니다. */
                background-image: url("./img/gradientLinear.jpg") repeat-x;
                background: -webkit-linear-gradient(yellow, red); /* 그래디언트를 처리 할 수있는 주요 브라우저를 위한 백업 */
                background: linear-gradient(yellow, red); /* The CSS3 standard */
            }
            
            #gradient2 {
                background: -webkit-linear-gradient(right, yellow, red);
                background: linear-gradient(to right, yellow, red);
            }
            
            #gradient3 {
                background: -webkit-linear-gradient(bottom right, yellow, red);
                background: linear-gradient(to bottom right, yellow, red);
            }
            
            #gradient4 {
                background: -webkit-linear-gradient(20deg, yellow, red);
                background: linear-gradient(20deg, yellow, red);
            }
            
            #gradient5 {
                background: -webkit-linear-gradient(hsl(0,100%,50%), hsl(60,100%,50%), hsl(120,100%,50%), hsl(180,100%,50%), hsl(240,100%,50%), hsl(300,100%,50%));
                background: linear-gradient(hsl(0,100%,50%), hsl(60,100%,50%), hsl(120,100%,50%), hsl(180,100%,50%), hsl(240,100%,50%), hsl(300,100%,50%));
            }
            
            #gradient6 {
                background: -webkit-linear-gradient(135deg, hsl(36,100%,50%) 10%, hsl(72,100%,50%) 60%, white 90%);
                background: linear-gradient(135deg, hsl(36,100%,50%) 10%, hsl(72,100%,50%) 60%, white 90%);
            }
        </style>
    </head>
    <body>
        <p id="gradient1"><code>background: linear-gradient(yellow, red);</code></p>
        <p id="gradient2"><code>background: linear-gradient(to right, yellow, red);</code></p>
        <p id="gradient3"><code>background: linear-gradient(to bottom right, yellow, red);</code></p>
        <p id="gradient4"><code>background: linear-gradient(20deg, yellow, red);</code></p>
        <p id="gradient5"><code>background: linear-gradient(hsl(0,100%,50%), hsl(60,100%,50%), hsl(120,100%,50%), hsl(180,100%,50%), hsl(240,100%,50%), hsl(300,100%,50%));</code></p>
        <p id="gradient6"><code>background: linear-gradient(135deg, hsl(36,100%,50%) 10%, hsl(72,100%,50%) 60%, white 90%);</code></p>
    </body>
    </html>

    방사형 그라디언트 : 원형 및 타원형 그라데이션 배경

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Radial gradients</title>
        <style>
            html {
                background: -webkit-radial-gradient(green, yellow);
                background: radial-gradient(green, yellow);
                height: 100%;
            }
            body {
                font: 14px/1.5 courier;
                color: #000;
            }
        
            p {
                width: 300px;
                height: 150px;
                padding: 20px;
                margin: 20px 0 0 20px;
                float: left;
                border: 1px solid green;
            }
        
            #gradient1 {
                background-color: #888888;
                background-image: url("./img/gradientRadial.jpg"); /* 그래디언트를 생성 할 수없는 브라우저에 배경 이미지를 사용할 수 있습니다. */ 
                background: -webkit-radial-gradient(yellow, green); /* 그래디언트를 처리 할 수있는 주요 브라우저를위한 백업 */
                background: radial-gradient(yellow, green); /* CSS3 표준 */
            }
            
            #gradient2 {
                background: -webkit-radial-gradient(circle, yellow, green);
                background: radial-gradient(circle, yellow, green);
            }
            
            #gradient3 {
                background: -webkit-radial-gradient(circle closest-side, yellow, green);
                background: radial-gradient(circle closest-side, yellow, green);
            }
            
            #gradient4 {
                background: -webkit-radial-gradient(top left, yellow, green);
                background: radial-gradient(at top left, yellow, green);
            }
            
            #gradient5 {
                background: -webkit-repeating-radial-gradient(#8d0, #0d0 10px, #9f0 10px, #0f0 20px);
                background: repeating-radial-gradient(#8d0, #0d0 10px, #9f0 10px, #0f0 20px);
            }
        </style>
    </head>
    <body>
        <p id="gradient1"><code>background: radial-gradient(yellow, green);</code></p>
        <p id="gradient2"><code>background: radial-gradient(circle, yellow, green);</code></p>
        <p id="gradient3"><code>background: radial-gradient(circle closest-side, yellow, green);</code></p>
        <p id="gradient4"><code>background: radial-gradient(at top left, yellow, green);</code></p>
        <p id="gradient5"><code>background: repeating-radial-gradient(#8d0, #0d0 10px, #9f0 10px, #0f0 20px);</code></p>
    </body>
    </html>

    불투명도 : 상자의 투명도

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Opacity</title>
        <style>
            body {
                font: 14px courier;
                background-color: #c72;
                background-image: url("./img/bg.gif");
                color: #000;
                padding: 20px;
            }
        
            p {
                background-color: #577028;
                background-image: url("./img/opacityTort.jpg");            
                margin: 0;
                width: 240px;
                height: 240px;
                float: left;
                text-align: center;
            }
            code {
                background: white;
                padding: 0 15px 2px;
            }
            #opacity1 {
                opacity: 1;
            }
            #opacity2 {
                opacity: 0.8;
            }
            #opacity3 {
                opacity: 0.5;
            }
            #opacity4 {
                opacity: 0.2;
            }
            #opacity5 {
                opacity: 0;
            }
        </style>
    </head>
    <body>
        <p id="opacity1"><code>opacity: 1;</code></p>
        <p id="opacity2"><code>opacity: 0.8;</code></p>
        <p id="opacity3"><code>opacity: 0.5;</code></p>
        <p id="opacity4"><code>opacity: 0.2;</code></p>
        <p id="opacity5"><code>opacity: 0;</code></p>
    </body>
    </html>
  • HTML 색상 표현 방법

    HTML 색상 표현 방법

    HTML 문서에 색상 적용방법입니다.

    Colors : CSS 색상, color, background-color

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Colors</title>
        <style>
            body {
                font: 100 1.5em Helvetica, Arial, sans-serif;
                color: white;
                background-color: black;
            }
        
            #p1 {
                color: #f83333;
                background-color: #444; /* 16진수 색상 값 */
            }
            #p2 {
                color: rgb(0,255,127);
                background-color: rgba(50%,50%,0%,0.5); /* 함수형 구문과 알파 값 */
            }
            #p3 {
                color: hsl(240,100%,75%);
                background-color:  hsla(0,0%,100%,0.2); /* 오류! 정수와 백분율 혼용 금지 */
            }
        </style>
    </head>
    <body>
    
        <h1>Colors</h1>
        <p>This page's body is set to color: white; background-color: black;</p>
    
        <p id="p1">This paragraph is set to color: #f83333; background-color: #444;</p>
    
        <p id="p2">This paragraph is set to color: rgb(0,127,255); background-color: rgba(0%,50%,50%,0.5);</p>
    
        <p id="p3">This paragraph is set to color: hsl(240,100%,75%); background-color: hsla(0,0%,100%,0.2);</p>
    
    </body>
    </html>
  • HTML 글자 표현 방법

    HTML 문서에서 자주 사용하는 글자 표현 방법에 관한 예제를 살펴보겠습니다.

    Headings : h1 ~ h6을 기본 스타일로 사용하기

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>브라우저 기본 제목 스타일</title>
    </head>
    <body>
        <h1>Heading 1 (h1)</h1>
        <h2>Heading 2 (h2)</h2>
        <h3>Heading 3 (h3)</h3>
        <h4>Heading 4 (h4)</h4>
        <h5>Heading 5 (h5)</h5>
        <h6>Heading 6 (h6)</h6>
    </body>
    </html>

    크기는 중요하지 않습니다 : CSS로 선택하는 모든 크기의 헤딩 만들기

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>제목에 스타일 적용</title>
        <style>
            h1 {
              font-size: 0.67em;
              margin: 2.33em 0;
            }
            h2 {
              font-size: 0.83em;
              margin: 1.67em 0;
            }
            h3 {
              margin: 1.33em 0;
            }
            h4 {
              font-size: 1.17em;
              margin: 1em 0;
            }
            h5 {
              font-size: 1.5em;
              margin: .83em 0;
            }
            h6 {
              font-size: 2em;
              margin: .67em 0;
            }
        </style>
    </head>
    <body>
        <h1>Heading 1 (h1)</h1>
        <h2>Heading 2 (h2)</h2>
        <h3>Heading 3 (h3)</h3>
        <h4>Heading 4 (h4)</h4>
        <h5>Heading 5 (h5)</h5>
        <h6>Heading 6 (h6)</h6>
    </body>
    </html>

    Bold, italics, case 및 줄 간격(line-height) :  font-weight, font-style, font-variant, text-transform, line-height

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Bold, italics, case와 line-height</title>
        <style>
            body {
                font-size: 25px;
            }
            p {
                margin: 50px 0;
            }
            code {
                color: #c00;
            }
            #p1 {
                font-weight: bold;
            }
            #p2 {
                font-style: italic;
            }
            #p3 {
                font-variant: small-caps;
            }
            #p4 {
                text-transform: uppercase;
            }
            #p5 {
                line-height: 2;
            }
        </style>
    </head>
    <body>
        <p id="p1"><code>font-weight</code>: Bold or light text. Eg. <code>font-weight: bold;</code></p>
        <p id="p2"><code>font-style</code>: Italic or oblique text. Eg. <code>font-style: italic;</code></p>
        <p id="p3"><code>font-variant</code>: Small capitals. Replaces lowercase letters with uppercase letters that are a similar height to the original lowercase ones. Eg. <code>font-variant: small-caps;</code></p>
        <p id="p4"><code>text-transform</code>: Converts the case of letters, to uppercase, lowercase, or capitalized. Eg. <code>text-transform: uppercase;</code></p>
        <p id="p5"><code>line-height</code>: The minimal height for a line of text. Apparnet in longer lines, such as "The green seed of the white-flowering climbing leguminous papilionaceous plant, <em>Pisum sativum</em>, has become a dining-table favourite for good reason. The <strong>perfect</strong> accompaniment to any meal, the diminutive spherical vegetables brings joy to billions worldwide, be they fresh, frozen, canned or dried." Eg. <code>line-height: 2;</code></p>
    </body>
    </html>

    Font families : 글꼴 패밀리(font-family) 목록 및 일반 대체 글꼴 패밀리(generic fallback font families)

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Font families</title>
        <style>
            h2 { color: green; }
        
            #p1 { font-family: Times, "Times New Roman", serif; }
            #p2 { font-family: Helvetica, Arial, sans-serif; }
            #p3 { font-family: serif; }
            #p4 { font-family: sans-serif; }
            #p5 { font-family: monospace; }
            #p6 { font-family: cursive; }
            #p7 { font-family: fantasy; }
        
            .s1 { font-style: italic; }
            .s2 { font-style: oblique; }
            .s3 { font-weight: bold; }
            .s4 { font-weight: 100; }
        </style>
    </head>
    <body>
        <h1>Font Families</h1>
        <p>Used with CSS. Two common font combination lists and the five generic fallback font families.</p>
        <h2>font-family: Times, "Times New Roman", serif</h2>
        <p id="p1">
                Behold! A serif font family list!
                <span class="s1">It swooshes with an italic font-style!</span>
                <span class="s2">It leans with an oblique font-style!</span>
                <span class="s3">It puffs out with a bold font-weight!</span>
                <span class="s4">It sucks in with a 100 font-weight!</span>
        </p>
        <h2>font-family: Helvetica, Arial, sans-serif</h2>
        <p id="p2">
                Behold! A sans-serif font family list!
                <span class="s1">It swooshes with an italic font-style!</span>
                <span class="s2">It leans with an oblique font-style!</span>
                <span class="s3">It puffs out with a bold font-weight!</span>
                <span class="s4">It sucks in with a 100 font-weight!</span>
        </p>
        <h2>font-family: serif</h2>
        <p id="p3">
                Behold! The serif generic font family!
                <span class="s1">It swooshes with an italic font-style!</span>
                <span class="s2">It leans with an oblique font-style!</span>
                <span class="s3">It puffs out with a bold font-weight!</span>
                <span class="s4">It sucks in with a 100 font-weight!</span>
        </p>
        <h2>font-family: sans-serif</h2>
        <p id="p4">
                Behold! The sans-serif generic font family!
                <span class="s1">It swooshes with an italic font-style!</span>
                <span class="s2">It leans with an oblique font-style!</span>
                <span class="s3">It puffs out with a bold font-weight!</span>
                <span class="s4">It sucks in with a 100 font-weight!</span>
        </p>
        <h2>font-family: monospace</h2>
        <p id="p5">
                Behold! The monospace generic font family!
                <span class="s1">It swooshes with an italic font-style!</span>
                <span class="s2">It leans with an oblique font-style!</span>
                <span class="s3">It puffs out with a bold font-weight!</span>
                <span class="s4">It sucks in with a 100 font-weight!</span>
        </p>
        <h2>font-family: cursive</h2>
        <p id="p6">
                Behold! The cursive font family!
                <span class="s1">It swooshes with an italic font-style!</span>
                <span class="s2">It leans with an oblique font-style!</span>
                <span class="s3">It puffs out with a bold font-weight!</span>
                <span class="s4">It sucks in with a 100 font-weight!</span>
        </p>
        <h2>font-family: fantasy</h2>
        <p id="p7">
                Behold! The fantasy generic font family!
                <span class="s1">It swooshes with an italic font-style!</span>
                <span class="s2">It leans with an oblique font-style!</span>
                <span class="s3">It puffs out with a bold font-weight!</span>
                <span class="s4">It sucks in with a 100 font-weight!</span>
        </p>
    </body>
    </html>

    글자 크기 : 절대 및 상대 단위

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Font sizes</title>
        <style>
        * {
            margin: 0;
        }
        body {
            font-size: 20px;
            line-height: 1.5;
            margin: 20px;
        }
        code {
            color: #c00;
        }
        h2 {
            margin-top: 20px;
        }
        #len1 {
            font-size: 12px;
        }
        #len2 {
            font-size: 12pt;
        }
        #len3 {
            font-size: 12q;
        }
        #len4 {
            font-size: 1.2ex;
        }
        #len5 {
            font-size: 1.2em;
        }
        #len6 {
            font-size: 1.2vmax; /* not supported by Internet Explorer */
        }
        #pc1 {
            font-size: 50%;
        }
        #pc2 {
            font-size: 100%;
        }
        #pc3 {
            font-size: 150%;
        }
        #kw1 {
            font-size: x-small;
        }
        #kw2 {
            font-size: medium;
        }
        #kw3 {
            font-size: x-large;
        }
        </style>
    </head>
    <body>
        <h1>Font Sizes</h1>
        <p>Font sizes can be set using the <code>font-size</code> property, the value of which can be a length, percentage, or keyword.</p>
        <h2>Lengths</h2>
        <h3>Absolute lengths</h3>
        <ul>
            <li><code id="len1">font-size: 12px</code></li>
            <li><code id="len2">font-size: 12pt</code></li>
            <li><code id="len3">font-size: 12q</code></li>
        </ul>
        <h3>Relative lengths</h3>
        <ul>
            <li><code id="len4">font-size: 1.2ex</code></li>
            <li><code id="len5">font-size: 1.2em</code></li>
            <li><code id="len6">font-size: 1.2vmax</code></li>
        </ul>
        <h2>Percentage</h2>
        <ul>
            <li><code id="pc1">font-size: 50%</code></li>
            <li><code id="pc2">font-size: 100%</code></li>
            <li><code id="pc3">font-size: 150%</code></li>
        </ul>
        <h2>Keywords</h2>
        <ul>
            <li><code id="kw1">font-size: x-small</code></li>
            <li><code id="kw2">font-size: medium</code></li>
            <li><code id="kw3">font-size: x-large</code></li>
        </ul>
    </body>
    </html>

    글자 간격 : text-align, text-indent, word-spacing, letter-spacing

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Text-align, text-indent, word and letter spacing</title>
        <style>
            body {
                font: 150% arial, helvetica, sans-serif;
            }
            #p5 {
                text-indent: 2em;
                word-spacing: 1em;
            }
            #p6 {
                text-align: justify;
                letter-spacing: 0.1em;
            }
        </style>
    </head>
    <body>
        <p id="p5">Even leaving aside the astounding nutritional package, the taste explosion and texture of a well cooked pea is undeniably enough to award this deceptively simple seed the gold-medal of the foodstuff Olympics.</p>
        <p id="p6">There is debate surrounding the tampering of the form of the original spherical vegetable. The question as to whether the 'mushy' pea is sacrilege or an innovative approach to re-package the perfect product is a sensitive issue. A similar argument arises when approaching the relatively new craze of mangetout. In-depth study is required, but for now it is too early to assess the true importance of this baby pea pod.</p>
    </body>
    </html>

    수직 정렬 :  vertical-align

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>vertical-align</title>
        <style>
            p {
                font: 1em arial, helvetica, sans-serif;
                width: 780px;
            }
            #va {
                font-size: 40px;
            }
            #zero {
                font-size: 0.5em;
                vertical-align: text-top;
            }
            #one {
                font-size: 0.5em;
                vertical-align: top;
            }
            #two {
                vertical-align: -0.5em;
            }
            #three {
                font-size: 0.5em;
                vertical-align: middle;
            }
            #four {
                font-size: 0.5em;
                vertical-align: sub;
            }
            #five {
                font-size: 1.5em;
                vertical-align: 0.5em;
            }
            #six {
                font-size: 0.5em;
                vertical-align: super;
            }
            #seven {
                color: #0a0;
                vertical-align: super;
            }
        </style>
    </head>
    <body>
        <p id="va"><span id="zero">A</span> daft <span id="one">example</span> to <span id="two">show</span> what <span id="three">can</span> be <span id="four">achieved</span> with the <code id="five">vertical-align</code> CSS <span id="six">property</span>.</p>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in <span id="seven">Boo!</span> voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
    </body>
    </html>

    아래 첨자와 위첨자 : 위치 지정을 vertical-align속성 의 대안으로 사용

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Superscript and subscript</title>
        <style>
            body { font: 100% "Times New Roman", Times, serif }
            p { line-height: 1.5 }
            .charge {
                position: relative;
                bottom: 0.5em;
                color: red;
                font-size: 0.8em;
            }
            .atoms {
                position: relative;
                top: 0.3em;
                color: blue;
                font-size: 0.8em;
            }
        </style>
    </head>
    <body>
        <p>My name is Doctor Womac and I am going to teach you all about chemical formulae. A chemical formula is a way to describe the chemical elements that make up a particular chemical compound. It consists of chemical symbols to covey the elements and numbers to show the number of atoms of each element. H<span class="atoms">2</span>SO<span class="atoms">4</span> is the chemical formula for sulphur for example. The charge of an ion can be displayed in superscript, such as Au<span class="charge">2+</span>. This concludes my lesson. I must rush off home now because I have a problem with some radioactive phosphate.</p>
    </body>
    </html>

    그림자 글자

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Text shadows</title>
        <style>
            body {
                font: 20px/2 "times new roman", times, serif;
                color: #000;
            }
            h1 {
                text-shadow: -2px 2px 2px #999;
            }
            em {
                font-weight: bold;
                padding: 8px;
            }
            #elephant {
                color: #eee;
                background: #999;
                text-shadow: 2px 1px 0 #000;
            }
            #plesiosaur {
                background: #bde;
                color: #06c;
                text-shadow: 0 -3px 1px #fff;
            }
            #tourist {
                color: #efa;
                background: #be0;
                text-shadow: 0 0 4px #360;
            }
        </style>
    </head>
    <body>
        <h1>A little tale accompanied by a little text shadow</h1>
        <p>In Botswana's Chobe National Park, <em id="elephant">an elephant with an especially large trunk</em> is minding its own business when <em id="plesiosaur">a plesiosaur with five heads, two tails, and the legs of a lion</em> falls out of the sky and lands on the elephant's back.</p>
        <p>"Hah hah! That's hilarious!", says the plesiosaur, "Your trunk is huge!"</p>
        <p><em id="tourist">A stunned tourist in a nearby Jeep</em> drops his camera, stares in amazement, and excitedly taps his wife on the shoulder.</p>
        <p>"Look, honey! That's amazing! The talking prehistoric marine reptile with five heads, two tails, and the legs of a lion that fell out of the sky is right! That elephant's trunk is ginormous!"</p>
    </body>
    </html>

    간단한 드롭 캡(drop caps) : 일반적인 효과를 얻을 수있는 간단한 방법입니다.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Drop caps 1</title>
        <style>
            body {
                font: 15px/1.5 arial, helvetica, sans-serif;
            }
            p:first-letter {
                float: left;
                font-size: 45px;
                line-height: 1;
                font-weight: bold;
                margin-right: 9px;
            }
        </style>
    </head>
    <body>
        <p>Once upon a time in a blueberry bubblegum land covered in pink violets that swayed to the rhythm of "My Baby Just Cares for Me" there lived a podgy yet attractive raspberry fairy called Bedooda. Bedooda was as tall as a button bush and as intelligent as a peach mystic from the Unscented Hills (not the Scented Hills - the mystics there were not too bright) and was an adored member of the raspberry family but she was an unhappy raspberry fairy. As unhappy as a lost sunfish from the Sweet Spaghetti River.</p>
    </body>
    </html>

    장식 드롭 캡(drop caps)

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Fancy drop caps</title>
        <style>
            body {
                font: 15px/1.5 arial, helvetica, sans-serif;
            }
            p:first-letter {
                float: left;
                font-size: 45px;
                line-height: 1;
                font-weight: bold;
                margin-right: 9px;
                color: #9c0;
                font-family: "Times New Roman", Times, serif;
                text-shadow: #690 .05em .05em;
            }
        </style>
    </head>
    <body>
        <p>Once upon a time in a blueberry bubblegum land covered in pink violets that swayed to the rhythm of "My Baby Just Cares for Me" there lived a podgy yet attractive raspberry fairy called Bedooda. Bedooda was as tall as a button bush and as intelligent as a peach mystic from the Unscented Hills (not the Scented Hills - the mystics there were not too bright) and was an adored member of the raspberry family but she was an unhappy raspberry fairy. As unhappy as a lost sunfish from the Sweet Spaghetti River.</p>
    </body>
    </html>

    그래픽 드롭 캡(drop caps) : 이미지 사용

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Drop caps 2</title>
        <style>
            body {
                font: 15px/2 arial, helvetica, sans-serif;
            }
            p:first-letter {
                float: left;
                font-size: .1px;
                background: url("./img/o.gif") no-repeat;
                padding: 50px 0 0 40px;
                margin-right: 9px;
            }
        </style>
    </head>
    <body>
        <p>Once upon a time in a blueberry bubblegum land covered in pink violets that swayed to the rhythm of "My Baby Just Cares for Me" there lived a podgy yet attractive raspberry fairy called Bedooda. Bedooda was as tall as a button bush and as intelligent as a peach mystic from the Unscented Hills (not the Scented Hills - the mystics there were not too bright) and was an adored member of the raspberry family but she was an unhappy raspberry fairy. As unhappy as a lost sunfish from the Sweet Spaghetti River.</p>
    </body>
    </html>

    첫 단락 드롭 캡 대문자 : 첫 번째 단락의 첫 번째 글자를 대상으로 지정합니다.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Drop caps 3</title>
        <style>
            body {
                font: 15px/2 arial, helvetica, sans-serif;
            }
            p:first-of-type:first-letter {
                float: left;
                font-size: 45px;
                line-height: 1;
                font-weight: bold;
                margin-right: 9px;
            }
        </style>
    </head>
    <body>
        <p>Once upon a time in a blueberry bubblegum land covered in pink violets that swayed to the rhythm of "My Baby Just Cares for Me" there lived a podgy yet attractive raspberry fairy called Bedooda.</p>
        <p>Bedooda was as tall as a button bush and as intelligent as a peach mystic from the Unscented Hills (not the Scented Hills - the mystics there were not too bright) and was an adored member of the raspberry family but she was an unhappy raspberry fairy. As unhappy as a lost sunfish from the Sweet Spaghetti River.</p>
        <p>The End.</p>
    </body>
    </html>

    따옴표 붙이기 1 : 단순한 따옴표 구조

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Pull quotes 1</title>
        <style>
            body {
                font: 13px/1.5 arial, helvetica, sans-serif;
            }
            article {
                width: 500px;
            }
            .pquote {
                float: left;
                width: 100px;
                background: #ddf;
                font-weight: bold;
                padding: 13px;
                margin: 0 13px 13px 0;
            }
            blockquote {
                margin: 0;
            }
        </style>
    </head>
    <body>
        <article>
            <p>If ever there was evidence of God, the humble pea is it.</p>
            <p>Mother Nature has never created something of such perfection, something that takes Darwin's theory of evolution to the extent that a natural element can, over millions of years, evolve into something so flawless.</p>
            <aside class="pquote">
                <blockquote>
                    <p>It is not an exaggeration to say that peas can be described as nothing less than perfect spheres of joy.</p>
                </blockquote>
            </aside>
            <p>The green seed of the white-flowering climbing leguminous papilionaceous plant, pisum sativum, has become a dining-table favourite for good reason.</p>
            <p>The perfect accompaniment to any meal, the diminutive spherical vegetable brings joy to billions worldwide, be they fresh, frozen, canned or dried.</p>
            <p>Even leaving aside the astounding nutritional package, the taste explosion and texture of a well cooked pea is undeniably enough to award this deceptively simple seed the gold-medal of the foodstuff Olympics.</p>
            <p>There is debate surrounding the tampering of the form of the original spherical vegetable. The question as to whether the 'mushy' pea is sacrilege or an innovative approach to re-package the perfect product is a sensitive issue. A similar argument arises when approaching the relatively new craze of mangetout. In-depth study is required, but for now it is too early to assess the true importance of this baby pea pod.</p>
            <p>In its original form, the pea is a giant amongst food products and a deity of the vegetable world. It is not an exaggeration to say that peas can be described as nothing less than perfect spheres of joy.</p>
        </article>
    </body>
    </html>

    따옴표 붙이기 2 : 약간의 스타일 추가

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Pull quotes 2</title>
        <style>
            body {
                font: 13px/1.5 arial, helvetica, sans-serif;
            }   
            article {
                width: 500px;
            }   
            .pquote {
                float: right;
                width: 200px;
                background-image: url("./img/openquote.gif") top left no-repeat;
                color: #030;
                font-size: 26px;
                line-height: 0.9;
                font-style: italic;
                padding: 13px;
            }
            blockquote {
                margin: 0;
            }
            .pquote p:first-letter {
                font-size: 39px;
                font-weight: bold;
            }
        </style>
    </head>
    <body>
        <article>
            <p>If ever there was evidence of God, the humble pea is it.</p>
            <p>Mother Nature has never created something of such perfection, something that takes Darwin's theory of evolution to the extent that a natural element can, over millions of years, evolve into something so flawless.</p>
            <aside class="pquote">
                <blockquote>
                    <p>It is not an exaggeration to say that peas can be described as nothing less than perfect spheres of joy.</p>
                </blockquote>
            </aside>
            <p>The green seed of the white-flowering climbing leguminous papilionaceous plant, pisum sativum, has become a dining-table favourite for good reason.</p>
            <p>The perfect accompaniment to any meal, the diminutive spherical vegetable brings joy to billions worldwide, be they fresh, frozen, canned or dried.</p>
            <p>Even leaving aside the astounding nutritional package, the taste explosion and texture of a well cooked pea is undeniably enough to award this deceptively simple seed the gold-medal of the foodstuff Olympics.</p>
            <p>There is debate surrounding the tampering of the form of the original spherical vegetable. The question as to whether the 'mushy' pea is sacrilege or an innovative approach to re-package the perfect product is a sensitive issue. A similar argument arises when approaching the relatively new craze of mangetout. In-depth study is required, but for now it is too early to assess the true importance of this baby pea pod.</p>
            <p>In its original form, the pea is a giant amongst food products and a deity of the vegetable world. It is not an exaggeration to say that peas can be described as nothing less than perfect spheres of joy.</p>
        </article>
    </body>
    </html>

    인용 부호 3 : 보다 정교한 스타일

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Pull quotes 3</title>
        <style>
            body {
                font: 13px/1.5 arial, helvetica, sans-serif;
            }
            article {
                width: 500px;
            }
            .quotebox {
                float: left;
                width: 200px;
                background-color: #900;
                background-image: url(./img/face-01.jpg) top no-repeat;
                color: #fc0;
                font-size: 12px;
                line-height: 1.2;
                padding-top: 71px;
                border: 2px solid #600;
                margin: 0 12px 12px 0;
            }
            .quotebox p {
                margin: 0;
            }
            .quotebox blockquote {
                font-weight: bold;
                padding: 6px;
                border-top: 2px solid #600;
                margin: 0;
            }
            .quotebox .by {
                padding: 6px;
            }
        </style>
    </head>
    <body>
        <article>
            <p>If ever there was evidence of God, the humble pea is it.</p>
            <p>Mother Nature has never created something of such perfection, something that takes Darwin's theory of evolution to the extent that a natural element can, over millions of years, evolve into something so flawless.</p>
    
            <aside class="quotebox">
                <blockquote>
                    <p>It is my educated opinion that this is complete and utter tosh.</p>
                </blockquote>
                <p class="by">Patrick Griffiths (pea farmer)</p>
            </aside>
    
            <p>The green seed of the white-flowering climbing leguminous papilionaceous plant, pisum sativum, has become a dining-table favourite for good reason.</p>
            <p>The perfect accompaniment to any meal, the diminutive spherical vegetable brings joy to billions worldwide, be they fresh, frozen, canned or dried.</p>
            <p>Even leaving aside the astounding nutritional package, the taste explosion and texture of a well cooked pea is undeniably enough to award this deceptively simple seed the gold-medal of the foodstuff Olympics.</p>
            <p>There is debate surrounding the tampering of the form of the original spherical vegetable. The question as to whether the 'mushy' pea is sacrilege or an innovative approach to re-package the perfect product is a sensitive issue. A similar argument arises when approaching the relatively new craze of mangetout. In-depth study is required, but for now it is too early to assess the true importance of this baby pea pod.</p>
            <p>In its original form, the pea is a giant amongst food products and a deity of the vegetable world. It is not an exaggeration to say that peas can be described as nothing less than perfect spheres of joy.</p>
        </article>
    
    </body>
    </html>