2011년 2월 27일 일요일

[CSS/웹표준] DOCTYPE 선언

태그명 : DOCument TYPE Declaration - 도큐먼트 타입 선언

브라우저가 좀 더 빠르고 정확하게 문서를 분석하여 표현, 제약이 걸린다.

<!DOCTYPE html PUBLIC "-//w3c//DTD XHTML 1.0 Strict//EN" 
- 가장 표준이 되는 DTD
- 문서는 XHTML1.0을 따르고 Strict 방식에 따라 영문으로 제작
Strict는 문서에 확장된 속성을 제공하지 않고 제약을 걸어둔다는 뜻인데, 이것은 모바일기기나 장애인을 위한 브라우저등 모든 브라우저에서 사용가능한 최소한의 태그만을 사용한다는 것이다. 그래서 최소한의 태그만을 유지하고 화면상의 표현을 하기 위해서는 CSS를 사용해야 한다. 배경색 , 글자색등의 일정한 조건에 따른 어트리뷰트(bgcolor 라던가 font태그의 color속성)을 인정하지 않는다.


<!DOCTYPE html PUBLIC "-//w3c//DTD XHTML 1.0 Strict//EN

최상위엘리먼트네임
html이나 xhtml의 가장 최상위는 무조건 <html>태그 이기 때문에 html로 작성합니다. 하지만 예외적으로 내부용일경우에는 다른 코드가 삽입될수도 있지만. 여기에서는 국제적인 코드를 생각해서 html이 삽입됩니다.

(PUBLIC | SYSTEM)
문서가 국제적으로 쓰이는 문서인지. 내부적으로 쓰이는 문서인지를 설정합니다. 내부적일 경우에는 DTD든 최상위엘리먼트든 작성자 마음대로 작성하거나 지정할수 있습니다.

ISO공인인증기관 | ISO비공인인증기관
본 문서가 어디에서 만든 DTD를 사용하는가에 대한 내용입니다. 공인인증기관일경우 " + " 모양을 비공인인증기관일경우엔 " - ' 를 사용합니다. W3C는 비공인인증기관이므로 " - " 값이 들어갑니다.

기관명
DTD를 작성한 기관명입니다.

DTD 작성 타입
DTD XHTML (version) Strict => 권장 표준 안
DTD XHTML (version) Transitional => Strict 보단 완화된 표준안
DTD XHTML (version) Frameset => 프레임을 나눌경우 프레임페이지에 사용


인코딩언어
xml:lang일때 같이 ISO에서 인증한 언어코드로 문서를 출력합니다.
(모든 html DTD는 영문이기 때문에 EN이 거의 기본화 되어있습니다. / 실제로 DTD는 한글로 작성할수도 있습니다. 물론 선언은 영문으로 해야 하지만요.


DTD URL
실제로 이 문서를 파싱할(유효한지 하지 않은지 판단) DTD를 지정합니다.

댓글 2개:

  1. Yeast infection cannot be eliminated if only treated with
    a one-dimensional treatment like antibiotics, creams,
    pills, or detox diets. Crowe, The Tony Rice Unit, Chesapeake and Aldridge, and Bennett & Gaudreau) on mandolin and mandola,
    Tony Williamson (mandolin), Chris Brashear (fiddle), and Tom Corbett (mandolin).
    At the end of the meeting it was announced that he was to enroll in a dental college.
    Vu promises that you'll look forward to doing them as the results are well worth it. Sara Gilbert shared about her new love on her own talkshow, “All these article are out that I'm in a new relationship.


    My blog imprescriptibility

    답글삭제
  2. These were referred to as Linotype and Intertype machines.

    Some Local News papers/journals/ tabloids/Magazines focus on regional
    happenings and target local audiences/ readers.
    Hamas itself would believe it can take over the entire movement, making it
    more violent against Israel and aggressive toward other Palestinians", says Barry Rubin in a commentary on UPI. However, the English newspapers are much central to urban areas. Once the symphony begins, Paul loses himself in the sound as he had in the stuff exhibited in the picture gallery.

    Look at my webpage ... click here

    답글삭제