HTML 헤더


HTML <head>


온라인 예시 보기

인스턴스

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title>我的 HTML 的第一页</title>
</head>

<body>
<p>浏览器中包含body元素的内容。</p>
<p>浏览器的标题包含title元素的内容</p>
</body>

</html>

인스턴스 실행»

온라인 인스턴스를 보려면 "인스턴스 실행" 버튼을 클릭하세요.
<base>를 사용하여 기본 링크 대상 주소를 정의하세요. 페이지의 모든 링크 중

인스턴스

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title>php中文网(php.cn)</title> 
<base href="http://www.php.cn/images/" target="_blank">
</head>

<body>
<img src="logo.png"> - 注意这里我们设置了图片的相对地址。能正常显示是因为我们在 head 部分设置了 base 标签,
    该标签指定了页面上所有链接的默认 URL,所以该图片的访问地址为 "http://www.php.cn/images/logo.png"
<br><br>
<a href="http://www.php.cn">php中文网</a> - 注意这个链接会在新窗口打开,即便它没有 target="_blank" 属性。
因为在 base 标签里我们已经设置了 target 属性的值为 "_blank"。

</body>
</html>

인스턴스 실행»

"인스턴스 실행" 버튼을 클릭하여 확인하세요. 온라인 인스턴스
<meta> 요소를 사용하여 HTML 문서의 설명, 키워드, 작성자, 문자 집합 등을 설명합니다.

인스턴스

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title>php中文网(php.cn)</title> 
<meta name="description" content="Free Web tutorials">
<meta name="keywords" content="HTML,CSS,XML,JavaScript">
<meta name="author" content="Ståle Refsnes">
<meta charset="UTF-8">
</head>
<body>

<p>所有 meta 标签显示在 head 部分...</p>

</body>
</html>

인스턴스 실행»

"인스턴스 실행" 버튼을 클릭하여 확인하세요. 온라인 인스턴스


HTML <head> 요소

<head> 요소에는 모든 head 태그 요소가 포함됩니다. 존재하다 <head> 요소에는 스크립트, 스타일 파일(CSS), 다양한 메타 정보를 삽입할 수 있습니다.

헤더 영역에 추가할 수 있는 요소 태그는 </a>, <a href="http://www.php.cn/dic/html/style.html" target="_blank"><style></a>, <a href="http://www.php.cn/dic/html/meta.html" target="_blank"><meta></a>, <a href="http://www.php.cn/dic/html/link.html" target="_blank"><link></a>, <a href="http://www.php.cn/dic/html/script.html" target="_blank"><script></a>, <a href="http://www.php.cn/dic/html/noscript.html" target="_blank"><noscript></a> 및 <a href="http://www.php.cn/dic/html/base.html" target="_blank">< base></a>.</p><hr/><h2>HTML <title> 요소 </h2><p><title> 태그는 다양한 문서의 제목을 정의합니다. </p><p><title>은 HTML/XHTML 문서에 필요합니다. </p><p><title> 요소: </p><ul class=" list-paddingleft-2"><li><p>은 웹페이지가 추가될 때 브라우저 도구 모음 </p></li><li><p>의 제목을 정의합니다. favorites 즐겨찾기에 표시되는 제목 </p></li><li><p>검색 엔진 결과 페이지에 표시되는 제목 </p></li></ul><p>간단한 HTML 문서: </p> <pre class="brush:html;toolbar:false;"><!DOCTYPE html> <html> <head>  <meta charset="utf-8">  <title>文档标题</title> </head> <body> 文档内容...... </body> </html></pre><hr/> <h2>HTML <base> 요소 </h2><p><base> 태그는 HTML 문서의 모든 링크 태그에 대한 기본 링크 역할을 하는 기본 링크 주소/링크 대상을 설명합니다. </p><div class="code"> <div>아아아아</div></div><hr/><h2>HTML <link> 요소 </h2><p><link> 태그는 문서와 외부 리소스 간의 관계를 정의합니다. </p><p><link> 태그는 일반적으로 스타일 시트에 연결하는 데 사용됩니다. </p><div class="code"><div><pre class="brush:html;toolbar:false"><head> <base href="http://www.php.cn/images/" target="_blank"> </head></pre></div></div><hr/>HTML <style> <h2> </h2><style> 태그는 HTML 문서의 스타일 파일 참조 주소를 정의합니다. <p></p><style> : <p></p><div class="code"> <pre class="brush:html;toolbar:false"><head> <link rel="stylesheet" type="text/css" href="mystyle.css"> </head</pre><div></div></div><hr/>HTML <meta> 요소 <h2></h2>meta 태그는 몇 가지 기본 메타데이터를 설명합니다. <p></p><meta> 태그는 메타데이터도 페이지에 표시되지 않지만 브라우저에서 구문 분석됩니다. <p></p>META 요소는 일반적으로 웹페이지 설명, 키워드, 파일의 마지막 수정 시간, 작성자 및 기타 메타데이터를 지정하는 데 사용됩니다. <p></p>메타데이터는 브라우저(콘텐츠 표시 또는 페이지 새로고침 방법), 검색 엔진(키워드) 또는 기타 웹 서비스에서 사용될 수 있습니다. <p></p><meta> 일반적으로 <head> 영역 <p></p><meta> 태그 사용 - 검색 엔진용 키워드 정의: <h2></h2><p><pre class="brush:html;toolbar:false"><head> <style type="text/css"> body {background-color:yellow} p {color:blue} </style> </head</pre></p><div class="code"><div>웹페이지 설명 내용 정의: </div></div><p><pre class="brush:html;toolbar:false"><meta name="keywords" content="HTML, CSS, XML, XHTML, JavaScript"</pre></p><div class="code"><div>웹페이지 작성자 정의 : </div></div><p><pre class="brush:html;toolbar:false"><meta name="description" content="Free Web tutorials on HTML and CSS"</pre></p><div class="code"><div>30초마다 현재 페이지 새로 고침: </div></div><p><pre class="brush:html;toolbar:false"><meta name="author" content="Hege Refsnes"</pre></p><div class="code"><hr/><h2>HTML <script> 요소 </h2><p><script> 태그는 JavaScript와 같은 스크립트 파일을 로드하는 데 사용됩니다. </p><p><script> 요소는 다음 섹션에서 자세히 설명합니다. </p><hr/><h2>HTML 헤드 요소</h2><table class="reference"><tbody><tr class="firstRow"><th width="20%" align="left">标签</th><th width="80%" align="left">描述</th></tr><tr><td style="word-break: break-all;"><a href="http://www.php.cn/dic/html/head.html" target="_blank"><head></a></td><td>定义了文档的信息</td></tr><tr><td style="word-break: break-all;"><a href="http://www.php.cn/dic/html/title.html" target="_blank"><title></a></td><td>定义了文档的标题</td></tr><tr><td style="word-break: break-all;"><a href="http://www.php.cn/dic/html/base.html" target="_blank"><base></a></td><td>定义了页面链接标签的默认链接地址</td></tr><tr><td style="word-break: break-all;"><a href="http://www.php.cn/dic/html/link.html" target="_blank"><link></a></td><td>定义了一个文档和外部资源之间的关系</td></tr><tr><td style="word-break: break-all;"><a href="http://www.php.cn/dic/html/meta.html" target="_blank"><meta></a></td><td>定义了HTML文档中的元数据</td></tr><tr><td style="word-break: break-all;"><a href="http://www.php.cn/dic/html/script.html" target="_blank"><script></a></td><td>定义了客户端的脚本文件</td></tr><tr><td style="word-break: break-all;"><a href="http://www.php.cn/dic/html/style.html" target="_blank"><style></a></td><td>定义了HTML文档的样式文件</td></tr></tbody></table></div></div></div><div class="previous-next-links"><div class="previous-design-link">← <a href="/html/html-links.html" rel="prev">HTML 링크</a></div><div class="next-design-link"><a href="/html/html-css.html" rel="next">HTML CSS</a> →</div></div><div class="sidebar-box ad-box ad-box-large"><div class="ad-336280"></div></div></div></div></div></div><div id="codeMark"></div><div id="codeMain"><div class="left"><div id="codeEditor"></div><div class="editor-btn"><div class="editor-btn-inner"><a href="javascript:;" class="code-btn-submit r" id="J_Commit" title="제출하다">제출하다</a></div></div></div><div class="right"><div id="codeResult"></div></div><div id="close"></div></div><script src="/static/js/CodeRunOnline.js?1.1"></script><script src="/static/src-min-noconflict/ace.js"></script><footer><a href='https://m.php.cn/ko/' ><i class='layui-icon layui-icon-home '></i>집</a><a href='/course.html' ><i class='layui-icon layui-icon-play'></i>비디오</a><a href="https://m.php.cn/ko/wenda.html" ><i class='layui-icon layui-icon-code-circle'></i>Q&A</a><a href='https://m.php.cn/ko/login' ><i class='layui-icon layui-icon-username'></i>나의</a></footer><div class="right_menu"><div class="right_menu_con"><h2 class="hjclass-txt"><i class="layui-icon layui-icon-shrink-right hjclass-txt-i"></i>PHP 중국어 웹사이트</h2><div class="menu-list"><a href="https://m.php.cn/ko/"><span class="item-icon item-1"><img src="https://img.php.cn/upload/article/000/000/003/5bffb65f99ae2304.png" alt="집"></span>집</a><a href="https://m.php.cn/ko/course.html"><span class="item-icon item-7"><img src="https://img.php.cn/upload/article/000/000/003/5bffb82bd09ad628.png" alt="강의"></span>강의</a><a href="https://m.php.cn/ko/article.html"><span class="item-icon item-4"><img src="https://img.php.cn/upload/article/000/000/003/5bffb7e111b3b425.png" alt="기사"></i></span>기사</a><a href="https://m.php.cn/ko/wenda.html"><span class="item-icon item-2"><img src="https://img.php.cn/upload/article/000/000/003/5bffb83f04e24328.png" alt="Q&A"></span>Q&A</a><a href="https://m.php.cn/ko/dic.html"><span class="item-icon item-9"><img src="https://img.php.cn/upload/article/000/000/003/5bffb85047b25758.png" alt="사전"></span>사전</a><a href="https://m.php.cn/ko/course/type/99.html"><span class="item-icon item-3"><img src="https://img.php.cn/upload/article/000/000/003/5bffb8736ea90300.png" alt="수동"></span>수동</a><a href="https://m.php.cn/ko/xiazai/"><span class="item-icon item-5"><img src="/static/images/ico/resources.png" alt="다운로드"></span>다운로드</a><a href="https://m.php.cn/ko/search"><span class="item-icon item-6"><img src="https://img.php.cn/upload/article/000/000/003/5bffb880b460a204.png" alt="찾다"></span>찾다</a><a href="https://m.php.cn/ko/app/"><span class="item-icon item-6"><img src="https://img.php.cn/upload/article/000/000/003/608bbfa30d9cc398.png" style="width:35px;height:35px;" alt="APP다운로드"></span> APP다운로드</a></div></div></div><script>isLogin = 0;</script><script type="text/javascript" src="/static/js/jquery.min.js"></script><script type="text/javascript" src="/static/layui/layui.js"></script><script type="text/javascript" src="/static/js/global.js?4.9.47"></script><script>(function () { var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?43f47cabf6856204df6d083dd89ae407"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script></body></html>