본문 바로가기
study/HTML

html - HTML Tag 구조, charset = utf-8 와 euc-kr, HTML convention (title), keywords, description, robots, viewport

by Elfen Lied 2020. 1. 7.
반응형

*시작

<!DOCTYPE html>
<html>
  <body>
   html 첫문서
  </body>
</html>

*HTML Tag 구조

<a href="http://www.asdf.net">content</a>

 

 

*charset = utf-8 와 euc-kr

<!doctype html>
<html lang="ko">
     <head>
          <meta charset="utf-8" />
          <title>html 첫문서</title>
     </head>
     <body>
          <span lang="en">html</span> 첫문서
          <span lang="ja">html</span> 첫문서
          <span lang="zh">html</span> 첫문서
     </body>
</html>

보통 utf 사용

euc-kr 거의 사용 안함

단, DB에서 euc로 되어있다면 HTML도 euc로 작성할것!

 

*HTML convention (title)

<title>galaxy s8 - 삼성전자</title>

컨텐츠 제목 (공백) – (공백) 하위섹션명 (공백) | (공백) 서비스명

작은거에서 큰걸로.

 

*keywords, description, robots, viewport

     <head>
          <meta charset="utf-8" />
          <title>galaxy s8 - 삼성전자</title>
          
          <!--keywords : 설명-->
          <meta name="keywords" content="galaxy, s8,
          스마트폰, 삼성폰"/>
          
          <!--description : 문장으로-->
          <meta name="description" content="카메라 성능이
          향상된 galaxy s8"/>
          
          <!--robots : 안에 글 모두 수집해가라
          수집가능 index, follow = all
          수집불가 noindex, nofollow = none
          -->
          <meta name="robots" content="all"/>
          
          <!--viewport : 반응형, scale : maximum-scale(줌), minimum-scale(축소) -->          
          <meta name="viewport" content="device-width, initial-scale=1"/>          
          

     </head>

keywords : 반드시 본문 내용으로 넣기// 관련없으면 저품질 걸림(robot)

viewport : scale (maximum, minimum 1.0 까지 설정했으면 디바이스에서 줌인 줌아웃 불가)

max, mini 설정없으면 무한정으로 줌가능

 

 

반응형

댓글