HTML

[HTML] head

기록하는_사람 2022. 9. 13. 21:29

head

📌 head

: 웹 사이트의 환경을 설정함. 외부적으로 보여지지 않은 설정.

 

head - <title></title>

📌 <title></title>

: 브라우저 창의 제목 설정.

<!DOCTYPE html>
<html>
    <head>
        <title>HTML 기본 형식</title>
    </head>
    <body>
        <h1>
            HTML 연습중
        </h1>
        <a href="http://google.com" target="_blank">link : google.com</a>
        <img src="img/dolphin1.jpg"/>
    </body>
</html>

 

head - <meta />

📌 <meta/>

: 부가적인 정보.

 

📌 attribute 

- name, content 

- charset : 페이지의 문자 인코딩을 선언.

<!DOCTYPE html>
<html>
    <head>
        <title>HTML 기본 형식</title>
        <meta name="description" content="This is Website"/>
        <meta charset="utf-8"/>
    </head>
    <body>
        <h1>
            HTML 연습중
        </h1>
    </body>
</html>

💡 <meta name="description" content="This is Website"/>

: 해당 페이지 설명란에 content의 내용이 뜸.

 

💡 og:xxx

: 링크 보낼 때 띄워지는 것 설정.

<meta property="og:title" content="HTML 기본 형식"/>
<meta property="og:image" content=""/>

 

head - 브라우저 창 아이콘 설정

📌 브라우저 창 아이콘  설정.

: <link /> 사용하여 설정.

 

📌 attribute

- rel(relationship)  : shortcut

- sizes :  크기 설정.

- href : 이미지 링크.