aboutsummaryrefslogtreecommitdiff
path: root/files/zh-tw/web_開發
diff options
context:
space:
mode:
authorFlorian Merz <me@fiji-flo.de>2021-02-11 13:12:08 +0100
committerFlorian Merz <me@fiji-flo.de>2021-02-11 13:12:08 +0100
commit43a5cac2eff22c21071800e13bef12af9d3a37d0 (patch)
treef6e91f8aa958f15bd0b0aabf7b8dfc09063eceda /files/zh-tw/web_開發
parent8260a606c143e6b55a467edf017a56bdcd6cba7e (diff)
downloadtranslated-content-43a5cac2eff22c21071800e13bef12af9d3a37d0.tar.gz
translated-content-43a5cac2eff22c21071800e13bef12af9d3a37d0.tar.bz2
translated-content-43a5cac2eff22c21071800e13bef12af9d3a37d0.zip
unslug zh-tw: move
Diffstat (limited to 'files/zh-tw/web_開發')
-rw-r--r--files/zh-tw/web_開發/historical_artifacts_to_avoid/index.html90
-rw-r--r--files/zh-tw/web_開發/index.html16
2 files changed, 0 insertions, 106 deletions
diff --git a/files/zh-tw/web_開發/historical_artifacts_to_avoid/index.html b/files/zh-tw/web_開發/historical_artifacts_to_avoid/index.html
deleted file mode 100644
index 29c2532f6f..0000000000
--- a/files/zh-tw/web_開發/historical_artifacts_to_avoid/index.html
+++ /dev/null
@@ -1,90 +0,0 @@
----
-title: 應該避免的過時語法
-slug: Web_開發/Historical_artifacts_to_avoid
-translation_of: Learn/HTML/Introduction_to_HTML
-translation_of_original: Web/Guide/HTML/Obsolete_things_to_avoid
----
-<h2 id="介紹">介紹</h2>
-
-<p>許多人藉由觀看原始碼,然後複製貼上來學習 HTML、CSS 及 JavaScript。然而他們並沒有考慮到原本的網站,是否正確實做過。這意味著他們延續了一些過去必要,但現在不需要的程式慣例。這篇文章就是要列出那些隨著時間,變得不必要、或糟糕的程式語法。</p>
-
-<h2 id="Doctype">Doctype</h2>
-
-<p>大約有十來種 <a class="external" href="http://en.wikipedia.org/wiki/Document_Type_Declaration">(X)HTML文件類型描述(doctype)</a>,他們之間的差異非常細微(甚至沒差別),我們建議你使用以下 HTML5 的文件類型宣告:</p>
-
-<pre>&lt;!DOCTYPE html&gt;</pre>
-
-<p>如此會觸發所有瀏覽器使用標準模式(甚至包含 Internet Explorer 6)。</p>
-
-<h2 id="&lt;meta>_元素與_charset_屬性"><code>&lt;meta&gt;</code> 元素與 <code>charset</code> 屬性</h2>
-
-<p>如同以下的原始碼寫法並不少見:</p>
-
-<pre>&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;</pre>
-
-<p>然而,就算你把它縮減成這樣,所有的瀏覽器還是會做出相同判定(甚至包括Internet Explorer 6):</p>
-
-<pre>&lt;meta charset="UTF-8" /&gt;
-</pre>
-
-<p>這些知識已經透過<a href="https://blog.whatwg.org/the-road-to-html-5-character-encoding">逆向工程(reverse engineering)</a>與<a href="http://lists.w3.org/Archives/Public/public-html/2007Jul/0550.html#replies">實用主義(pragmatism)</a>證實。用就對了。</p>
-
-<h2 id="不存在的_&lt;meta>_元素">不存在的 <code>&lt;meta&gt;</code> 元素</h2>
-
-<p>許多被棄用或不標準的值,常常因為從某個頁面被複製到另個頁面,而延續了它們的利用。儘管這些元件被廣為利用,它們其實不符合規範、也不會有效用。特別是,不要去使用:</p>
-
-<ul>
- <li><code>&lt;meta name="MSSmartTagsPreventParsing" content="true"&gt;</code> 這個只有在其中一個 beta 版的 Internet Explorer 6 是有用處的。這個 beta 版已經不再使用,而且這版本的特色聰明標籤(smart tags)已經被移除,也不會再被加回來。</li>
- <li><code>&lt;meta name="robots" content="all"&gt; </code>雖然 <code>robot</code> 屬性是存在且確實合法的,但請不要去使用根本不存在的值,像是 <code>all</code>。 <code>robots</code> 預設的值為 <code>index, follow</code>,其實這就是你寫的 <code>all</code> 想要做的事。因此請直接移除整個 <code>&lt;meta&gt;</code> 標籤即可。</li>
- <li><code>&lt;meta name="copyright" content="…"&gt; </code> 這個 meta 並不存在。移除它並創建一個版權頁面或 <code>div</code>,或是使用 <code>rel="copyright"</code> 的 {{HTMLElement("link")}} HTML 元素之連結。</li>
- <li><code>&lt;meta name="rating" content="…"&gt; </code> 這個 meta 並不存在。只要移除整個 <code>&lt;meta&gt;</code> 即可。</li>
-</ul>
-
-<h2 id="HTML_腳本的註解">HTML 腳本的註解</h2>
-
-<p>曾經有一段時間有些瀏覽器了解 {{ HTMLElement("script") }} 標籤,但有些則否。這有時導致瀏覽器把應該作為腳本的文字,解讀成純文字。有個自然的想法,使得腳本成為 HTML 的註解。這方法,可以讓能執行腳本的瀏覽器做動、而不了解的瀏覽器忽略。</p>
-
-<p>從這時起,我們繼承了:</p>
-
-<pre>&lt;script&gt;
-&lt;!--
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "bla.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-//--&gt;
-&lt;/script&gt;
-</pre>
-
-<p>或是:</p>
-
-<pre>&lt;script type="text/javascript"&gt;
-&lt;!--//--&gt;&lt;![CDATA[//&gt;&lt;!--
-Blabla.extend(MyFramework.settings, { "basePath": "/" });
-//--&gt;&lt;!]]&gt;
-&lt;/script&gt;
-</pre>
-
-<p>如今,這只會在 strict XML 驗證下,因為註解避開不帶引號標記的誤報,而有所幫助。除此之外,是完全無用的。甚至不執行腳本的瀏覽器,也只會忽略 {{ HTMLElement("script") }} 標籤。簡單起見,只要把你的腳本寫在 {{ HTMLElement("script") }} 的開頭與結尾之間就行。更理想的話,把你的腳本變成獨立的檔案,並透過 {{ htmlattrxref("src", "script") }} 屬性連結。如果你在寫腳本,考慮使用 HTML5 {{ htmlattrxref("async", "script") }} 與 {{ htmlattrxref("defer", "script") }} 屬性。</p>
-
-<h2 id="不應再使用的元素">不應再使用的元素</h2>
-
-<h3 id="font_basefont"><a href="/zh-TW/docs/Web/HTML/Element/font">font</a>, <a href="/zh-TW/docs/Web/HTML/Element/basefont">basefont</a></h3>
-
-<p>這些元素不應再使用。針對元素排版外觀,應當優先考慮 CSS,並藉由元素、ID、或 class 屬性控制目標。</p>
-
-<h3 id="b_i_u">b, i, u</h3>
-
-<p>這些往往比較有爭議,但是當有相應的話,盡量去使用個別的 {{ HTMLElement("strong") }}、{{ HTMLElement("em") }} 或是 {{ HTMLElement("span") }} 和 CSS (<code>text-decoration:underline</code>)。</p>
-
-<p>斟酌考慮使用哪個元素。有些以發展為導向的頁面,建議以簡單的 {{ HTMLElement("strong") }} 取代 {{ HTMLElement("b") }}、還有 {{ HTMLElement("em") }} 取代 {{ HTMLElement("i") }}。<strong>遵從這個建議不是好主意。</strong>{{ HTMLElement("strong") }} 是用作強調陳述,而 {{ HTMLElement("em") }} 只是加粗文字。例如,使用 {{ HTMLElement("em") }} 去簡單完成斜體不是好主意。非強調的斜體文字可以透過你頁面 CSS 的 <code>font-style:italic</code> 完成。類似的,書的標題和藝術作品傳統上都被轉成斜體,但針對這些東西使用 {{ HTMLElement("cite") }} 元素可以給出比 {{ HTMLElement("em") }} 或 {{ HTMLElement("i") }} 更語意的標記。</p>
-
-<h3 id="acronym"><a href="/zh-TW/docs/Web/HTML/Element/acronym">acronym</a></h3>
-
-<p>acronym 元素不應該再使用。要表示縮寫應當用 {{ HTMLElement("abbr") }}。</p>
-
-<h3 id="tt_xmp"><a href="/zh-TW/docs/Web/HTML/Element/tt">tt</a>, <a href="/zh-TW/docs/Web/HTML/Element/xmp">xmp</a></h3>
-
-<p>不要使用這些元素。要表現出電腦程式碼的片段,使用 {{ HTMLElement("code") }}。要表現出預格式化的文字,使用 {{ HTMLElement("pre") }}。如果只是想要 monospace 字型,在 CSS 使用 <code>font-family: monospace</code>。</p>
-
-<h3 id="applet"><a href="/zh-TW/docs/Web/HTML/Element/applet">applet</a></h3>
-
-<p>這個元素不應再使用。更通用的 {{ HTMLElement("object") }} 才是首選。</p>
diff --git a/files/zh-tw/web_開發/index.html b/files/zh-tw/web_開發/index.html
deleted file mode 100644
index 45d12b6e0f..0000000000
--- a/files/zh-tw/web_開發/index.html
+++ /dev/null
@@ -1,16 +0,0 @@
----
-title: Web 開發
-slug: Web_開發
-translation_of: Web/Guide
-translation_of_original: Web_Development
----
-<p><strong>Web 開發</strong>包括開發 Web 網站或 Web 應用程式的各方面。</p>
-<p>學習如何建立從簡單到複雜、互動性高的 Web 網站,閱讀此處的文章,採用最新 Web 技術。</p>
-<div>
-<table class="mainpage-table"> <tbody> <tr> <td colspan="2"> <h2 id="文件主題">文件主題</h2> </td> </tr> <tr> <td> <dl> <dt><a class="internal" href="/zh_tw/Web_%E9%96%8B%E7%99%BC/Web%E9%96%8B%E7%99%BC%E5%85%A5%E9%96%80" title="zh tw/Web 開發/Web開發入門">Web 開發入門</a></dt> <dd>如何開發 Web 的學習指南。</dd> <dt><a class="internal" href="/zh_tw/HTML" rel="internal" title="zh tw/HTML">HTML</a></dt> <dd>超文字標記語言是建立 Web 頁面和顯示在瀏覽器中的各種文件的基礎語言。</dd> <dt><a class="internal" href="/zh_tw/JavaScript" rel="internal" title="zh tw/JavaScript">JavaScript</a></dt> <dd>JavaScript 是開發 Web 應用程式中最常使用的 Script 語言。也可用於開發以 Mozilla 為基礎的軟體。</dd> <dt><a class="internal" href="/zh_tw/CSS" rel="internal" title="zh tw/CSS">CSS</a></dt> <dd>層疊樣式表使你能在 Web 上安排布局和頁面設計。</dd> <dt><a class="internal" href="/zh_tw/AJAX" rel="internal" title="zh tw/AJAX">AJAX</a></dt> <dd>非同步 JavaScript 和 XML 不是一項技術,而是各種技術的結合。使用 JavaScript 配合各種現代 Web 技術,建立動態 Web 應用程式。</dd> </dl> </td> <td> <dl> <dt><a class="internal" href="/zh_tw/Web_%E6%A8%99%E6%BA%96" title="zh tw/Web 標準">Web 標準</a></dt> <dd>學習如何藉由開放式 Web 和相容性,使你的 Web 網站或應用程式延伸至最大數量的使用者。</dd> <dt><a class="internal" href="/zh_tw/DOM" rel="internal" title="zh tw/DOM">DOM</a></dt> <dd>文件物件模型是用於 HTML 和 XML 的 API,提供文件的結構化表達方式,以改變文件的呈現。</dd> <dt><a class="internal" href="/zh_tw/XHTML" title="zh tw/XHTML">XHTML</a></dt> <dd>可擴展超文字標記語言是一種以 XML 為基礎、類似 HTML 的語言,提供比 HTML 還嚴格的語法。</dd> <dt><a class="internal" href="/zh_tw/SVG" rel="internal" title="zh tw/SVG">SVG</a></dt> <dd>可縮放向量圖形是一種 XML 標記語言,用於描述 2D 向量圖形。</dd> <dt><a class="internal" href="/zh_tw/Mozilla_Web_%E9%96%8B%E7%99%BC%E8%80%85_FAQ" title="zh tw/Mozilla Web 開發者 FAQ">Mozilla Web 開發者 FAQ</a></dt> <dd>來自 Web 開發者的問答集。附有解答!</dd> </dl> <p><span class="alllinks"><a class="internal" href="/Special:Tags?tag=Web_%E9%96%8B%E7%99%BC&amp;language=zh_tw" title="Special:Tags?tag=Web 開發&amp;language=zh tw">檢視全部...</a></span></p> </td> </tr> <tr> <td> <h2 id="社群">社群</h2> <ul> <li>檢視 Mozilla 討論區... <ul> <li><a class=" link-https" href="https://lists.mozilla.org/listinfo/dev-web-development" rel="external nofollow" title="https://lists.mozilla.org/listinfo/dev-web-development">郵件列表</a></li> <li><a class=" link-news" href="news://news.mozilla.org/mozilla.dev.web-development" rel="external nofollow" title="news://news.mozilla.org/mozilla.dev.web-development">新聞群組</a></li> <li><a class=" external" href="http://groups.google.com/group/mozilla.dev.web-development" rel="external nofollow" title="http://groups.google.com/group/mozilla.dev.web-development"> Google 群組</a></li> <li><a class=" external" href="http://groups.google.com/group/mozilla.dev.web-development/feeds" rel="external nofollow" title="http://groups.google.com/group/mozilla.dev.web-development/feeds">消息來源</a></li> </ul> </li> <li><a class="external" href="/web-tech" title="https://developer.mozilla.org/editor/fckeditor/core/editor/web-tech/">Mozilla Web-tech blog</a></li> <li><a class="external" href="http://www.whatwg.org/" rel="external nofollow" title="http://www.whatwg.org/">WHAT Working Group</a></li> <li><a class="external" href="http://webdevfeedhouse.com/" rel="external nofollow" title="http://webdevfeedhouse.com/">WebDev FeedHouse</a></li> </ul> </td> <td> <h2 id="工具">工具</h2> <ul> <li><a class="link-https" href="https://addons.mozilla.org/en-US/firefox/addon/1843" rel="external nofollow" title="https://addons.mozilla.org/en-US/firefox/addon/1843">Firebug 擴充套件</a></li> <li><a class="link-https" href="https://addons.mozilla.org/en-US/firefox/addon/60" rel="external nofollow" title="https://addons.mozilla.org/en-US/firefox/addon/60">Web Developer 擴充套件</a></li> <li><a href="../../../../en/Venkman" rel="internal">Venkman</a>,JavaScript 除錯器</li> <li><a href="../../../../en/DOM_Inspector" rel="internal">DOM Inspector</a> <p><span class="alllinks"><a class="internal" href="/Special:Tags?tag=Web_%E9%96%8B%E7%99%BC:Tools&amp;language=zh_tw" title="Special:Tags?tag=Web 開發:Tools&amp;language=zh tw">檢視全部...</a></span></p> </li> </ul> </td> </tr> </tbody>
-</table>
-</div>
-<p><span class="comment">Categories</span></p>
-<p><span class="comment">Interwiki Language Links</span></p>
-<p> </p>
-<p>{{ languages( { "en": "en/Web_Development", "de": "de/Webentwicklung", "es": "es/Desarrollo_Web", "fr": "fr/D\u00e9veloppement_Web", "it": "it/Sviluppo_Web", "ja": "ja/Web_Development", "pl": "pl/Programowanie_WWW","zh-cn": "cn/Web_Development" } ) }}</p>