Jadual Kandungan
什么是head标签
title
元数据<meta>
在你的站点增加自定义图标
在HTML中应用CSS和JavaScript
为文档设定主语言
Rumah hujung hadapan web html tutorial 什么是head标签 ?html中head标签的介绍

什么是head标签 ?html中head标签的介绍

Aug 13, 2018 pm 05:50 PM
html

本篇文章给大家带来的内容是关于什么是head标签 ?html中head标签的介绍,有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助。

什么是head标签

head 标签是 元素的内容。不像 元素的内容可以显示在浏览器中,head 的内容不会在浏览器中显示,它的作用是包含一些页面的元数据。在下面的例子中,head 的内容很少。

<head>
  <meta charset="utf-8">
  <title>My test page</title>
</head>
  • 元数据就是描述数据的数据.

title

元素 是用来表示整个HTML文档大致内容的元数据(不是文档的内容.)<br>元素 <title> 也被以其他的方式使用着. 比如说,如果你尝试为某个页面添加书签,(Bookmarks > Bookmark This Page, 在火狐浏览器中), 你会看到 <title> 的内容被作为建议的书签名.</p> <h2 id="元数据-lt-meta-gt">元数据<meta></h2> <p>元数据就是描述数据的数据,而HTML有一个“官方的”方式来为一个文档添加元数据,——  <meta> 元素. 当然,其他在这篇文章中提到的东西也可以被当作元数据。 有很多不同种类的 <meta> 元素可以被包含进你的页面的<head>元素, 但是现在我们还不会尝试去解释所有类型, 这只会引起混乱。</p> <pre class="brush:php;toolbar:false"><meta charset="utf-8"></pre> <ul class=" list-paddingleft-2"><li><p>这个元素简单的指定了文档的字符编码 —— 在这个文档中被允许使用的字符集。 utf-8<br>  是一个通用的字符集,它包含了任何人类语言中的大部分的字符。 这意味着你的web页面可以显示任意的语言;  许多<meta><br>  元素包含了name 和 content 特性.</p></li></ul> <p>name 特性指定了meta 元素的类型; 说明该元素包含了什么类型的信息。<br>content 指定了实际的元数据内容。<br>这两个meta 元素对于定义你的页面的作者和提供页面的内容描述是很有用的 。</p> <pre class="brush:php;toolbar:false"><meta name="author" content="Chris Mills"> <meta name="description" content="The MDN Learning Area aims to provide complete beginners to the Web with all they need to know to get started with developing web sites and applications."></pre> <ul class=" list-paddingleft-2"><li><p>指定作者在某些情况下是很有用的:如果你需要联系页面的作者,问一些关于页面内容的问题。<br>  一些内容管理系统能够自动获取页面作者的信息,然后用于某种目的。<br>  指定包含关于页面内容的关键字的页面内容的描述是很有用的,因为它可能或让你的页面在搜索引擎的相关的搜索出现得更多 (这些行为术语上被称为<br>  Search Engine Optimization, or SEO.)</p></li></ul> <h2 id="在你的站点增加自定义图标">在你的站点增加自定义图标</h2> <pre class="brush:php;toolbar:false"><link rel="shortcut icon" href="favicon.ico" type="image/x-icon"></pre> <h2 id="在HTML中应用CSS和JavaScript">在HTML中应用CSS和JavaScript</h2> <pre class="brush:php;toolbar:false"><link rel="stylesheet" href="my-css-file.css"></pre> <ul class=" list-paddingleft-2"><li><p><link> 元素经常位于文档的头部,它有2个属性, rel="stylesheet",表明这是文档的样式表,而<br>  href,包含了样式表文件的路径。</p></li></ul> <pre class="brush:php;toolbar:false"><script src="my-js-file.js"></script></pre> <ul class=" list-paddingleft-2"><li><p><script> 部分没必要非要放在文档头部; 实际上,把它放在文档的尾部(在 </body>标签之前)是一个更好的选择<br>  ,这样可以确保在加载脚本之前浏览器已经解析了HTML内容(如果脚本加载某个不存在的元素,浏览器会报错)。</p></li></ul> <h2 id="为文档设定主语言">为文档设定主语言</h2> <pre class="brush:php;toolbar:false"><html lang="en-US"></pre> <ul class=" list-paddingleft-2"><li><p>这在很多方面都很有用。如果你的HTML文档的语言设置好了,那么你的HTML文档就会被搜索引擎更有效地索引<br>  (例如,允许它在特定于语言的结果中正确显示),对于那些使用屏幕阅读器的视障人士也很有用(比如,<br>  法语和英语中都有“six”这个单词,但是发音却完全不同)。</p></li></ul> <p class="post-topheader custom- pt0">相关推荐:</p> <p class="post-topheader custom- pt0"><a href="//m.sbmmt.com/html5-tutorial-407893.html" target="_blank" title="Html5中video标签的用法:如何自动填充满父div标签">Html5中video标签的用法:如何自动填充满父div标签</a></p> <p class="post-topheader custom- pt0"><a href="//m.sbmmt.com/div-tutorial-408203.html" target="_blank" title="html提交按钮标签代码是什么,怎么使用?(示例)">html提交按钮标签代码是什么,怎么使用?(示例)</a></p> <p class="post-topheader custom- pt0"><a href="//m.sbmmt.com/div-tutorial-408104.html" target="_blank" title="html页面中友情链接怎么进行添加设置?(代码示例)">html页面中友情链接怎么进行添加设置?(代码示例)</a></p><p>Atas ialah kandungan terperinci 什么是head标签 ?html中head标签的介绍. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!</p> </div> </div> <div class="wzconShengming_sp"> <div class="bzsmdiv_sp">Kenyataan Laman Web ini</div> <div>Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn</div> </div> </div> <ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-5902227090019525" data-ad-slot="2507867629"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <div class="AI_ToolDetails_main4sR"> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-5902227090019525" data-ad-slot="3653428331" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <!-- <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hotarticle2.png" alt="" /> <h2>Artikel Panas</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="//m.sbmmt.com/ms/faq/1796836699.html" title="Panduan Suhu Rimworld Odyssey untuk Kapal dan Gravtech" class="phpgenera_Details_mainR4_bottom_title">Panduan Suhu Rimworld Odyssey untuk Kapal dan Gravtech</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 minggu yang lalu</span> <span>By Jack chen</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="//m.sbmmt.com/ms/faq/1796834553.html" title="Mejiro Ryan Build Guide | Uma Musume Pretty Derby" class="phpgenera_Details_mainR4_bottom_title">Mejiro Ryan Build Guide | Uma Musume Pretty Derby</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>1 bulan yang lalu</span> <span>By Jack chen</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="//m.sbmmt.com/ms/faq/1796836084.html" title="Rimworld Odyssey Cara Ikan" class="phpgenera_Details_mainR4_bottom_title">Rimworld Odyssey Cara Ikan</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4 minggu yang lalu</span> <span>By Jack chen</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="//m.sbmmt.com/ms/faq/1796835610.html" title="Apakah had transaksi untuk pengguna asing di Alipay?" class="phpgenera_Details_mainR4_bottom_title">Apakah had transaksi untuk pengguna asing di Alipay?</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4 minggu yang lalu</span> <span>By 下次还敢</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="//m.sbmmt.com/ms/faq/1796834693.html" title="Bagaimana cara menyelesaikan masalah 'sambungan ditolak'?" class="phpgenera_Details_mainR4_bottom_title">Bagaimana cara menyelesaikan masalah 'sambungan ditolak'?</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>1 bulan yang lalu</span> <span>By 百草</span> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="//m.sbmmt.com/ms/article.html">Tunjukkan Lagi</a> </div> </div> </div> --> <div class="phpgenera_Details_mainR3"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hottools2.png" alt="" /> <h2>Alat AI Hot</h2> </div> <div class="phpgenera_Details_mainR3_bottom"> <div class="phpmain_tab2_mids_top"> <a href="//m.sbmmt.com/ms/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173410641626608.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undress AI Tool" /> </a> <div class="phpmain_tab2_mids_info"> <a href="//m.sbmmt.com/ms/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_title"> <h3>Undress AI Tool</h3> </a> <p>Gambar buka pakaian secara percuma</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="//m.sbmmt.com/ms/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411540686492.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undresser.AI Undress" /> </a> <div class="phpmain_tab2_mids_info"> <a href="//m.sbmmt.com/ms/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_title"> <h3>Undresser.AI Undress</h3> </a> <p>Apl berkuasa AI untuk mencipta foto bogel yang realistik</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="//m.sbmmt.com/ms/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411552797167.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="AI Clothes Remover" /> </a> <div class="phpmain_tab2_mids_info"> <a href="//m.sbmmt.com/ms/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_title"> <h3>AI Clothes Remover</h3> </a> <p>Alat AI dalam talian untuk mengeluarkan pakaian daripada foto.</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="//m.sbmmt.com/ms/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411529149311.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Clothoff.io" /> </a> <div class="phpmain_tab2_mids_info"> <a href="//m.sbmmt.com/ms/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_title"> <h3>Clothoff.io</h3> </a> <p>Penyingkiran pakaian AI</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="//m.sbmmt.com/ms/ai/video-swap" title="Video Face Swap" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173414504068133.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Video Face Swap" /> </a> <div class="phpmain_tab2_mids_info"> <a href="//m.sbmmt.com/ms/ai/video-swap" title="Video Face Swap" class="phpmain_tab2_mids_title"> <h3>Video Face Swap</h3> </a> <p>Tukar muka dalam mana-mana video dengan mudah menggunakan alat tukar muka AI percuma kami!</p> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="//m.sbmmt.com/ms/ai">Tunjukkan Lagi</a> </div> </div> </div> <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hotarticle2.png" alt="" /> <h2>Artikel Panas</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="//m.sbmmt.com/ms/faq/1796836699.html" title="Panduan Suhu Rimworld Odyssey untuk Kapal dan Gravtech" class="phpgenera_Details_mainR4_bottom_title">Panduan Suhu Rimworld Odyssey untuk Kapal dan Gravtech</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 minggu yang lalu</span> <span>By Jack chen</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="//m.sbmmt.com/ms/faq/1796834553.html" title="Mejiro Ryan Build Guide | Uma Musume Pretty Derby" class="phpgenera_Details_mainR4_bottom_title">Mejiro Ryan Build Guide | Uma Musume Pretty Derby</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>1 bulan yang lalu</span> <span>By Jack chen</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="//m.sbmmt.com/ms/faq/1796836084.html" title="Rimworld Odyssey Cara Ikan" class="phpgenera_Details_mainR4_bottom_title">Rimworld Odyssey Cara Ikan</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4 minggu yang lalu</span> <span>By Jack chen</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="//m.sbmmt.com/ms/faq/1796835610.html" title="Apakah had transaksi untuk pengguna asing di Alipay?" class="phpgenera_Details_mainR4_bottom_title">Apakah had transaksi untuk pengguna asing di Alipay?</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4 minggu yang lalu</span> <span>By 下次还敢</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="//m.sbmmt.com/ms/faq/1796834693.html" title="Bagaimana cara menyelesaikan masalah 'sambungan ditolak'?" class="phpgenera_Details_mainR4_bottom_title">Bagaimana cara menyelesaikan masalah 'sambungan ditolak'?</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>1 bulan yang lalu</span> <span>By 百草</span> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="//m.sbmmt.com/ms/article.html">Tunjukkan Lagi</a> </div> </div> </div> <div class="phpgenera_Details_mainR3"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hottools2.png" alt="" /> <h2>Alat panas</h2> </div> <div class="phpgenera_Details_mainR3_bottom"> <div class="phpmain_tab2_mids_top"> <a href="//m.sbmmt.com/ms/toolset/development-tools/92" title="Notepad++7.3.1" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab96f0f39f7357.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="Notepad++7.3.1" /> </a> <div class="phpmain_tab2_mids_info"> <a href="//m.sbmmt.com/ms/toolset/development-tools/92" title="Notepad++7.3.1" class="phpmain_tab2_mids_title"> <h3>Notepad++7.3.1</h3> </a> <p>Editor kod yang mudah digunakan dan percuma</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="//m.sbmmt.com/ms/toolset/development-tools/93" title="SublimeText3 versi Cina" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab97a3baad9677.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3 versi Cina" /> </a> <div class="phpmain_tab2_mids_info"> <a href="//m.sbmmt.com/ms/toolset/development-tools/93" title="SublimeText3 versi Cina" class="phpmain_tab2_mids_title"> <h3>SublimeText3 versi Cina</h3> </a> <p>Versi Cina, sangat mudah digunakan</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="//m.sbmmt.com/ms/toolset/development-tools/121" title="Hantar Studio 13.0.1" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab97ecd1ab2670.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="Hantar Studio 13.0.1" /> </a> <div class="phpmain_tab2_mids_info"> <a href="//m.sbmmt.com/ms/toolset/development-tools/121" title="Hantar Studio 13.0.1" class="phpmain_tab2_mids_title"> <h3>Hantar Studio 13.0.1</h3> </a> <p>Persekitaran pembangunan bersepadu PHP yang berkuasa</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="//m.sbmmt.com/ms/toolset/development-tools/469" title="Dreamweaver CS6" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58d0e0fc74683535.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="Dreamweaver CS6" /> </a> <div class="phpmain_tab2_mids_info"> <a href="//m.sbmmt.com/ms/toolset/development-tools/469" title="Dreamweaver CS6" class="phpmain_tab2_mids_title"> <h3>Dreamweaver CS6</h3> </a> <p>Alat pembangunan web visual</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="//m.sbmmt.com/ms/toolset/development-tools/500" title="SublimeText3 versi Mac" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58d34035e2757995.png?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3 versi Mac" /> </a> <div class="phpmain_tab2_mids_info"> <a href="//m.sbmmt.com/ms/toolset/development-tools/500" title="SublimeText3 versi Mac" class="phpmain_tab2_mids_title"> <h3>SublimeText3 versi Mac</h3> </a> <p>Perisian penyuntingan kod peringkat Tuhan (SublimeText3)</p> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="//m.sbmmt.com/ms/ai">Tunjukkan Lagi</a> </div> </div> </div> <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hotarticle2.png" alt="" /> <h2>Topik panas</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="//m.sbmmt.com/ms/faq/laravel-tutori" title="Tutorial Laravel" class="phpgenera_Details_mainR4_bottom_title">Tutorial Laravel</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>1602</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>29</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="//m.sbmmt.com/ms/faq/php-tutorial" title="Tutorial PHP" class="phpgenera_Details_mainR4_bottom_title">Tutorial PHP</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>1504</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>276</span> </div> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="//m.sbmmt.com/ms/faq/zt">Tunjukkan Lagi</a> </div> </div> </div> </div> </div> <div class="Article_Details_main2"> <div class="phpgenera_Details_mainL4"> <div class="phpmain1_2_top"> <a href="javascript:void(0);" class="phpmain1_2_top_title">Related knowledge<img src="/static/imghw/index2_title2.png" alt="" /></a> </div> <div class="phpgenera_Details_mainL4_info"> <div class="phphistorical_Version2_mids"> <a href="//m.sbmmt.com/ms/faq/1796849181.html" title="Mengapa gambar saya tidak muncul dalam html?" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/001/431/639/175363969291498.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Mengapa gambar saya tidak muncul dalam html?" /> </a> <a href="//m.sbmmt.com/ms/faq/1796849181.html" title="Mengapa gambar saya tidak muncul dalam html?" class="phphistorical_Version2_mids_title">Mengapa gambar saya tidak muncul dalam html?</a> <span class="Articlelist_txts_time">Jul 28, 2025 am 02:08 AM</span> <p class="Articlelist_txts_p">Imej tidak dipaparkan biasanya disebabkan oleh laluan fail yang salah, nama fail atau lanjutan yang salah, isu sintaks HTML, atau cache penyemak imbas. 1. Pastikan laluan SRC selaras dengan lokasi sebenar fail dan gunakan laluan relatif yang betul; 2. Periksa sama ada kes fail dan sambungan sepadan dengan tepat, dan sahkan sama ada imej boleh dimuatkan dengan terus memasukkan URL; 3. Periksa sama ada sintaks tag IMG adalah betul, pastikan tiada aksara yang berlebihan dan nilai atribut alt sesuai; 4. Penyelesaian masalah dalam pesanan ini dapat menyelesaikan masalah paparan imej HTML.</p> </div> <div class="phphistorical_Version2_mids"> <a href="//m.sbmmt.com/ms/faq/1796848580.html" title="Tag html penting untuk pemula" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/001/253/068/175355915289670.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Tag html penting untuk pemula" /> </a> <a href="//m.sbmmt.com/ms/faq/1796848580.html" title="Tag html penting untuk pemula" class="phphistorical_Version2_mids_title">Tag html penting untuk pemula</a> <span class="Articlelist_txts_time">Jul 27, 2025 am 03:45 AM</span> <p class="Articlelist_txts_p">Untuk memulakan dengan HTML dengan cepat, anda hanya perlu menguasai beberapa tag asas untuk membina rangka web. 1. Struktur halaman adalah penting, dan, yang merupakan elemen akar, mengandungi maklumat meta, dan merupakan kawasan paparan kandungan. 2. Gunakan tajuk. Semakin tinggi tahap, semakin kecil nombor. Gunakan tag untuk segmen teks untuk mengelakkan melangkau tahap. 3. Pautan menggunakan tag dan sepadan dengan atribut HREF, dan imej menggunakan tag dan mengandungi atribut SRC dan ALT. 4. Senarai ini dibahagikan kepada senarai yang tidak teratur dan senarai yang diperintahkan. Setiap entri diwakili dan mesti bersarang dalam senarai. 5. Pemula tidak perlu memaksa menghafal semua tag. Lebih cekap untuk menulis dan memeriksa mereka semasa anda menulis. Menguasai struktur, teks, pautan, gambar dan senarai untuk membuat laman web asas.</p> </div> <div class="phphistorical_Version2_mids"> <a href="//m.sbmmt.com/ms/faq/1796847511.html" title="HTML `Style` Tag: inline vs. CSS dalaman" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/001/253/068/175348579170092.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="HTML `Style` Tag: inline vs. CSS dalaman" /> </a> <a href="//m.sbmmt.com/ms/faq/1796847511.html" title="HTML `Style` Tag: inline vs. CSS dalaman" class="phphistorical_Version2_mids_title">HTML `Style` Tag: inline vs. CSS dalaman</a> <span class="Articlelist_txts_time">Jul 26, 2025 am 07:23 AM</span> <p class="Articlelist_txts_p">Kaedah penempatan gaya perlu dipilih mengikut tempat kejadian. 1. Dalam talian sesuai untuk pengubahsuaian sementara unsur tunggal atau kawalan JS dinamik, seperti perubahan warna butang dengan operasi; 2. CSS dalaman sesuai untuk projek dengan beberapa halaman dan struktur mudah, yang mudah untuk pengurusan gaya berpusat, seperti tetapan gaya asas halaman log masuk; 3. Keutamaan diberikan untuk menggunakan semula, penyelenggaraan dan prestasi, dan lebih baik untuk memecah fail CSS pautan luaran untuk projek besar.</p> </div> <div class="phphistorical_Version2_mids"> <a href="//m.sbmmt.com/ms/faq/1796848665.html" title="Bolehkah anda meletakkan tag di dalam tag yang lain?" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/001/431/639/175356093168643.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Bolehkah anda meletakkan tag di dalam tag yang lain?" /> </a> <a href="//m.sbmmt.com/ms/faq/1796848665.html" title="Bolehkah anda meletakkan tag di dalam tag yang lain?" class="phphistorical_Version2_mids_title">Bolehkah anda meletakkan tag di dalam tag yang lain?</a> <span class="Articlelist_txts_time">Jul 27, 2025 am 04:15 AM</span> <p class="Articlelist_txts_p">❌youcannotnesttagsinsideanothertagbecauseit'sinvalidhtml; browsersautomomatikclosethefirstbeforeopeningthenext, drectinginseparateParagraphs.instead, useinlineelements,</p> </div> <div class="phphistorical_Version2_mids"> <a href="//m.sbmmt.com/ms/faq/1796848661.html" title="Apakah atribut nama dalam tag input?" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/001/431/639/175356085114523.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Apakah atribut nama dalam tag input?" /> </a> <a href="//m.sbmmt.com/ms/faq/1796848661.html" title="Apakah atribut nama dalam tag input?" class="phphistorical_Version2_mids_title">Apakah atribut nama dalam tag input?</a> <span class="Articlelist_txts_time">Jul 27, 2025 am 04:14 AM</span> <p class="Articlelist_txts_p">Thenameattributeinaninputtagisusedtoidentifytheinputwhentheformissubmitted;itservesasthekeyinthekey-valuepairsenttotheserver,wheretheuser'sinputisthevalue.1.Whenaformissubmitted,thenameattributebecomesthekeyandtheinputvaluebecomesthevalueinthedatasen</p> </div> <div class="phphistorical_Version2_mids"> <a href="//m.sbmmt.com/ms/faq/1796851777.html" title="Bagaimana untuk membuat senarai yang tidak teratur dalam HTML?" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/001/431/639/175382222111469.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Bagaimana untuk membuat senarai yang tidak teratur dalam HTML?" /> </a> <a href="//m.sbmmt.com/ms/faq/1796851777.html" title="Bagaimana untuk membuat senarai yang tidak teratur dalam HTML?" class="phphistorical_Version2_mids_title">Bagaimana untuk membuat senarai yang tidak teratur dalam HTML?</a> <span class="Articlelist_txts_time">Jul 30, 2025 am 04:50 AM</span> <p class="Articlelist_txts_p">Untuk membuat senarai HTML yang tidak teratur, anda perlu menggunakan tag untuk menentukan bekas senarai. Setiap item senarai dibalut dengan tag, dan penyemak imbas secara automatik akan menambah peluru; 1. Buat senarai dengan tag; 2. Setiap item senarai ditakrifkan dengan tag; 3. Penyemak imbas secara automatik menjana simbol titik lalai; 4. Sublists boleh dilaksanakan melalui bersarang; 5. Gunakan atribut jenis gaya CSS untuk mengubah suai gaya simbol, seperti cakera, bulatan, persegi, atau tidak; Gunakan tag ini dengan betul untuk menghasilkan senarai yang tidak teratur standard.</p> </div> <div class="phphistorical_Version2_mids"> <a href="//m.sbmmt.com/ms/faq/1796849233.html" title="Bagaimana untuk menggunakan atribut contentedable?" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/001/431/639/175364067270391.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Bagaimana untuk menggunakan atribut contentedable?" /> </a> <a href="//m.sbmmt.com/ms/faq/1796849233.html" title="Bagaimana untuk menggunakan atribut contentedable?" class="phphistorical_Version2_mids_title">Bagaimana untuk menggunakan atribut contentedable?</a> <span class="Articlelist_txts_time">Jul 28, 2025 am 02:24 AM</span> <p class="Articlelist_txts_p">TheContentititableatTributeMakesanyhtmleLementedByDdingContentedied boleh</p> </div> <div class="phphistorical_Version2_mids"> <a href="//m.sbmmt.com/ms/faq/1796851820.html" title="Kepentingan HTML semantik untuk SEO dan kebolehcapaian" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/001/253/068/175382310285254.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Kepentingan HTML semantik untuk SEO dan kebolehcapaian" /> </a> <a href="//m.sbmmt.com/ms/faq/1796851820.html" title="Kepentingan HTML semantik untuk SEO dan kebolehcapaian" class="phphistorical_Version2_mids_title">Kepentingan HTML semantik untuk SEO dan kebolehcapaian</a> <span class="Articlelist_txts_time">Jul 30, 2025 am 05:05 AM</span> <p class="Articlelist_txts_p">Semantichtmlimprovesbothseoandaccessibilitybyingingmeaningfultagsthatconveycontentstructure.1) itenhancesseothroughbettercontenthierarchywithproperheadinglevels, ImprovedIndexingViaelementsLikeAnd, andsupportforrichssoShorseShorseShorseShorseSnipsoSnipsOringsAnpetAnd</p> </div> </div> <a href="//m.sbmmt.com/ms/web-designer.html" class="phpgenera_Details_mainL4_botton"> <span>See all articles</span> <img src="/static/imghw/down_right.png" alt="" /> </a> </div> </div> </div> </main> <footer> <div class="footer"> <div class="footertop"> <img src="/static/imghw/logo.png" alt=""> <p>Latihan PHP dalam talian kebajikan awam,Bantu pelajar PHP berkembang dengan cepat!</p> </div> <div class="footermid"> <a href="//m.sbmmt.com/ms/about/us.html">Tentang kita</a> <a href="//m.sbmmt.com/ms/about/disclaimer.html">Penafian</a> <a href="//m.sbmmt.com/ms/update/article_0_1.html">Sitemap</a> </div> <div class="footerbottom"> <p> © php.cn All rights reserved </p> </div> </div> </footer> <input type="hidden" id="verifycode" value="/captcha.html"> <script>layui.use(['element', 'carousel'], function () {var element = layui.element;$ = layui.jquery;var carousel = layui.carousel;carousel.render({elem: '#test1', width: '100%', height: '330px', arrow: 'always'});$.getScript('/static/js/jquery.lazyload.min.js', function () {$("img").lazyload({placeholder: "/static/images/load.jpg", effect: "fadeIn", threshold: 200, skip_invisible: false});});});</script> <script src="/static/js/common_new.js"></script> <script type="text/javascript" src="/static/js/jquery.cookie.js?1754790057"></script> <link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css?2' type='text/css' media='all' /> <script type='text/javascript' src='/static/js/viewer.min.js?1'></script> <script type='text/javascript' src='/static/js/jquery-viewer.min.js'></script> <script type="text/javascript" src="/static/js/global.min.js?5.5.53"></script> <script> var _paq = window._paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function () { var u = "https://tongji.php.cn/"; _paq.push(['setTrackerUrl', u + 'matomo.php']); _paq.push(['setSiteId', '9']); var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; g.async = true; g.src = u + 'matomo.js'; s.parentNode.insertBefore(g, s); })(); </script> <script> // top layui.use(function () { var util = layui.util; util.fixbar({ on: { mouseenter: function (type) { layer.tips(type, this, { tips: 4, fixed: true, }); }, mouseleave: function (type) { layer.closeAll("tips"); }, }, }); }); document.addEventListener("DOMContentLoaded", (event) => { // 定义一个函数来处理滚动链接的点击事件 function setupScrollLink(scrollLinkId, targetElementId) { const scrollLink = document.getElementById(scrollLinkId); const targetElement = document.getElementById(targetElementId); if (scrollLink && targetElement) { scrollLink.addEventListener("click", (e) => { e.preventDefault(); // 阻止默认链接行为 targetElement.scrollIntoView({ behavior: "smooth" }); // 平滑滚动到目标元素 }); } else { console.warn( `Either scroll link with ID '${scrollLinkId}' or target element with ID '${targetElementId}' not found.` ); } } // 使用该函数设置多个滚动链接 setupScrollLink("Article_Details_main1L2s_1", "article_main_title1"); setupScrollLink("Article_Details_main1L2s_2", "article_main_title2"); setupScrollLink("Article_Details_main1L2s_3", "article_main_title3"); setupScrollLink("Article_Details_main1L2s_4", "article_main_title4"); setupScrollLink("Article_Details_main1L2s_5", "article_main_title5"); setupScrollLink("Article_Details_main1L2s_6", "article_main_title6"); // 可以继续添加更多的滚动链接设置 }); window.addEventListener("scroll", function () { var fixedElement = document.getElementById("Article_Details_main1Lmain"); var scrollTop = window.scrollY || document.documentElement.scrollTop; // 兼容不同浏览器 var clientHeight = window.innerHeight || document.documentElement.clientHeight; // 视口高度 var scrollHeight = document.documentElement.scrollHeight; // 页面总高度 // 计算距离底部的距离 var distanceToBottom = scrollHeight - scrollTop - clientHeight; // 当距离底部小于或等于300px时,取消固定定位 if (distanceToBottom <= 980) { fixedElement.classList.remove("Article_Details_main1Lmain"); fixedElement.classList.add("Article_Details_main1Lmain_relative"); } else { // 否则,保持固定定位 fixedElement.classList.remove("Article_Details_main1Lmain_relative"); fixedElement.classList.add("Article_Details_main1Lmain"); } }); </script> <script> document.addEventListener('DOMContentLoaded', function() { const mainNav = document.querySelector('.Article_Details_main1Lmain'); const header = document.querySelector('header'); if (mainNav) { window.addEventListener('scroll', function() { const scrollPosition = window.scrollY; if (scrollPosition > 84) { mainNav.classList.add('fixed'); } else { mainNav.classList.remove('fixed'); } }); } }); </script> </body> </html>