Rumah hujung hadapan web html tutorial html中的meta标签是什么?meta标签的属性介绍

html中的meta标签是什么?meta标签的属性介绍

Sep 11, 2018 pm 06:07 PM
html tag meta

本章给大家介绍html中的meta标签是什么?meta标签的属性介绍。有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助。

什么是meta标签? 

      meta标签是html标记head区的一个关键标签,它位于HTML文档的和之间(有些也不是在<head>和<title>之间)。它提供的信息虽然用户不可见,但却是文档的最基本的元信息。meta标签用来描述一个HTML网页文档的属性,例如作者、日期和时间、网页描述、关键词、页面刷新等。</p> <p>注:元信息是关于信息的信息,元信息允许服务器提供所发送数据的信息,如http可以提高所发的对象语言和对象,也可以用元信息来实现有条件请求以及报告事务完成。收到数据的浏览器可以根据元信息确定服务器发来的是什么内容,预料有什么数据,确知是否接收完整的数据,以及过程中是否出错,这样客户就可以知道传输对象的类型。</p> <p><span style="font-size: 18px;"><strong>meta标签的属性有哪些? </strong></span></p> <p> <img src="/static/imghw/default1.png" data-src="https://img.php.cn//upload/image/402/350/428/1536659975962189.jpg" class="lazy" title="1536659975962189.jpg" alt="1.jpg"></p> <p><strong>属性详解:</strong></p> <p>1.http-equiv</p> <p>相当于http的文件头作用,它可以向浏览器传回一些有用的信息,以帮助浏览器正确地显示网页内容。</p> <p>语法:<meta http-equiv="参数" content="参数值"></p> <p>参数:</p> <p>1) content-Type(设定页面使用的字符集)</p><pre class='brush:php;toolbar:false;'><metahttp-equiv="content-Type" content="text/html;charset=gb2312"></pre><p>http-equiv=Content-Type代表的是HTTP的头部协议,提示浏览器网页的信息,</p><p>meta标签的charset的信息参数如GB2312时,代表说明网站是采用的编码是简体中文;</p><p>meta标签的charset的信息参数如BIG5时,代表说明网站是采用的编码是繁体中文;</p><p>meta标签的charset的信息参数如iso-2022-jp时,代表说明网站是采用的编码是日文;</p><p>meta标签的charset的信息参数如ks_c_5601时,代表说明网站是采用的编码是韩文;</p><p>meta标签的charset的信息参数如ISO-8859-1时,代表说明网站是采用的编码是英文;</p><p>meta标签的charset的信息参数如UTF-8时,代表世界通用的语言编码;</p><p>2) content-Language(显示语言的设定) </p><pre class='brush:php;toolbar:false;'><meta http-equiv="Content-Language" content="zh-cn"/></pre><p>3) Expires(期限,可以用于设定网页的到期时间。一旦网页过期,必须到服务器上重新传输)</p><pre class='brush:php;toolbar:false;'><meta http-equiv="expires" content="Fri,12Jan200118:18:18GMT"></pre><p>注意:必须使用GMT的时间格式。</p><p>4) Pragma(cache模式,禁止浏览器从本地计算机的缓存中访问页面内容)</p><pre class='brush:php;toolbar:false;'><meta http-equiv="Pragma" content="no-cache"></pre><p>注意:这样设定,访问者将无法脱机浏览。</p><p>5) cache-control(缓存设置)</p><pre class='brush:php;toolbar:false;'><meta http-equiv="cache-control" content="no-cache"></pre><p>请求时的缓存指令包括no-cache、no-store、max-age、max-stale、min-fresh、only-if-cached,响应消息中的指令包括public、private、no-cache、no-store、no-transform、must-revalidate、proxy-revalidate、max-age。各个消息中的指令含义如下:</p><p>Public指示响应可被任何缓存区缓存</p><p>Private指示对于单个用户的整个或部分响应消息,不能被共享缓存处理。这允许服务器仅仅描述当用户的部分响应消息,此响应消息对于其他用户的请求无效</p><p>no-cache指示请求或响应消息不能缓存</p><p>no-store用于防止重要的信息被无意的发布。在请求消息中发送将使得请求和响应消息都不使用缓存。</p><p>max-age指示客户机可以接收生存期不大于指定时间(以秒为单位)的响应</p><p>min-fresh指示客户机可以接收响应时间小于当前时间加上指定时间的响应</p><p>max-stale指示客户机可以接收超出超时期间的响应消息。如果指定max-stale消息的值,那么客户机可以接收超出超时期指定值之内的响应消息。</p><p>6) Refresh(自动刷新并指向新页面)</p><pre class='brush:php;toolbar:false;'><meta http-equiv="Refresh" content="2; URL=http://www.baidu.com"> //(注意后面的引号,分别在秒数的前面和网址的后面)</pre><p>注意:其中的2是指停留2秒钟后自动刷新到URL网址。</p><p>7) Window-target(强制页面在当前窗口以独立页面显示)<br/></p><pre class='brush:php;toolbar:false;'><meta http-equiv="Window-target" content="_top"></pre><p>注意:用来防止别人在框架里调用自己的页面。</p><p>8) set-cookie(cookie设定,如果网页过期,那么存盘的cookie将被删除)</p><pre class='brush:php;toolbar:false;'><meta http-equiv="Set-Cookie" content="cookie value=xxx; expires=Friday,12-Jan-200118:18:18GMT;path=/"></pre><p> 通常强制要求浏览器不设置缓存重新从服务器获取页面会使用下面的方式:</p><pre class='brush:php;toolbar:false;'><meta http-equiv=”pragma” content=”no-cache”> <meta http-equiv=”cache-control” content=”no-cache”> <meta http-equiv=”expires” content=”0″></pre><p><strong>2.name属性</strong></p><p> name属性主要用于描述网页,与之对应的属性值为content,content中的内容主要是便于搜索引擎机器人查找信息和分类信息用的。</p><p> 语法:</p><pre class='brush:php;toolbar:false;'><meta name="参数" content="具体的参数值"></pre><p>Keywords(关键字)</p><p>说明:keywords用来告诉搜索引擎你网页的关键字是什么。</p><pre class='brush:php;toolbar:false;'><meta name="keywords" content=""></pre><p>description(网站内容描述)</p><p>说明:description用来告诉搜索引擎你的网站主要内容。</p><pre class='brush:php;toolbar:false;'><metaname="description" content=""></pre><p>robots(机器人向导)</p><p>说明:Meta robots标签管理着搜索引擎是否可以进入网页,你可以用它来允许或不允许搜索引擎来获取你的网页、进入你网页中的子链接或对你的网页存档。content的参数有all,none,index,noindex,follow,nofollow。默认是all。</p><pre class='brush:php;toolbar:false;'><metaname="robots" content="none"></pre><p>具体参数如下:</p><p>信息参数为all:文件将被检索,且页面上的链接可以被查询;</p><p>信息参数为none:文件将不被检索,且页面上的链接不可以被查询;</p><p>信息参数为index:文件将被检索;</p><p>信息参数为follow:页面上的链接可以被查询;</p><p>信息参数为noindex:文件将不被检索,但页面上的链接可以被查询;</p><p>信息参数为nofollow:文件将被检索,但页面上的链接不可以被查询;</p><p>author(作者)</p><p>说明:标注网页的作者</p><pre class='brush:php;toolbar:false;'><metaname="author" content="jesse131work@163.com"></pre><p>generator</p><p>说明:meta标签的generator的信息参数,代表说明网站的采用的什么软件制作。</p><pre class='brush:php;toolbar:false;'><metaname="generator" content="信息参数"/></pre><p>copyright</p><p>  说明:meta标签的copyright的信息参数,代表说明网站版权信息。</p><pre class='brush:php;toolbar:false;'><metaname="copyright" content="信息参数"></pre><p>revisit-after</p><p>  说明:revisit-after代表网站重访,7days代表7天,依此类推,假如我设置,那这样搜索引擎就是7天来一次。使用这个标签的网站,通常是因为网站数据量非常大,被搜索引擎过 于频繁的抓取,会占用过大的资源,影响网站的访问。所以,希望搜索引擎不要天天过来,抓取过一次了,那么等7天后再来。一般的网站是不需要这个标签的。</p><p><meta name="revisit-after" content="7days"></p><p>view-point</p><p>  说明:主要影响移动页面布局</p><pre class='brush:php;toolbar:false;'><meta name="viewport" content="width=device-width, initial-scale=1.0"></pre><p>content 参数:</p><p>width viewport 宽度(数值/device-width)</p><p>height viewport 高度(数值/device-height)</p><p>initial-scale 初始缩放比例</p><p>maximum-scale 最大缩放比例</p><p>minimum-scale 最小缩放比例</p><p>user-scalable 是否允许用户缩放(yes/no)</p><p><strong>3.content属性</strong></p><p> content属性一般与name和http-equiv属性一起用,视它们的值而定。</p><p><strong>4.charset属性</strong></p><p>charset属性,是html5的属性,可替换<metahttp-equiv="content-Type" content="text/html;charset=gb2312">设置为<meta charset="utf-8"></p><p>设置meta属性的作用是什么?</p><p> meta标签提供关于HTML文档的元数据。元数据不会显示在页面上,但是对于机器是可读的。它可用于浏览器(如何显示内容或重新加载页面),搜索引擎(关键词),或其他 web 服务。meta标签可用于缓存设置,还与SEO优化相关。SEO是指通过采用易于搜索引擎索引的合理手段,使网站各项基本要素适合搜索引擎检索原则并且对用户更友好(Search Engine Friendly),从而更容易被搜索引擎收录及优先排序从属于SEM(搜索引擎营销)。通俗理解是:通过总结搜索引擎的排名规律,对网站进行合理优化,使你的网站在百度和goog的排名提高,让搜索引擎给你带来客户。</p><p> seo优化常用语句如下</p><pre class='brush:php;toolbar:false;'><!-- 页面标题<title>标签(head 头部必须) --> <title>your title</title> <!-- 页面关键词 keywords --> <meta name="keywords" content="your keywords"> <!-- 页面描述内容 description --> <meta name="description" content="your description"> <!-- 定义网页作者 author --> <meta name="author" content="author,email address"> <!-- 定义网页搜索引擎索引方式,robotterms 是一组使用英文逗号「,」分割的值,通常有如下几种取值:none,noindex,nofollow,all,index和follow。 --> <meta name="robots" content="index,follow"></pre><p>Atas ialah kandungan terperinci html中的meta标签是什么?meta标签的属性介绍. 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>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/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>1 bulan 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>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/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>1 bulan 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>1505</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/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/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/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 class="phphistorical_Version2_mids"> <a href="//m.sbmmt.com/ms/faq/1796856512.html" title="Apakah tujuan atribut REL dalam tag pautan 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/175421100220698.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Apakah tujuan atribut REL dalam tag pautan dalam HTML?" /> </a> <a href="//m.sbmmt.com/ms/faq/1796856512.html" title="Apakah tujuan atribut REL dalam tag pautan dalam HTML?" class="phphistorical_Version2_mids_title">Apakah tujuan atribut REL dalam tag pautan dalam HTML?</a> <span class="Articlelist_txts_time">Aug 03, 2025 pm 04:50 PM</span> <p class="Articlelist_txts_p">rel = "stylesheet" linkscssfilesforstylingthepage; 2.rel = "preload" hintStopreloadcriticalResourcesforperformance; 3.rel = "ikon" setSthewebsite'sfavicon; 4.rel = "alternate" menyediakan</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?1754897891"></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><script>(function(){function c(){var b=a.contentDocument||a.contentWindow.document;if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'96d6126ddd542314',t:'MTc1NDg5Nzg5Mi4wMDAwMDA='};var a=document.createElement('script');a.nonce='';a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();</script>