HTML
화면 내용의 역할 나타내기
Indicating the role of screen content
HTML 태그는 제목, 메뉴, 버튼처럼 각 내용이 맡은 역할을 브라우저에 알려 줍니다.
HTML tags tell the browser the role of each piece of content, like headings, menus, and buttons.
<input>
- 사용자가 “수학 숙제” 같은 글을 키보드로 입력하는 칸을 만듭니다.
<input>
- Creates a field where the user can type text like "Math homework" on the keyboard.
<form>
- 입력 칸과 제출 버튼을 한 묶음으로 만듭니다. 오늘 할 일 예시처럼 입력한 글을 화면 목록에 추가하거나 브라우저에 저장하려면 JavaScript가 필요합니다.
<form>
- Groups an input field and a submit button together. Like the to-do list example, you'll need JavaScript to add typed text to the screen list or save it to the browser.
<table>
- 시간표처럼 가로줄과 세로줄이 있는 표의 내용을 만듭니다.
<table>
- Creates table content with rows and columns, like a timetable.
- 링크·이미지
<a>는 사용자가 링크를 누르면 href에 적힌 주소로 이동하게 합니다. <img>는 src에 적힌 파일 경로나 인터넷 주소에서 이미지 한 장을 불러와 보여 줍니다.
- Links & Images
<a> makes the browser go to the address in href when a user clicks the link. <img> loads and displays an image from a file path or URL written in src.
CSS
한 줄과 여러 칸 배치하기
Laying out single lines and multiple cells
Flexbox는 메뉴 항목처럼 여러 요소를 가로 한 줄이나 세로 한 줄에 놓습니다. Grid는 시간표처럼 화면을 여러 행과 열로 나누고 각 요소를 원하는 칸에 놓습니다.
Flexbox places multiple elements in a single horizontal or vertical line, like menu items. Grid divides the screen into multiple rows and columns like a timetable, placing each element in a desired cell.
- 반응형
@media로 화면 너비에 따라 배치를 바꿉니다. 컴퓨터의 세 칸을 휴대폰에서는 한 칸씩 보여 줄 수 있습니다.
- Responsive
- Use
@media to change layouts based on screen width. You can show three columns from a PC as a single column on a phone.
- 전환
transition은 버튼 배경색이 기존 색에서 새 색으로 바뀌는 과정을 지정한 시간 동안 이어서 보여 줍니다.
- Transitions
transition smoothly animates a change, like a button's background color changing from an old color to a new one over a specified duration.
- 애니메이션
@keyframes로 시작 모습과 끝 모습을 정해 이미지가 움직이는 것처럼 보이게 합니다.
- Animations
- Use
@keyframes to define starting and ending states, making images appear to move.
JavaScript
값을 확인하고 화면 바꾸기
Checking values and changing the screen
조건문, 배열, 반복, 이벤트는 서로 다른 개념이며, 필요한 기능에 따라 함께 연결해 쓰기도 합니다.
Conditionals, arrays, loops, and events are distinct concepts. They are often combined together depending on the needed functionality.
- 조건문
- 공이 게임판 아래로 떨어졌는지처럼 조건을 확인하고, 결과에 따라 시작 위치로 돌려보낼지 결정합니다.
- Conditionals
- Check a condition, such as whether a ball fell off a game board, and decide whether to send it back to the start based on the result.
- 배열
- OX 퀴즈 문제나 시간표 과목처럼 관련된 값을 순서대로 모아 둡니다.
- Arrays
- Store related values in order, like True/False quiz questions or timetable subjects.
- 반복
- 배열의 할 일 다섯 개를 차례로 읽어 화면에 목록 다섯 줄을 만드는 것처럼 같은 일을 여러 번 실행합니다.
- Loops
- Execute the same action multiple times, like reading five to-do items from an array to create a five-line list on the screen.
- 이벤트
- 사용자가 버튼이나 방향키를 누른 순간을 알아내고 정해진 동작을 실행합니다.
- Events
- Detect the exact moment a user presses a button or arrow key, and execute a predefined action.