• 회원가입
  • 로그인
  • 구글아이디로 로그인

[attribute] HTML - span 속성 ★ - 테이블 (열/열그룹) 병합 개수 지정 (= span속성 = 스팬속성) ※ (콜태그/콜그룹태그) 병합/합치기

목차
  1. span 예제 - <col> 경우
  2. span 정의
  3. span 구문
  4. span 예제 - <colgroup> 경우

 

span 예제 - <col> 경우

 

<style>

table, th, td {border: 1px solid gray; border-collapse:collapse;}

th,td {padding:5px 10px;}

col:nth-child(1) {background-color:pink}

col:nth-child(2) {background-color:yellow}

</style>


<table>

  <colgroup>

    <col span="2">

    <col>

  </colgroup>

  <tr>

    <th>기능</th>

    <th>언어</th>

    <th>게시판</th>

  </tr>

  <tr>

    <td>구조</td>

    <td>HTML</td>

    <td>https://homzzang.com/b/html</td>

  </tr>

  <tr>

    <td>디자인</td>

    <td>CSS</td>

    <td>https://homzzang.com/b/css</td>

  </tr>

</table>

 

결과보기

 

span 정의

 

테이블의 (열:<col> / 열그룹: <colgroup>) 요소의 병합 개수 지정.

 


 

1. span 속성 사용 가능 태그 종류

<col>, <colgroup>

 

2.

<colgroup> 내의 열에 다른 속성을 정의하려면, <colgroup> 태그 내에서 <col> 태그를 사용.

 

3.

모든 브라우저 지원.

 

 

span 구문

 

  • <col span="number">
  • <colgroup span="number">...</colgroup>

 


[속성값]

 

number

병합합 개수 지정.

 

 

span 예제 - <colgroup> 경우

 

<style>

table, th, td {border: 1px solid gray; border-collapse:collapse;}

th,td {padding:5px 10px;}

colgroup:nth-child(1) {background-color:pink}

colgroup:nth-child(2) {background-color:yellow}

</style>


<table>

  <colgroup span="2"></colgroup>

  <colgroup></colgroup>

  <tr>

    <th>기능</th>

    <th>언어</th>

    <th>게시판</th>

  </tr>

  <tr>

    <td>구조</td>

    <td>HTML</td>

    <td>https://homzzang.com/b/html</td>

  </tr>

  <tr>

    <td>디자인</td>

    <td>CSS</td>

    <td>https://homzzang.com/b/css</td>

  </tr>

</table>

 

결과보기



분류 제목
attribute HTML - optimum 속성 - 최적 게이지값 지정 (= optimum속성 = 옵티멈속성) ※ 미터태그 …
attribute HTML - pattern 속성 - 유효한 입력값인지 정규표현식 패턴 검사 (= pattern속성 = 패턴속…
attribute HTML - placeholder 속성 - 입력값 '샘플/힌트/예시' 제공 (= placeholder속성 =…
attribute HTML - poster 속성 - 비디오태그용 포스터 지정 (= poster속성 = 포스터속성)
attribute HTML - preload 속성 - 페이지 로드 시, (오디오/비디오) 미디어파일을 로드할지 여부와 방법을 …
attribute HTML - readonly 속성 - 읽기전용 설정 (= readonly속성 = 리드온리속성) ※ (읽기만 …
attribute HTML - rel 속성 ★ - 링크문서가 현재문서와 어떤 관계인지 지정 (= rel속성 = 릴속성/렐속성)
attribute HTML - required 속성 ★ - 폼데이터 제출 전 (입력필수/선택필수) 지정 (= required속…
attribute HTML - reversed 속성 - 순서있는 리스트 스타일 타입을 역순(=내림차순)으로 표시 (= reve…
attribute HTML - rows 속성 - <textarea> 가로행수(=가로줄수=가시높이) 지정 (= rows속성 = …
attribute HTML - rowspan 속성 ★ - 테이블셀 가로행 병항 (= 가로줄 병합 = rowspan속성 = 로우…
attribute HTML - sandbox 속성 ★ - iframe태그에 삽입된 웹페이지에 제한 걸거나 특정 기능 허용 지정…
attribute HTML - scope 속성 - <th> (테이블헤더셀)의 범위 지정 (= scope속성 = 스코우프속성/스…
attribute HTML - selected 속성 ★ - 실렉트태그 기본 선택 옵션 지정 (= selected속성 = 실렉티…
attribute HTML - shape 속성 - 이미지맵 링크영역 모양 지정 (= shape속성 = 쉐이프속성) ※ 에어리어…
attribute HTML - size 속성 ★ - (INPUT 입력창크기 / SELECT 기본노출옵션개수) 지정 (= siz…
attribute HTML - sizes 속성 - 해상도별 이미지나 아이콘, 미디어(오디오/비디오) 등의 크기 지정 (= si…
attribute HTML - span 속성 ★ - 테이블 (열/열그룹) 병합 개수 지정 (= span속성 = 스팬속성) ※ …
attribute HTML - spellcheck 속성 - 맞춤법 검사 (= 철자 검사 = spellcheck속성 = 스펠체크…
attribute HTML - src 속성 ★ - 외부 리소스 URL주소 지정 (= src속성 = 에스알시속성/에스알씨속성/소…
15/18
목록
찾아주셔서 감사합니다. Since 2012