LogoSEO Jing
  • All Posts
  • SEO Jing
  • okayJing
  • KD Team
  • CLAB Coreteam
  • Study

Contact Me

© 2026 SEOJing. All rights reserved.

프론트엔드 스터디 대면 2주차: 폼(Form), CSS 선택자, 그리고 박스 모델

2026년 6월 28일·8분 읽기
Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted
Subtitle fallback
Subtitle component omitted
Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted
html
<form action="/signup" method="post">
  <input type="text" name="username" />
  <input type="password" name="password" />
  <button type="submit">회원가입</button>
</form>
Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted
html
<!-- name이 없어서 서버로 전송 안 됨 -->
<input type="text" />

<!-- name이 있어서 서버에 username=입력값 형태로 전송 -->
<input type="text" name="username" />
Paragraph fallback
Paragraph component omitted
Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted
html
<!-- label을 클릭하면 id="email" input에 포커스 -->
<label for="email">이메일 주소</label>
<input type="email" id="email" name="email" />

<!-- 체크박스: label 클릭으로 체크/해제 가능 -->
<input type="checkbox" id="agree" name="agree" />
<label for="agree">이용약관에 동의합니다</label>
Paragraph fallback
Paragraph component omitted
Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted
type브라우저가 해주는 것모바일 키보드
text없음일반 키보드
email@ 포함 여부 자동 검증@ . 버튼 포함
password입력값 마스킹(●)일반 키보드
number숫자만 입력 가능숫자 키패드
tel없음 (패턴은 직접 지정)전화번호 키패드
Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted
Paragraph fallback
Paragraph component omitted
html
<!-- 태그 사이의 개행/공백이 초기값으로 들어감 -->
<textarea name="content"> </textarea>

<!-- 이렇게 붙여써야 빈 상태로 시작함 -->
<textarea name="content"></textarea>
Paragraph fallback
Paragraph component omitted
Paragraph fallback
Paragraph component omitted
js
const value = document.querySelector("textarea").value;
// 사용자가 입력한 값: "\n안녕하세요\n"
console.log(value.trim()); // "안녕하세요"
Paragraph fallback
Paragraph component omitted
Subtitle fallback
Subtitle component omitted
Subtitle fallback
Subtitle component omitted
css
/* 태그 선택자: 해당 태그 전부 선택 */
p {
  color: black;
}

/* 클래스 선택자: 마침표(.)로 시작, 여러 요소에 재사용 가능 */
.highlight {
  background: yellow;
}

/* 아이디 선택자: 샵(#)으로 시작, 페이지에서 딱 하나 */
#main-title {
  font-size: 2rem;
}
Paragraph fallback
Paragraph component omitted
Subtitle fallback
Subtitle component omitted
html
<nav>
  <ul>
    <li><a href="/">홈</a></li>
    <li>
      <div>
        <a href="/about">소개</a>
      </div>
    </li>
  </ul>
</nav>
css
/* 자손 결합자: nav 안의 모든 a를 선택 (깊이 무관) */
nav a {
  color: white;
}

/* 자식 결합자: nav의 직계 자식 a만 선택 (여기서는 해당 없음) */
nav > a {
  color: white;
}
Paragraph fallback
Paragraph component omitted
Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted
종류점수예시
인라인 스타일1,000점style="color: red"
아이디(#)100점#header
클래스(.) / 속성 / 가상클래스10점.btn, [type="text"], :hover
태그 / 가상요소1점div, p, ::before
css
/* 점수: 태그(1) + 클래스(10) = 11점 */
p.intro {
  color: blue;
}

/* 점수: 아이디(100) = 100점 → 이쪽이 이김 */
#welcome {
  color: red;
}
Paragraph fallback
Paragraph component omitted
Paragraph fallback
Paragraph component omitted
Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted
Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted
text
GET 요청:  https://example.com/search?q=프론트엔드&page=1
                                       ↑ 데이터가 URL에 노출

POST 요청: https://example.com/login
           Body: { username: "seojin", password: "1234" }
                  ↑ 데이터가 본문에 숨겨짐
Paragraph fallback
Paragraph component omitted
Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted
html
<fieldset>
  <legend>기본 정보</legend>
  <label for="name">이름</label>
  <input type="text" id="name" name="name" />
  <label for="email">이메일</label>
  <input type="email" id="email" name="email" />
</fieldset>
Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted
Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted
Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted
css
:root {
  --color-primary: #3b82f6;
  --color-text: #1f2937;
}

.btn {
  background: var(--color-primary);
  color: var(--color-text);
}
Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted
Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted
html
<!-- 필수 입력 + 최소 8자 + 영문/숫자만 허용 -->
<input
  type="text"
  name="username"
  required
  minlength="8"
  pattern="[a-zA-Z0-9]+"
  title="영문과 숫자만 사용 가능합니다"
/>

---

Subtitle fallback
Subtitle component omitted
Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted
Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted

<strong>북마크·공유 가능</strong>: URL 자체가 검색 결과를 담고 있어서 링크를

복사해 공유하면 상대방도 같은 결과를 볼 수 있습니다.

<strong>캐싱 가능</strong>: 브라우저와 서버가 결과를 캐시해 두어 반복 검색이

빠릅니다.

<strong>멱등성</strong>: 몇 번을 요청해도 서버 상태가 변하지 않습니다.

Subtitle fallback
Subtitle component omitted

<strong>URL 노출 금지</strong>: GET을 쓰면 비밀번호가 주소창에 그대로

나타납니다. 브라우저 히스토리, 서버 로그, 공유 화면에 모두 노출됩니다.

<strong>서버 상태 변경</strong>: 로그인 성공 시 세션이 생성되는 등 서버 상태가

바뀝니다. 상태를 변경하는 요청은 POST가 맞습니다.

<strong>HTTPS + POST</strong>: POST 바디는 HTTPS 암호화 구간에서 보호되어

안전하게 전달됩니다.

---

Paragraph fallback
Paragraph component omitted
css
p {
  color: green;
}
.btn {
  color: red;
}
#submit {
  color: blue;
}
html
<p class="btn" id="submit">제출</p>
Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted

<strong>p (태그 선택자)</strong>: 명시도 0-0-1 → green <strong>.btn (클래스 선택자)</strong>: 명시도 0-1-0 → red <strong>#submit (ID 선택자)</strong>: 명시도 1-0-0 → blue

Paragraph fallback
Paragraph component omitted

---

Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted
Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted

<strong>GET</strong>: 데이터가 URL의 쿼리 스트링에 붙어서 전송됩니다

(?key=value). URL에 노출되므로 민감하지 않은 데이터(검색, 필터링)에 적합합니다. URL 공유, 북마크, 브라우저 캐싱이 가능한 것이 장점입니다.

<strong>POST</strong>: 데이터가 HTTP 요청 본문(Body)에 담겨 전송됩니다. URL에

노출되지 않아 로그인, 회원가입, 결제 등 민감한 정보에 적합합니다.

Paragraph fallback
Paragraph component omitted
Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted

<strong>우선순위 순서</strong>: !important > 인라인 스타일 > 아이디(#) >

클래스(.) / 속성 / 가상 클래스 > 태그 / 가상 요소

같은 우선순위라면 <strong>나중에 작성된 스타일</strong>이 적용됩니다. !important는 우선순위를 강제로 끌어올리지만, 디버깅이 극도로 어려워지므로

실무에서는 가급적 사용하지 않습니다.

Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted

<strong>Content</strong>: 텍스트, 이미지 등 실제 내용이 들어가는 영역 <strong>Padding</strong>: 콘텐츠와 테두리 사이의 안쪽 여백 (배경색 적용됨) <strong>Border</strong>: 요소의 테두리 <strong>Margin</strong>: 테두리 바깥쪽의 다른 요소와의 간격 (투명)

Paragraph fallback
Paragraph component omitted
css
/* content-box: width(200) + padding×2(40) + border×2(10) = 실제 250px */
.box {
  width: 200px;
  padding: 20px;
  border: 5px solid;
}

/* border-box: 실제 너비 200px 고정, 콘텐츠 = 200 - 40 - 10 = 150px */
.box {
  box-sizing: border-box;
  width: 200px;
  padding: 20px;
  border: 5px solid;
}
Subtitle fallback
Subtitle component omitted

프론트엔드 스터디 2주차 학습 자료: 사용자와 소통하는 폼 & CSS의 시작

프론트엔드 스터디 3주차 학습 자료: 프론트엔드의 첫 번째 벽, 박스 모델과 스타일링

---

Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted
Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted

<strong>배경 이미지</strong>: background-image로 요소에 이미지를 넣고,

background-size, background-repeat 등으로 크기와 반복을 제어하는 법을 배웁니다.

<strong>Position</strong>: 요소를 문서 흐름에서 꺼내서 원하는 위치에 배치하는

속성입니다. static, relative, absolute, fixed 네 가지가 나오는데, 각각 <strong>"기준점이 어디인가"</strong>가 다릅니다.

<strong>Flexbox</strong>: 이번 주 가장 중요한 개념입니다. 자식 요소들을 가로

또는 세로로 유연하게 정렬하는 레이아웃 시스템입니다. 내비게이션 바, 카드 배치, 정중앙 정렬 등 거의 모든 레이아웃에 쓰입니다.

Subtitle fallback
Subtitle component omitted
Paragraph fallback
Paragraph component omitted

<strong>영상</strong>: 제대로 파는 HTML & CSS <strong>구간</strong>: 02:59:19 ~ 04:28:10 (약 1시간 29분) <strong>링크</strong>:

Anchor fallback
Anchor component omitted

Post Q&A

오케이징에게 물어보기

프론트엔드 스터디 대면 2주차: 폼(Form), CSS 선택자, 그리고 박스 모델 전체를 기준으로 질문과 피드백을 받아요.답을 본 뒤에는 이 내용을 댓글로 달아서 서징에게도 물어볼 수 있어요. 작성자가 직접 볼 수 있어요!

0/500

포스트 목록

/study/clab-26-1/in-person
파일 9개, 폴더 0개
프론트엔드 스터디 대면 0주차: 프론트엔드 개발자란? 그리고 우리가 배울 것들프론트엔드 스터디 대면 1주차: HTML 마크업과 폼, 그리고 CSS의 시작프론트엔드 스터디 대면 2주차: 폼(Form), CSS 선택자, 그리고 박스 모델프론트엔드 스터디 대면 3주차: 박스 모델 실전, Position과 Flexbox프론트엔드 스터디 대면 6주차(1): HTML/CSS/JS 리마인드와 브라우저 렌더링프론트엔드 스터디 대면 6주차(2): AI 시대의 개발 방식과 프론트엔드 개발자의 위치프론트엔드 스터디 대면 7주차: React 입문과 프로젝트 구조프론트엔드 스터디 대면 8주차: API와 통신 — 프론트엔드와 백엔드의 계약프론트엔드 스터디 대면 9주차: Next.js 렌더링 진화와 웹 퍼포먼스

같은 섹션의 대표 이미지

9 posts · latest first
Study26. 05. 25.

프론트엔드 스터디 대면 9주차: Next.js 렌더링 진화와 웹.

Next.js가 무엇이고 왜 필요한지 React와 비교해 이해한 뒤, CSR부터 SSR, SSG, ISR, PPR까지 렌더링 전략과 Web Vitals를 정리하며 스터디를 마무리합니다.

26. 05. 25.SEOJing
Study26. 05. 18.

프론트엔드 스터디 대면 8주차: API와 통신 — 프론트엔드와.

비동기와 async/await를 배운 뒤, 대면에서는 API를 단순 호출 방법이 아니라 프론트엔드와 백엔드 사이의 계약으로 바라봅니다. HTTP, REST, CORS, 프록시, API 클라이언트 구조, TanStack Query와 파일 배치까지 연결합니다.

26. 05. 18.SEOJing
Study26. 05. 11.

프론트엔드 스터디 대면 7주차: React 입문과 프로젝트 구조.

바닐라 JS의 한계에서 React가 등장한 이유까지, 컴포넌트와 렌더링 방식을 이해하고 프로젝트 구조 감각을 만들어가는 대면입니다.

26. 05. 11.SEOJing
Study26. 05. 04.

프론트엔드 스터디 대면 6주차(1): HTML/CSS/JS.

4~6주차 공백 이후 진행하는 첫 번째 대면입니다. HTML/CSS/JS 핵심을 가볍게 다시 연결하고, 브라우저가 코드를 실제 화면으로 바꾸는 과정을 통해 렌더링 파이프라인과 성능 감각을 잡습니다.

26. 05. 04.SEOJing
Study26. 05. 04.

프론트엔드 스터디 대면 6주차(2): AI 시대의 개발 방식과.

길어진 6주차 대면의 두 번째 차시입니다. AI 시대에 개발자가 실제로 어떻게 일하는지, 그리고 프론트엔드 개발자가 디자이너·백엔드·PM 사이에서 어떤 연결과 리딩 역할을 하는지 다룹니다.

26. 05. 04.SEOJing
Study26. 04. 10.

프론트엔드 스터디 대면 3주차: 박스 모델 실전,.

3주차 박스 모델과 스타일링 복습, 과제 풀이, 4주차 Position과 Flexbox 레이아웃까지 다룬 대면 스터디 정리입니다. 면접에서 자주 나오는 마진 겹침, box-sizing, Flexbox 관련 질문도 함께 준비합니다.

26. 04. 10.SEOJing
Study26. 04. 03.

프론트엔드 스터디 대면 2주차: 폼(Form), CSS.

2주차 폼과 CSS 선택자 복습, 과제 풀이, 3주차 박스 모델과 스타일링까지 다룬 대면 스터디 정리입니다. 면접에서 자주 나오는 GET vs POST, CSS 우선순위, 박스 모델 관련 질문도 함께 준비합니다.

26. 04. 03.SEOJing
Study26. 03. 27.

프론트엔드 스터디 대면 1주차: HTML 마크업과 폼, 그리고.

1주차 HTML 핵심 복습과 과제 풀이, 2주차 폼(Form)과 CSS 선택자까지 다룬 대면 스터디 정리입니다. 면접에서 자주 나오는 시맨틱 HTML, img alt 속성 관련 질문도 함께 준비합니다.

26. 03. 27.SEOJing
Study26. 03. 20.

프론트엔드 스터디 대면 0주차: 프론트엔드 개발자란? 그리고.

프론트엔드 개발자가 실무에서 하는 일, 2025-2026 기술 스택, 현실적인 연봉과 채용 트렌드를 정리했습니다. 스터디 자료 구조와 앞으로의 방향도 함께 안내합니다.

26. 03. 20.SEOJing