2024

About what I learned at 2024

2024-08-06

(1) <!DOCTYPE html>은 어디까지 영향을 주는 것인가?

A DOCTYPE is a required preamble.

DOCTYPE은 필수 (맨앞)서문이다.
DOCTYPEs are required for legacy reasons. When omitted, browsers tend to use a different rendering mode that is incompatible with some specifications. Including the DOCTYPE in a document ensures that the browser makes a best-effort attempt at following the relevant specifications.

DOCTYPE은 기존 호환성 이유로 인해 필요하다. **이걸 생략하면 브라우저는 일부 사양과 호환되지 않은 다른 렌더링 모드를 사용할 수도 있다. DOCTYPE을 선언해야만 브라우저가 관련 사양을 따르기 위해 최적의 방식으로 동작한다.

by HTML공식 스펙문서

즉, 이를 선언하지 않거나 html문서 맨 앞에 쓰지 않으면 문서 전체 렌더링에 영향을 준다!!!

(2) 렌더링 모드란?

DOCTYPE은 브라우저가 문서를 렌더링 할 때 [quirks mode](https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode)로 바뀌지 않도록하는 것이 유일한 목적입니다.

by MDN문서

(3) 어떤 모드로 렌더링되었는지 어떻게 알 수 있을까?



2024-07-03



2024-03-15



2024-02-27