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

[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>

 

결과보기



분류 제목
form HTML - <input type="text"> 태그 - 1줄 텍스트 입력 (= 인풋텍스트타입/텍스트타입인풋…
attribute HTML - charset 속성 - 문자셋 지정 (= charset속성 = 차셋속성) ※ 문자인코딩, 언어셋
form HTML - <input type="url"> 태그 - http(s) 프로토콜 형식의 URL 주소 입력 (=…
attribute HTML - onmousewheel 속성 - (폐기예고) 마우스휠 움직일 때 실행 (= onmousewhe…
attribute HTML - onafterprint 속성 - 인쇄 대화상자 닫힌 이후 이벤트 발생 시 실행할 코드 정의 (=…
attribute HTML - oninput 속성 ★ - 사용자 입력값 변경 시 바로 실행 (= oninput속성 = 온인풋속…
attribute HTML - shape 속성 - 이미지맵 링크영역 모양 지정 (= shape속성 = 쉐이프속성) ※ 에어리어…
form HTML - <input type="search"> 태그 - 검색어 입력 (= 인풋서치타입/서치타입인풋/서치…
attribute HTML - sizes 속성 - 해상도별 이미지나 아이콘, 미디어(오디오/비디오) 등의 크기 지정 (= si…
form HTML - <input type="submit"> 태그 - 서버로 데이터 제출/전송 (= 인풋타입서브미트/…
attribute HTML - onload 속성 ★ - 지정 객체가 로드된 경우 실행 (= onload속성 = 온로드속성) ※…
form HTML - <input type="file"> 태그 - 업로드 할 파일 선택 (= 파일첨부/첨부파일 입력필…
attribute HTML - span 속성 ★ - 테이블 (열/열그룹) 병합 개수 지정 (= span속성 = 스팬속성) ※ …
attribute HTML - cite 속성 - (인용출처/삭제이유/삽입이유) 주소 연결 (= cite속성 = 사이트속성)
attribute HTML - dir 속성 - 텍스트 출력방향 지정 (= dir속성 = 디르속성|디렉션속성)
form HTML - <input type="reset"> 태그 - 입력창 초기화/재설정 (= 입력한 폼데이터 비우기…
attribute HTML - async 속성 ★★★ - 비동기적으로 외부스크립트 실행 지정 (= async속성 = 에이싱크속…
attribute HTML - onended 속성 - 미디어 재생 끝날 때 실행 (= onended속성 = 온엔디드속성) ※ …
attribute HTML - novalidate 속성 - 폼데이터 제출 시, 유효성 평가 생략 (= novalidate속성 …
attribute HTML - translate 속성 - 요소 내용 번역 허용 여부 지정 (= translate속성 = 트랜슬…
7/18
목록
찾아주셔서 감사합니다. Since 2012