Tagoplus

코드규칙

들여쓰기

1탭 들여쓰기 > 공백 4칸으로 설정한다.

빈줄

가독성을 고려하여 빈 줄을 추가 할 수 있다. 단 연속적으로 1줄을 초과하지 않는다.

주석

<!-- 영역명 -->
<div>
    <p>시작과 끝이 있고, 마크업의 영역을 표시한다.</p>
</div>
<!-- //영역명 -->

------------------------------------------------------
<!-- 설명내용 -->
<p>시작과 끝이 없고, 설명할 내용을 주석으로 표기한다. </p>
------------------------------------------------------
<div>
    인라인 주석인 경우 <!-- 기록주석 -->
</div>

속성 선언순서

구분 속성
기능href, src, type
이름name, id
정보replaceholder, title, alt, value
옵션target, tabindex
role_pagerole
ropertyaria-controls, aria-describedby, aria-labelledby, aria-popup, aria-modal
꾸미기class
상태 checked, disabled, selected, required, aria-selected, aria-current, aria-hidden
<a href="#none" title="새창열기" target="" class="">인쇄하기</a>
<iframe src="about:blank" title="빈프레임"></iframe>
<img src="img.gif" alt="대체텍스트">
<input type="text" name="" id="" value="" title="" class="" disabled="">

CSS

CSS 기본 규칙

@charset "utf-8";
/*-------------------------------------------------------------------
    파일정의: 
    속성순서: 레이아웃 > 크기/간격 > 박스모양 > 폰트/정렬 > 기타
-------------------------------------------------------------------*/
작업정보는 위 사항을 필수정보로 제공한다.

작은 따옴표 사용 범위

.class-name {font-family:'dotum';}
.filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img.png', sizingMethod='scale';}
.class-nam//after{content:'.'}
.class-name {background:url(img.gif) no-repeat}

공백의 사용

.class-name,
.class-name .child-class {background:url(../img/img.gif) no-repeat;}
.class-name {padding:0; margin:0;}
.class-name {padding:0; margin:0;}

들여쓰기 / 줄 바꿈

h4.class-name {font-siz//1.25em; letter-spacing:-1px; margin:0.5em 0 0 0;}
.class-name,
.class-name .child-class {background:url(../img/img.gif) no-repeat;}
                            

주석 / 빈줄

/* title */
.title-type1 {margin:30px 0 10px 0;}
    
/* description */
.desc1 {padding:2px 0 0 15px; font-siz//0.917em;}

선택자 (공통 선택자)

/* 잘못된 예 */
* {margin:0; padding:0}