Table of Contents
1. HTML 기본 구성 요소
2. HTML 기본 구조
3. HTML 특징
4. HTML 태그
<!--주석-->
<!DOCTYPE html> <!--문서형 정의 DTD-->
<html lang="en">
<head> <!--문서의 메타 데이터를 정의해주는 영역-->
<meta charset="UTF-8"> <!--언어 설정-->
<meta http-equiv="X-UA-Compatible" content="IE=edge'> <!--인터넷 렌더링 엔진 지정-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title> <!--웹 사이트에서 제목이 중복된 문서를 만들지 않기-->
</head>
<body>
</body>
</html>
block element
: 공간 유무와 상관없이 사용할 때 마다 줄 바꿈되는 태그
: e.g. h1
, p
inline element
: e.g. a
, span
<h1></h1>
<p></p>
<br>
: 줄바꿈
<blockquote cite="source URL"><p>문단 단위 인용문</p></blockquote>
cite
attribute은 옵션<q cite="source URL">짧은 인용문</q>
<ins>추가 텍스트</ins>
와 <del>삭제 텍스트</del>
<sub>아래 첨자</sub>
과 <sup>위 첨자</sup>
:관련 있는 요소끼리 그룹 짓는 태그들
<div>inline elements and block elements</div>
<span>inline elements</span>
<a href="대상 경로" target= "링크 연결 방식" title="링크 설명">링크가 표시되는 글</a>
-href
는 필수 나머지는 선택. 혹 href 값이 아직 없다면 #
입력
-target
은 새 창으로 열리는 방식인 _blank
값을 제외하고 거의 생략
-title
은 a
tag의 콘텐츠 만으로 표현하지 못한 링크 설명
<img src="이미지 경로" alt="이미지 설명">
src
와 alt
모두 필수../
는 상위 폴더 ./
는 현재 폴더; e.g. ../../imgs/beach.jpg
img
tag inside a
tagstrong
<form action="server url" method="get OR post"></form>
<input type="" name="" value="">
태그 안에서 사용하는 상호작용 요소에 이름을 붙일 때 사용; 웹 접근성을 높이기 위해 필요함
<label>
아이디
<input type="text">
</label>
<label for="userpw">비밀번호</label>
<input type="password" id="userpw">
<label for="userpw">
비밀번호
<input type="password" id="userpw">
</label>
<form action="#">
<fieldset>
<legend>그룹 이름</legend>
</fieldset>
</form>
<textarea>초깃값</textarea>
여러 줄의 input text를 받을 때 input
tag 대신 사용
<select name="fruits" size="3" multiple>
<optgroup label="과일">
<option value="apple" selected>사과</option>
<option value="banana">바나나</option>
<option value="grape">포도</option>
</optgroup>
<optgroup label="채소">
<option value="carrot">당근</option>
<option value="spinach">시금치</option>
<option value="potato">감자</option>
</optgroup>
</select>
<button type="">버튼내용</button>
disabled
readonly
maxlength
checked
placeholder
<table>
<tr>
<th></th>
<th></th>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</table>
<audio
src="https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3"
controls <!--웹 브라우저에 노출-->
autoplay
loop
muted>
브라우저가 오디오 태그를 지원하지 않는 경우 이 텍스트가 표시됩니다.
</audio>
<video
src="https://www.w3schools.com/html/mov_bbb.mp4"
controls
autoplay
loop
muted
preload="auto"
poster="https://www.w3schools.com/html/pic_trulli.jpg"
width="640"
height="360">
브라우저가 비디오 태그를 지원하지 않는 경우 이 텍스트가 표시됩니다.
</video>
<audio controls>
<source src="sample.wav' type="audio/wav">
<source src="sample.mp3' type="audio/mp3">
지원하지 않는 웹 브라우저입니다.
</audio>
: 웹 페이지에서 논리적으로 관련 있는 내용 영역을 구분할 때
: 보통 내용의 제목을 나타내는 hn 태그를 포함
: 독립적인 영역을 구분할 때 (로그인 영역)
: 주력 내용이나 독립적인 내용으로 보기 어려운 나머지 영역들
: mouse hover 했을 때 설명 뜸
: html tag 의 lang 은 kr 인데 (즉 문서의 주언어는 kr) 인데 영어 단어가 나왔을 때 lang=en 으로 하면 웹접근성이 높아짐
: 요소를 화면에서 감춤
: 개발자가 custom한 attribute
본 후기는 [한글과컴퓨터x한국생산성본부x스나이퍼팩토리] 한컴 AI 아카데미 (B-log) 리뷰로 작성 되었습니다.
#한컴AI아카데미 #AI개발자 #AI개발자교육 #한글과컴퓨터 #한국생산성본부 #스나이퍼팩토리 #부트캠프 #AI전문가양성 #개발자교육 #개발자취업