🌐 Web Development

HTML

HyperText Markup Language

HTML is a markup language that defines the structure and content of web pages. Semantic tags convey document meaning and form the basis of accessibility and SEO. Together with CSS and JavaScript, it is one of the three core technologies of the web.

πŸ“– Detailed Explanation

HTML (HyperText Markup Language) is a core web technology invented by Tim Berners-Lee in 1991. It defines the skeleton of a web page and structures content such as text, images, links, and forms. HTML5, in use today, was standardized by the W3C in 2014 and provides rich features such as multimedia, canvas, and local storage.

HTML is made up of tags. Tags take forms such as <p>, <h1>, and <div>, with content placed between the opening and closing tags. Attributes give tags additional information; id, class, src, and href are typical examples. The browser parses HTML to build a DOM (Document Object Model) tree.

Semantic HTML is a core principle of modern web development. Semantic tags such as <header>, <nav>, <main>, <article>, <aside>, and <footer> clearly convey the meaning of content. Screen readers can understand the document structure, which improves accessibility, and search engines can understand the content, which also benefits SEO.

Important features added in HTML5 include <video> and <audio> (plugin-free media), <canvas> (2D graphics), <svg> (vector graphics), new form types (email, date, range), and data-* custom attributes. Combined with the Web Components standard, you can also create reusable custom elements.

πŸ’» Code Example

<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="νŽ˜μ΄μ§€ μ„€λͺ… (SEO용)">
    <title>νŽ˜μ΄μ§€ 제λͺ© | μ‚¬μ΄νŠΈλͺ…</title>
    <link rel="stylesheet" href="/css/style.css">
</head>
<body>
    <!-- μ‹œλ§¨ν‹± ꡬ쑰 -->
    <header>
        <nav aria-label="메인 λ„€λΉ„κ²Œμ΄μ…˜">
            <ul>
                <li><a href="/">ν™ˆ</a></li>
                <li><a href="/about">μ†Œκ°œ</a></li>
                <li><a href="/contact">문의</a></li>
            </ul>
        </nav>
    </header>

    <main>
        <article>
            <h1>기사 제λͺ©</h1>
            <p>λ³Έλ¬Έ λ‚΄μš©...</p>

            <!-- 이미지 with μ ‘κ·Όμ„± -->
            <figure>
                <img src="/images/photo.jpg"
                     alt="사진에 λŒ€ν•œ μ„€λͺ… (슀크린 λ¦¬λ”μš©)"
                     loading="lazy"
                     width="800"
                     height="600">
                <figcaption>이미지 μΊ‘μ…˜</figcaption>
            </figure>

            <!-- HTML5 폼 -->
            <form action="/submit" method="POST">
                <label for="email">이메일</label>
                <input type="email" id="email" name="email"
                       required placeholder="you@example.com">

                <label for="date">λ‚ μ§œ</label>
                <input type="date" id="date" name="date">

                <button type="submit">제좜</button>
            </form>
        </article>

        <aside>
            <h2>κ΄€λ ¨ 링크</h2>
            <ul>
                <li><a href="#">κ΄€λ ¨ 기사 1</a></li>
            </ul>
        </aside>
    </main>

    <footer>
        <p>&copy; 2024 νšŒμ‚¬λͺ…. All rights reserved.</p>
    </footer>

    <script src="/js/app.js" defer></script>
</body>
</html>

πŸ—£οΈ Examples of Practical Conversations

πŸ‘¨β€πŸ’» Junior developer
"I built the whole layout with div tags. Do I really need semantic tags? It looks the same anyway."
πŸ‘©β€πŸ’» Senior developer
"It looks the same visually, but the meaning is different. Screen reader users understand the page structure through header, nav, and main. Search engines also give more weight to content inside article. It affects accessibility audits and SEO scores, too."
πŸ‘¨β€πŸ’Ό Technical interviewer
"What is the most important thing to consider for accessibility in HTML?"
πŸ‘¨β€πŸ’» Candidate
"First, provide meaningful alt text for images. Second, always associate a label with form elements. Third, use semantic tags and the heading hierarchy (h1-h6) correctly. Fourth, manage tabindex and focus so that every interaction is possible with the keyboard alone."

Take a mock interview on this topic β†’ WIA SOOM AI Interview Β· Start for free

⚠️ Cautions

πŸ”— Related Terms

πŸ“š Learn More