제목
페이지의 기본 글자색으로 표시하는 제목과 제목 위 안내 문구, 아래 소개 문단입니다.
이 페이지의 내용
제목은 페이지의 기본 글자색으로 표시합니다. 크기에 관계없이 중간 굵기 중에서도 가벼운 쪽을 사용하며, 굵기 대신 크기와 색으로 위계를 드러냅니다. 줄 길이를 고르게 맞춰 마지막 줄에 단어 하나만 남지 않게 하고, 제목이 커질수록 자간을 좁힙니다. 어떤 제목 요소에든 .heading을 적용할 수 있습니다. 클래스는 모양을, 요소는 제목 수준을 결정합니다.
제목
<header class="flex flex-col gap-sm max-w(520)"> <p class="eyebrow">Changelog</p> <h1 class="heading heading-2xl">Faster cold builds, and comments on previews</h1> <p class="lead"> Dependency caches are restored before the install step, and anyone can leave a note on a preview, pinned to the element they clicked. </p></header><header className="flex flex-col gap-sm max-w(520)"> <p className="eyebrow">Changelog</p> <h1 className="heading heading-2xl">Faster cold builds, and comments on previews</h1> <p className="lead"> Dependency caches are restored before the install step, and anyone can leave a note on a preview, pinned to the element they clicked. </p></header><header class="flex flex-col gap-sm max-w(520)"> <p class="eyebrow">Changelog</p> <h1 class="heading heading-2xl">Faster cold builds, and comments on previews</h1> <p class="lead"> Dependency caches are restored before the install step, and anyone can leave a note on a preview, pinned to the element they clicked. </p></header><template> <header class="flex flex-col gap-sm max-w(520)"> <p class="eyebrow">Changelog</p> <h1 class="heading heading-2xl">Faster cold builds, and comments on previews</h1> <p class="lead"> Dependency caches are restored before the install step, and anyone can leave a note on a preview, pinned to the element they clicked. </p> </header></template>제목에 곁들이는 요소가 두 가지 있습니다. eyebrow는 제목 위에서 이어질 내용의 유형을 짧게 알려 주는 문구입니다. lead는 제목 아래에 놓이며 글자 크기가 본문보다 한 단계 큰 문단입니다.
#크기
크기는 일곱 가지이며, 이름은 다른 크기 단계와 같은 규칙을 따릅니다. 크기는 페이지에서 제목이 놓이는 위치에 맞춰 고르고, 요소는 문서 구조의 제목 수준에 맞춰 고르세요. 같은 <h2> 요소에도 카드에서는 heading-sm을, 섹션 맨 위에서는 heading-2xl을 적용할 수 있습니다.
크기
<div class="flex flex-col gap-md w-full"> <p class="heading heading-display">Display</p> <p class="heading heading-2xl">Two extra large</p> <p class="heading heading-xl">Extra large</p> <p class="heading heading-lg">Large</p> <p class="heading">Medium, the default</p> <p class="heading heading-sm">Small</p> <p class="heading heading-xs">Extra small</p></div><div className="flex flex-col gap-md w-full"> <p className="heading heading-display">Display</p> <p className="heading heading-2xl">Two extra large</p> <p className="heading heading-xl">Extra large</p> <p className="heading heading-lg">Large</p> <p className="heading">Medium, the default</p> <p className="heading heading-sm">Small</p> <p className="heading heading-xs">Extra small</p></div><div class="flex flex-col gap-md w-full"> <p class="heading heading-display">Display</p> <p class="heading heading-2xl">Two extra large</p> <p class="heading heading-xl">Extra large</p> <p class="heading heading-lg">Large</p> <p class="heading">Medium, the default</p> <p class="heading heading-sm">Small</p> <p class="heading heading-xs">Extra small</p></div><template> <div class="flex flex-col gap-md w-full"> <p class="heading heading-display">Display</p> <p class="heading heading-2xl">Two extra large</p> <p class="heading heading-xl">Extra large</p> <p class="heading heading-lg">Large</p> <p class="heading">Medium, the default</p> <p class="heading heading-sm">Small</p> <p class="heading heading-xs">Extra small</p> </div></template>| 클래스 | 크기 | 용도 |
|---|---|---|
heading-display | 2.5~4.25rem | 랜딩 페이지의 유일한 대표 제목 |
heading-2xl | 2~2.5rem | 페이지 제목, 랜딩 페이지의 섹션 제목 |
heading-xl | 1.625~2rem | 애플리케이션 내 페이지 제목 |
heading-lg | 1.5rem | 섹션 제목 |
heading | 1.25rem | 하위 섹션 제목, 대화 상자 크기 패널의 제목 |
heading-sm | 1.0625rem | 카드 또는 바의 제목 |
heading-xs | 0.9375rem | 링크 그룹 또는 밀도 높은 패널의 제목 |
#너비에 따른 크기 조절
가장 큰 세 가지 크기는 컨테이너 단위로 지정합니다. 가장 가까운 크기 컨테이너를 기준으로 삼고, 크기 컨테이너가 없으면 뷰포트를 기준으로 삼습니다. 디스플레이 제목은 휴대전화의 좁은 열에서 2.5rem, 넓은 열에서 4.25rem이며, 그 사이에서는 중단점 없이 너비에 따라 연속적으로 변합니다.
너비에 따른 크기 조절
<section class="container-inline p-xl bg-surface-base"> <h1 class="heading heading-display">Every push gets an address.</h1> <p class="lead mt-md max-w(480)"> Choose Tablet, then Phone: the title is set smaller as its container narrows, and its lines are balanced again at each size. </p></section><section className="container-inline p-xl bg-surface-base"> <h1 className="heading heading-display">Every push gets an address.</h1> <p className="lead mt-md max-w(480)"> Choose Tablet, then Phone: the title is set smaller as its container narrows, and its lines are balanced again at each size. </p></section><section class="container-inline p-xl bg-surface-base"> <h1 class="heading heading-display">Every push gets an address.</h1> <p class="lead mt-md max-w(480)"> Choose Tablet, then Phone: the title is set smaller as its container narrows, and its lines are balanced again at each size. </p></section><template> <section class="container-inline p-xl bg-surface-base"> <h1 class="heading heading-display">Every push gets an address.</h1> <p class="lead mt-md max-w(480)"> Choose Tablet, then Phone: the title is set smaller as its container narrows, and its lines are balanced again at each size. </p> </section></template>제목 크기를 패널 너비에 맞추려면 패널에 container-inline을 적용해 크기 컨테이너로 만드세요.
#줄 길이 균형
제목은 text-wrap: balance로 줄을 바꿉니다. 브라우저가 각 줄을 끝까지 채우는 대신 줄 길이를 고르게 맞추므로 두 줄 제목의 각 줄 길이가 비슷해집니다. 제목 아래 소개 문단은 text-wrap: pretty로 줄을 바꿔 마지막 줄에 단어 하나만 남는 것을 방지합니다. 브라우저가 두 방식 모두 지원하지 않으면 일반적인 방식으로 줄을 바꿉니다.
제목을 넓은 열에 배치할 때는 max-w(560)처럼 줄 너비를 제한하는 값을 지정하세요. 줄 길이 균형은 각 줄의 길이를 고르게 맞추는 동작이며, 줄 수를 결정하지는 않습니다.
#제목 위 안내 문구와 소개 문단
제목 위 안내 문구와 소개 문단
<div class="flex flex-col gap-lg max-w(520)"> <div class="flex flex-col gap-xs"> <p class="eyebrow">Pricing</p> <h2 class="heading heading-xl">Free to start. Fair when you grow.</h2> </div> <p class="lead lead-sm">A small lead, for a card or a narrow column.</p> <p class="lead">The default lead, under a page's title.</p> <p class="lead lead-lg">A large lead, under a display heading.</p></div><div className="flex flex-col gap-lg max-w(520)"> <div className="flex flex-col gap-xs"> <p className="eyebrow">Pricing</p> <h2 className="heading heading-xl">Free to start. Fair when you grow.</h2> </div> <p className="lead lead-sm">A small lead, for a card or a narrow column.</p> <p className="lead">The default lead, under a page's title.</p> <p className="lead lead-lg">A large lead, under a display heading.</p></div><div class="flex flex-col gap-lg max-w(520)"> <div class="flex flex-col gap-xs"> <p class="eyebrow">Pricing</p> <h2 class="heading heading-xl">Free to start. Fair when you grow.</h2> </div> <p class="lead lead-sm">A small lead, for a card or a narrow column.</p> <p class="lead">The default lead, under a page's title.</p> <p class="lead lead-lg">A large lead, under a display heading.</p></div><template> <div class="flex flex-col gap-lg max-w(520)"> <div class="flex flex-col gap-xs"> <p class="eyebrow">Pricing</p> <h2 class="heading heading-xl">Free to start. Fair when you grow.</h2> </div> <p class="lead lead-sm">A small lead, for a card or a narrow column.</p> <p class="lead">The default lead, under a page's title.</p> <p class="lead lead-lg">A large lead, under a display heading.</p> </div></template>#접근성
- 클래스만 적용해서는 요소가 제목이 되지 않습니다.
<h1>부터<h6>까지 수준을 건너뛰지 않고 순서대로 사용하고, 각 제목은 배치에 맞는 크기로 스타일을 지정하세요. - 페이지마다
<h1>요소를 하나만 사용하세요. - 제목 위 안내 문구에는
<p>요소를 사용하세요. 안내 문구는 제목보다 먼저 읽히는 것이 맞지만, 제목 요소로 지정하면 안 됩니다. 제목 목록은 실제 제목부터 시작해야 합니다. - 제목은 모든 표면에서 대비가 높은 글자색으로 표시합니다. 색을 반전한 표면에서는
fg-text-inverse클래스를 추가하세요.
#클래스
| 클래스 | 설명 |
|---|---|
heading | 1.25rem 제목. 진한 글자색과 다소 가벼운 중간 굵기를 적용하고 줄 길이의 균형을 맞춥니다. |
heading-xs | 링크 그룹이나 항목이 빽빽한 패널에 쓰는 0.9375rem적용할 클래스는 heading입니다 |
heading-sm | 카드나 바에 쓰는 1.0625rem적용할 클래스는 heading입니다 |
heading-lg | 섹션에 쓰는 1.5rem적용할 클래스는 heading입니다 |
heading-xl | 앱의 페이지 제목에 쓰며, 컨테이너 너비에 따라 1.625rem에서 2rem까지 달라집니다.적용할 클래스는 heading입니다 |
heading-2xl | 페이지 제목이나 랜딩 페이지의 섹션에 쓰며, 컨테이너 너비에 따라 2rem에서 2.5rem까지 달라집니다.적용할 클래스는 heading입니다 |
heading-display | 랜딩 페이지의 대표 제목 하나에 쓰며, 컨테이너 너비에 따라 2.5rem에서 4.25rem까지 달라집니다.적용할 클래스는 heading입니다 |
eyebrow | 제목 위에 대문자로 짧게 표시해 이어지는 내용의 종류를 알려 주는 문구입니다. 제목 요소 대신 p를 사용합니다 |
lead | 제목 아래 문단은 1.125rem 크기로 표시하며, 마지막 줄에 단어 하나만 남지 않도록 줄바꿈합니다 |
lead-sm | 카드나 좁은 열에 쓰는 1rem적용할 클래스는 lead입니다 |
lead-lg | 디스플레이 제목 아래에 쓰는 1.25rem적용할 클래스는 lead입니다 |
#사용자 지정 속성
| 속성 | 기본값 | 설명 |
|---|---|---|
--heading-size | 1.25rem | 글꼴 크기 |
--heading-leading | 1.3 | 줄 높이 |
--heading-tracking | -.012em | 자간 |
#관련 항목
- 인용문다른 사람의 말을 작성자 자신의 말과 구분해 표시합니다.
- 그림가장자리를 다듬은 이미지나 동영상을 캡션과 함께 표시합니다.
- 링크문장 속에서 주변 텍스트와 같은 색으로 표시되며 다른 위치로 이동하는 텍스트입니다.
- 히어로무엇을 소개하는지, 왜 중요한지, 방문자에게 한 가지 행동을 제안하는 첫 화면입니다.
- 기능 소개제품이 하는 일을 짧은 항목의 그리드로 보여 줍니다. 각 항목은 아이콘, 짧은 제목, 한 문장의 설명으로 이루어집니다.