Thẻ trong HTML hoạt động như một vùng chứa cho các phần tử sau -
, <style>, <base>, <link>, <meta>, <script>, <noscript>. </P> <p>
Trong HTML5, bạn thậm chí có thể làm việc với tài liệu HTML mà không cần bao gồm phần tử <head>. </P> <p>
<strong> <title> bên trong <head> </strong> </P> <p>
Bây giờ chúng ta hãy xem một ví dụ để triển khai thẻ <head> và thêm <title> - </P> <h2> Ví dụ </h2> <pre><!DOCTYPE html>
<html>
<head>
<title>Document Title</title>
</head>
<body>
<h2>Demo Heading</h2>
<p>This is demo text.</p>
<p>This is demo text.</p>
<p>This is demo text.</p>
<p>This is demo text.</p>
</body>
</html></pre> <p>
Điều này sẽ tạo ra kết quả sau hiển thị tiêu đề của tài liệu mà chúng tôi đã thêm vào trong phần tử <head> - </P> <p>
<img loading='lazy' alt='Thẻ HTML head ' src="/article/uploadfiles/202203/2022033116063442.jpg" /> </P> <p>
<strong> <base> bên trong <head> </strong> </P> <p>
Thẻ cơ sở trong HTML được sử dụng để đặt URL cơ sở cho tài liệu HTML. <head> cũng hoạt động như một vùng chứa cho phần tử <base>. Ví dụ:URL cơ sở là <strong> https - // example.com/tutorials </strong> cho tất cả các URL tương đối như <strong> / html, / java, / jquery </strong> v.v., cuối cùng là - </P> <pre>https −//example.com/tutorials/html
https −//example.com/tutorials/java
https −//example.com/tutorials/jquery</pre> <p>
<strong> Lưu ý </strong> - Thẻ <base> không có thẻ kết thúc, tức là không cần kết thúc nó bằng </base> </P> <p>
Sau đây là các thuộc tính - </P> <ul> <li> <strong> href </strong> - Nó đặt URL cơ sở cho tất cả các URL tương đối trong trang </li>
<li> <strong> mục tiêu </strong> - Mục tiêu mặc định cho tất cả các siêu liên kết và biểu mẫu. Các giá trị có thể là _blank, _parent, _self, _top và framename. </li>
</ul>
<p>
Bây giờ chúng ta hãy xem một ví dụ để triển khai phần tử <base> - </P> <h2> Ví dụ </h2> <pre><!DOCTYPE html>
<html>
<head>
<base href="https −//www.example.com/tutorials/">
</head>
<body>
<h2>Tutotials List</h2>
<p><a href="java.html">Java Tutorial</a></p><p>(This will act as https −//www.example.com/tutorials/java.html)</p>
<p><a href="jquery.html">jQuery Tutorial</a></p><p>(This will act as https −//www.example.com/tutorials/jquery.html)</p>
<p><a href="blockchain.html">Blockchain Tutorial</a></p><p>(This will act as https −//www.example.com/tutorials/blockchain.html)</p>
<p><a href="python.html">Python Tutorial</a></p><p>(This will act as https −//www.example.com/tutorials/python.html)</p>
</body>
</html></pre> <h2> Đầu ra </h2> <p>
<img loading='lazy' alt='Thẻ HTML head ' src="/article/uploadfiles/202203/2022033116063560.jpg" /> </P> <br>
</article>
<div class="ad5">
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4480737146802772" crossorigin="anonymous"></script><!-- computer.wsxdn --><ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-4480737146802772" data-ad-slot="4467655591" data-ad-format="auto" data-full-width-responsive="true"></ins><script> (adsbygoogle = window.adsbygoogle || []).push({}); </script>
</div>
</section>
<div id="turn-page" class="f-between">
<div class="page up f-align">
<i class="prev"></i>
<section>
<a class='LinkPrevArticle' href='https://vn.wsxdn.com/fd034x/om351g/1003064272.html' >Làm cách nào để thay đổi phông chữ văn bản cho JLabel bằng HTML trong Java? </a>
</section>
</div>
<div class="page down f-align">
<section>
<a class='LinkNextArticle' href='https://vn.wsxdn.com/fd034x/om351g/1003064274.html' >Thẻ HTML <del> </a>
</section>
<i class="next"></i>
</div>
</div>
<section class="box4-l-list">
<div class="imgList f-between banner">
<ul class="f-between">
<li class="f-between f-align"><div>
<a href="https://vn.wsxdn.com/fd034x/om351g/1003064362.html" class="text r-over r-over-3" title="Thẻ HTML <blockquote> ">Thẻ HTML <blockquote> </a>
</div></li>
<li class="f-between f-align"><div>
<a href="https://vn.wsxdn.com/fd034x/om351g/1003064379.html" class="text r-over r-over-3" title="Thẻ HTML <time> ">Thẻ HTML <time> </a>
</div></li>
<li class="f-between f-align"><div>
<a href="https://vn.wsxdn.com/fd034x/om351g/1003064399.html" class="text r-over r-over-3" title="Thẻ HTML <dl> ">Thẻ HTML <dl> </a>
</div></li>
<li class="f-between f-align"><div>
<a href="https://vn.wsxdn.com/fd034x/om351g/1003064408.html" class="text r-over r-over-3" title="Thẻ HTML <embed> ">Thẻ HTML <embed> </a>
</div></li>
<li class="f-between f-align"><div>
<a href="https://vn.wsxdn.com/fd034x/om351g/1003064409.html" class="text r-over r-over-3" title="Thẻ HTML <dfn> ">Thẻ HTML <dfn> </a>
</div></li>
</ul>
</div>
</section>
</section>
<aside class="box-r box4-r">
<div class="articleList">
<em>Bài báo nổi tiếng</em>
<ol>
<li><a href="https://vn.wsxdn.com/fd034x/om351g/1003063717.html" class="t-over" title="Tại sao chúng tôi sử dụng thẻ head trong Trang HTML? ">Tại sao chúng tôi sử dụng thẻ head trong Trang HTML? </a></li>
<li><a href="https://vn.wsxdn.com/fd034x/om351g/1003064263.html" class="t-over" title="Thẻ canvas HTML ">Thẻ canvas HTML </a></li>
<li><a href="https://vn.wsxdn.com/fd034x/om351g/1003064274.html" class="t-over" title="Thẻ HTML <del> ">Thẻ HTML <del> </a></li>
<li><a href="https://vn.wsxdn.com/fd034x/om351g/1003064277.html" class="t-over" title="Thẻ <dd> HTML ">Thẻ <dd> HTML </a></li>
<li><a href="https://vn.wsxdn.com/fd034x/om351g/1003064280.html" class="t-over" title="Thẻ <code> HTML ">Thẻ <code> HTML </a></li>
<li><a href="https://vn.wsxdn.com/fd034x/om351g/1003064289.html" class="t-over" title="Thẻ <i> HTML ">Thẻ <i> HTML </a></li>
<li><a href="https://vn.wsxdn.com/fd034x/om351g/1003064290.html" class="t-over" title="Thẻ <html> HTML ">Thẻ <html> HTML </a></li>
<li><a href="https://vn.wsxdn.com/fd034x/om351g/1003064291.html" class="t-over" title="Thẻ <hr> HTML ">Thẻ <hr> HTML </a></li>
</ol>
</div>
<section>
<strong class="list-title">
<p>Máy Tính</p>
<span></span>
</strong>
<ol class="texts">
<li>
<a href="https://vn.wsxdn.com/fd034x/om351g/1003064292.html" class="t-title"><strong class="r-over r-over-2">Thẻ <hgroup>
HTML </strong></a>
</li>
<li>
<a href="https://vn.wsxdn.com/fd034x/om351g/1003064303.html" class="t-title"><strong class="r-over r-over-2">Thẻ HTML <nav> </strong></a>
</li>
<li>
<a href="https://vn.wsxdn.com/fd034x/om351g/1003064313.html" class="t-title"><strong class="r-over r-over-2">Thẻ <q> HTML </strong></a>
</li>
<li>
<a href="https://vn.wsxdn.com/fd034x/om351g/1003064316.html" class="t-title"><strong class="r-over r-over-2">Thẻ HTML <output> </strong></a>
</li>
<li>
<a href="https://vn.wsxdn.com/fd034x/om351g/1003064324.html" class="t-title"><strong class="r-over r-over-2">Thẻ HTML <strike> </strong></a>
</li>
<li>
<a href="https://vn.wsxdn.com/fd034x/om351g/1003064331.html" class="t-title"><strong class="r-over r-over-2">Thẻ <samp>
HTML </strong></a>
</li>
</ol>
</section>
<ul class="typeList container f-start box4-typeList">
<li><a class='childclass' href='https://vn.wsxdn.com/fd034x/sq344k/' target="_self">lập trình C</a></li>
<li><a class='childclass' href='https://vn.wsxdn.com/fd034x/ay345t/' target="_self">C ++</a></li>
<li><a class='childclass' href='https://vn.wsxdn.com/fd034x/zx346r/' target="_self">Redis</a></li>
<li><a class='childclass' href='https://vn.wsxdn.com/fd034x/nk347f/' target="_self">Lập trình BASH</a></li>
<li><a class='childclass' href='https://vn.wsxdn.com/fd034x/ur348m/' target="_self">Python</a></li>
<li><a class='childclass' href='https://vn.wsxdn.com/fd034x/ca349u/' target="_self">Java</a></li>
<li><a class='childclass' href='https://vn.wsxdn.com/fd034x/hf350z/' target="_self">Cơ sở dữ liệu</a></li>
<li><a class='childclass' href='https://vn.wsxdn.com/fd034x/om351g/' target="_self">HTML</a></li>
<li><a class='childclass' href='https://vn.wsxdn.com/fd034x/tr352l/' target="_self">Javascript</a></li>
<li><a class='childclass' href='https://vn.wsxdn.com/fd034x/ay353s/' target="_self">Lập trình</a></li>
<li><a class='childclass' href='https://vn.wsxdn.com/fd034x/jg354b/' target="_self">CSS</a></li>
<li><a class='childclass' href='https://vn.wsxdn.com/fd034x/nl355g/' target="_self">Ruby</a></li>
<li><a class='childclass' href='https://vn.wsxdn.com/fd034x/mk356e/' target="_self">SQL</a></li>
<li><a class='childclass' href='https://vn.wsxdn.com/fd034x/ge357z/' target="_self">IOS</a></li>
<li><a class='childclass' href='https://vn.wsxdn.com/fd034x/ec358x/' target="_self">Android</a></li>
<li><a class='childclass' href='https://vn.wsxdn.com/fd034x/ol359g/' target="_self">MongoDB</a></li>
<li><a class='childclass' href='https://vn.wsxdn.com/fd034x/vt360n/' target="_self">MySQL</a></li>
<li><a class='childclass' href='https://vn.wsxdn.com/fd034x/vt361n/' target="_self">C#</a></li>
<li><a class='childclass' href='https://vn.wsxdn.com/fd034x/wu365o/' target="_self">PHP</a></li>
<li><a class='childclass' href='https://vn.wsxdn.com/fd034x/us371m/' target="_self">SQL Server</a></li>
</ul>
</aside>
</section>
<footer class="container">
<span class="container f-center">
Bản quyền ©
<a href="https://vn.wsxdn.com">https://vn.wsxdn.com</a>
Đã đăng ký Bản quyền
</span>
</footer>
</body>
</html>