Movatterモバイル変換


[0]ホーム

URL:


  1. 개발자를 위한 웹 기술
  2. HTML: Hypertext Markup Language
  3. HTML 참고서
  4. HTML 요소 참고서
  5. <span>

This page was translated from English by the community.Learn more and join the MDN Web Docs community.

View in EnglishAlways switch to English

<span>

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨2015년 7월⁩.

HTML<span> 요소는 구문 콘텐츠를 위한 통용 인라인 컨테이너로, 본질적으로는 아무것도 나타내지 않습니다. 스타일을 적용하기 위해서, 또는lang 등 어떤 특성의 값을 서로 공유하는 요소를 묶을 때 사용할 수 있습니다. 적절한 의미를 가진 다른 요소가 없을 때에만 사용해야 합니다.<span><div>와 매우 유사하지만,<div>블록 레벨 요소인 반면<span>인라인 요소입니다.

시도해 보기

<p>  Add the <span>basil</span>,  <span>pine nuts</span> and  <span>garlic</span> to a blender and blend into a paste.</p><p>  Gradually add the <span>olive oil</span> while running the  blender slowly.</p>
span.ingredient {  color: #f00;}
콘텐츠 카테고리플로우 콘텐츠,구문 콘텐츠.
가능한 콘텐츠구문 콘텐츠.
태그 생략불가능, 시작과 끝에 태그를 추가하는 것은 필수입니다.
가능한 부모 요소구문 콘텐츠 또는플로우 콘텐츠를 허용하는 모든 요소.
가능한 ARIA 역할모두
DOM 인터페이스HTMLSpanElement

특성

이 요소는전역 특성만 포함합니다.

예제

예제 1

HTML

<p><span>Some text</span></p>

결과

예제 2

HTML

<li><span>    <a href="portfolio.html">See my portfolio</a></span></li>

CSS

css
li span {  background: gold;}

Result

명세

Specification
HTML
# the-span-element

브라우저 호환성

같이 보기

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp