李法賢
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    1
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 新聞網頁製作 (一) - HTML 標記式語言 ## Slides https://hackmd.io/58cKH6zGSliUosSFgYFTuQ#/2 ## 學習大綱: - [新聞網頁製作 (一) - HTML 標記式語言](https://hackmd.io/svhFYKq4QyaarC_J0WRsig) - [新聞網頁製作(二) - CSS 串接樣式表](https://hackmd.io/Pekdv0mvT8qD_LXLzUo9iQ) - [新聞網頁製作(三)- CSS 選擇器與基礎網頁排版](https://hackmd.io/ccO-gvxFR5-49q3ePoNJkg) - [新聞網頁製作(四)- CSS Position 與 Flexbox 排版](https://hackmd.io/i1uBelrpRv2Uz5emQawIiw) - [新聞網頁製作(五)- Responsive Web Design 響應式網頁](https://hackmd.io/ojTXG2s0RQaJz85goqIz1w) - [新聞網頁製作(六)- 多媒體元素與動態效果](https://hackmd.io/J_YYk1YUSum1x3fVo75PXA) - [新聞網頁製作(七)- 使用 GitHub 部署網頁](https://hackmd.io/P9N34oIwS2G6Mfhag3Rqzg) ## 學習目標 * 了解網頁的生成 * 基礎了解/運用 HTML(Hypertext Markup Language) * 瀏覽器與它的使用方式 * 使用 Visual Studio Code 來撰寫程式 * 解析新聞網頁 ### 了解網頁的生成 在了解網頁之前,我們必須先提到瀏覽器、伺服器和網頁的基礎 —— HTML(Hypertext Markup Language)。 **瀏覽器(Browser)**: 簡單來說,就是電腦、手機或是平板上的一個應用程式(Application/App),它能將HTML轉化成我們現在看到的網頁的樣子。透過瀏覽器的解析,將一行行生硬的程式碼,轉換成老嫗都能看得懂的網頁樣子。而Chrome(Google)、Firefox、~~IE(Microsoft)~~、Edge (Microsoft)和 Safari(Apple) 是市面上常見到的瀏覽器。 **伺服器(Server)**: 伺服器,是HTML的生產者。當它從網路上接收到瀏覽器的需求後,便會產生相對應的HTML,並將其送回給瀏覽器。 **HTML(Hypertext Markup Language)**: HTML是網頁最基本的元素。既然HTML的縮寫L是指Language,那也代表它會有它定義好的語法和使用方式。 瀏覽器根據語法,將一行行生硬、由英文字母組成的文字串,轉化成我們現在看到的網頁介面。 接下,我們便要來學習HTML的文法和使用方式,能夠操控 HTML ,我們便能操控網頁的基本樣子 ![](https://i.imgur.com/dbDIIQs.jpg) ### 基礎了解/運用 網路上充滿著HTML的教學文件和網站, 大家可以先從以下網站著手, 開啟這學期寫HTML的人生。 - [HTML 基礎](https://developer.mozilla.org/zh-TW/docs/Learn/HTML/Introduction_to_HTML/Getting_started) - [HTML tutorial](https://www.w3schools.com/html/) ### HTML 語法 一個完整的HTML由多個HTML元素(element)所組成;而一個HTML元素則包含HTML起始標籤(opening tag)、內容(content)和結束標籤(closing tag)。 你可以把標籤想像成 HTML 裡的單字,有了這些單字,我們才能組成有意義的句子。 因此,在解釋 HTML 元素之前,我們必須先看過以下標籤。 - `<html>` - `<head>` - `<body>` - `<div>` - `<span>` - `<article>` - `<h1>`, `<h2>`, ...`<h6>` - `<figure>` - `<img>` - `<figcaption>` - `<ul>` - `<ol>` - `<li>` - `<blockquote>` - `<a>` - `<header>` - `<footer>` - `<i>`, `<b>`, `<em>`, `<strong>` - [List of inline tags](https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements#Elements) - [List of block tags](https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements#Elements) 在對 HTML 裡的單字(標籤)有些許印象後,我們要來學習怎麼把單字拼湊成一段有意義的句子(元素)。 #### 一般元素(Element) ``` 文法: <標籤名稱 屬性名稱="屬性值" 屬性名稱="屬性值">網頁呈現的內容</標籤名稱> 範例: <h1 style="color: pink">報導者</h1> ``` 元素可以擁有**零個至多個**「屬性」,根據元素中不同的標籤,擁有的屬性也不盡相同。 上例`h1`的「屬性名稱」是`style`,其「屬性值」為`color: pink`, `color: pink` 這個部分之後介紹CSS時會說;以白話文來說, 就是告訴瀏覽器這個標題的字體顏色是粉紅色。 要注意,結束標籤的標籤名稱要與起始標籤的標籤名稱一樣, 不能寫成`<h1>報導者</h2>`,這樣子瀏覽器會解析錯誤。 此外,結束標籤一定要有反斜線`/`,像是`</h1>`, `</h2>`。 #### 空元素(Empty Element) ``` 文法: <標籤名稱 屬性名稱="屬性值"> 範例: <img src="https://www.twreporter.org/images/footer/logo-horizontal02.svg" alt="報導者logo"> ``` 空元素相較於一般元素而言,少了內容和結束標籤, 通常代表該元素的起始標籤就有其作用,不需要內容呈現在網頁上。 上述範例翻譯成白話文,是告訴瀏覽器,我這邊要呈現一張圖片(`img`是image的縮寫), 圖片的來源是`https://www.twreporter.org/images/footer/logo-horizontal02.svg`, 若瀏覽器你找不到這張圖,退而求其次,就幫我在網頁上呈現`報導者logo`這幾個字吧。 其他常用到的空元素包括, `<br>`:斷行 `<hr>`:分隔線 #### 巢狀元素(Nested Elements) 除了一般元素和空元素, 網頁主要的構成是透過巢狀元素。 當一般元素中的內容,是另外的元素(一個或是多個)時, 我們稱之為巢狀元素。 以下例子來說明: ``` <html> <!-- metadata for this html --> <head> <meta /> </head> <!-- data you want to present on browser --> <body> <article> <header> <h1> </h1> </header> <p></p> <figure> <img /> <figcaption></figcaption> </figure> </article> <footer> </footer> </body> </html> ``` 你會發現`<html>` 起始標標和`</html>`結束標籤中的內容 分別是`<head></head>`元素和`<body></body>`元素。 整份HTML解析下來, 你會發現HTML就像是一個俄羅斯娃娃一樣,是由一個最大的元素包著另一個次大的元素, 次大的元素在包著較小的元素,較小的元素則一路包到最小的元素。 俄羅斯娃娃的上半身是起始標籤,下半身是結束標籤,中間較小的俄羅斯娃娃則是元素的內容。 <img src="https://nickhsine.github.io/teach-at-nccu/assets/2018-03-15/well_formed_html_diagram.png" width="600" > `Ben Henick. (2010). HTML & CSS: The Good Parts. p. 9` #### 屬性(Attributes) 剛剛上面有稍微帶過屬性在元素中的位置和使用方式, **但初學者常常會犯以下幾個錯誤**: * 錯誤一:標籤名稱和屬性名稱中間沒有空白,例:`<h1style="color: pink">` 若`h1`和`style`中間沒有空白,瀏覽器會不小心把`h1style`視為一個它看不懂的標籤。 * 錯誤二:屬性名稱後沒有**等於符號**`=` * 錯誤三:等於符號後的屬性值沒有用**雙引號**`"`或是**單引號**`'`**包住**。 注意:雙引號和單引號需要成對,不能一單一雙,例如:`style="color: pink'` **注意中的大注意:任何符號都是半形符號,不能打全型符號。** * 不同的標籤,可能有不同的屬性名稱,使用前請詳閱說明書。 #### HTML 註解(Comment) 有時候寫程式碼,你會需要寫一些解釋在程式碼裡,<br/> 但是這些解釋你又不想要呈現在網頁上面。<br/> 你可以使用html comment。 ``` <body> <!-- 這是一個註解,不會呈現在畫面上。--> 這串字才會呈現在畫面上面。 </body> ``` #### 跳脫字元 瀏覽器利用小於符號`<`和大於符號`>`來組成HTML標籤, 所以當瀏覽器一段文字被`<`和`>`包住時,它就會主動認為這段文字是HTML標籤。 然而,當我們想要在網頁上呈現`<`和`>`這兩個文字時,我們要如何告訴瀏覽器, 這個`<`和`>`並不是標籤的一部分呢? `<`和`>`就是我們所謂的跳脫字元, 因為要在網頁上呈現`<`和`>`,必須透過其代碼來呈現。 透過代碼,瀏覽器就能分別標籤的`<`和文字上要呈現的`<`的不同。 舉例而言,若網頁上我們要呈現`<`這個字,我們在寫HTML的時候,必須使用`&lt;`代碼。 下面的表格整理出跳脫字元和代碼。 代碼 | 呈現在網頁上的符號 --------|------------------ `&lt;` | 小於符號(`<`) `&gt;` | 大於符號(`>`) `&amp;` | and符號(`&`) `&nbsp;`| 空白(` `) 除了上述簡易表格, 也可到[HTML Codes Table](https://ascii.cl/htmlcodes.htm)找其他跳脫字元的代碼, 或是可以到[Unicode](https://home.unicode.org/) 找你想要的表情符號。 #### 進一步認識 HTML tag ##### `<div>` `<div>` 是 `<div style="display:block;">` 的縮寫。 ```htmlmixed=false <div>這是一個區塊,佔了瀏覽器一整行</div> <!-- 一個區塊包含了更多區塊,就像俄羅斯娃娃一樣 --> <div> 包含了兩個區塊: <div>第一個區塊</div> <div>第二個區塊</div> </div> ``` ##### `<span>` `<span>` 是 `<span style="display: inline;">` 的縮寫。 ```htmlmixed=false <!-- span 常用來為字串加上風格,以下一個字串是綠色,另一個是紅色 --> <span style="color: green">span 是 inline element,</span> <span style="color: red">所以這兩個 span 會在同一行上。</span> ``` ##### `<a>`: 超連結 `<a>` 是 `<a style="display: inline;">` 的縮寫。 `<a>` 是用來產生超連結的標籤。 被`<a>`包住的內容,會變成超連結。 `href="https://www.twreporter.org"` 指定超連結的網址。 `traget="_blank"` 則是指定超連結打開的方式,`_blank`是指另開分頁。 更多詳細的設定,可以參考 [w3schools \<a\> tag](https://www.w3schools.com/tags/tag_a.asp)。 ```htmlmixed=false <a href="https://www.twreporter.org" target="_blank" > this is a link to twreporter homepage </a> ``` ##### `<p>`:文章段落 `<p>` 是 `<p style="display: block;">`的縮寫。 在之後的新聞網頁中,我們會大量使用`<p>`來呈現文章段落。 ##### `<img>` 呈現圖片[點此暸解更多](https://www.w3schools.com/tags/tag_img.asp) `<img>`是`<img style="display: inline-block;"`的縮寫。 `<img>`是空元素。 `src="https://nickhsine.github.io/teach-at-nccu/mobile-aritcle-page/leading.jpeg"` 指定圖片的來源。 `alt="一隻美麗的海龜"`指定圖片的文字敘述,當瀏覽器無法載入圖片時,取而代之,會出現`一隻美麗的海龜`等文字內容。 `width="300px"`指定圖片的寬度。 `height="auto"`指定圖片的高度,`auto`代表隨寬度等比例縮放。 更多`<img>`的使用方式,可以參考[w3schools \<img\> tag](https://www.w3schools.com/tags/tag_img.asp)。 ```htmlmixed=false <img src="https://nickhsine.github.io/teach-at-nccu/mobile-aritcle-page/leading.jpeg" alt="一隻美麗的海龜" width="300px" height="auto" > ``` ##### `<figure>` `<figcaption>` `<figure>` 和 `<figcaption>` 通常會搭配 `<img>` 使用。 `<figcaption>`是圖說。 ```htmlmixed=false <figure> <img src="https://nickhsine.github.io/teach-at-nccu/mobile-aritcle-page/leading.jpeg" alt="一隻美麗的海龜" width="300px" height="auto" > <figcaption>為了美麗的海龜,我們少用點吸管、塑膠袋等塑膠類製品吧 :)</figcaption> </figure> ``` ##### `<ul>` `<ol>` `<li>` `<ul>` means unordered list<br/> `<ol>` means ordered list<br/> `<ul>`和`<ol>`需要搭配 `<li>`使用。 ```htmlmixed=false <!-- ul li 使用方式 --> <ul> <li>list one</li> <li>list two</li> </ul> <!-- ol li 使用方式 --> <ol> <li>list one</li> <li>list two</li> </ol> ``` ##### `<h1>` `<h2>` `<h3>` `<h4>` `<h5>` `<h6>` headings:<br/> `<h1>` 放最重要的資訊,例如標題 `<h2>` 放次重要的資訊,例如小標題 ##### `<em>` `<i>` `<b>` `<strong>` `<em>` emphasize<br/> `<i>` italic<br/> `<b>` bold<br/> `<strong>`bolder<br/> ##### `<article>` `<header>` `<footer>` `<nav>` `<article>` `<header>` `<footer>` `<nav>` 外觀上都與`<div>`沒有不同。<br/> 但為了讓搜尋引擎理解我們的程式碼,我們使用這些帶有意義的 HTML tag,又稱為 semantic HTML。 ### 新聞網頁的元素 當我們多多少少理解HTML有哪些標籤可以使用後,我們可以簡單的分類新聞網頁會使用的標籤。 1. Title/標題 -> `<h1>` 2. Subtitle/副標題 -> `<h2>` 3. Authors/作者欄 -> `<div>`,`<span>`,`<a>` 4. Hero image/首圖 -> `<figure>`, `<img>`, `<figcaption>` 5. Introduction/前言 -> `<p>` 6. Paragraph/段落 -> `<p>` 7. Headings/小標 -> `<h3>` 8. BlockQuote/抽言 -> `<blockquote>` 10. Caption/圖說 -> `<figcaption>` 11. Link/連結 -> `<a>` 12. Slideshow -> `<img>`'s 13. Audio -> `<audio>` 14. Video -> `<video>` 15. 圖表 -> `<img>` 16. 相關新聞 -> `<ul>`,`<li>` ### Trouble Shooting #### 我用瀏覽器打開我寫的 HTML 檔案,但只跑出程式碼,瀏覽器沒有正確將檔案解析成 HTML 以下兩種方式告知瀏覽器,你寫的檔案是 html: 1. 副檔名設定成 `.html` 2. 在檔案最開頭加上 `<!DOCTYPE html>` #### 延伸閱讀 [Semantic HTML](https://internetingishard.com/html-and-css/semantic-html/) ### 好用的線上編輯器 1. [jsbin](https://jsbin.com/) 2. [jsfiddle](https://jsfiddle.net/) <!-- ### 延伸閱讀 在解釋觀念之前,我們先看看圖三。 左方是手機瀏覽器呈現的畫面,而右方則是程式碼。 ![圖三](https://i.imgur.com/ITveiQc.jpg) 圖三:解釋觀念的示意圖。 #### 觀念一:HTML 是由一個最大的巢狀元素組成,在此巢狀元素裡,可以放入更多的巢狀元素、空元素和一般元素。 最大的巢狀元素是 `<html>`,所有要呈現在網頁上的內容,都必須放在這個最大的巢狀元素裡面。 就圖三來說,程式碼會長得像是: ```htmlmixed=1 <html> <body> <div id="header"> <img src="logo"> <div class="hambuger"> </div> </div> <div id="top-section"> <div id="first-block"> </div> <div id="section-block"> </div> </div> <div id="editorial-section"> </div> </body> </html> ``` #### 觀念二:在理解瀏覽器如何排版前,我們必須先理解元素與元素的關係:祖先(ancestor)、子孫(descendant)、父母親(parent)、孩子(child)、兄弟姊妹(siblings) 首先,我們將上述 HTML 程式碼轉化成樹狀圖(圖四): ![圖四](https://i.imgur.com/VA9FbdE.png) 圖四:用樹狀圖來表示元素與元素之間的關係。 ##### Ancestor: 當元素A是巢狀元素,且擁有一層以上的元素時,元素A便是其他被它包含住的元素的祖先。 以圖五來說,`<html>`是其他所有元素的祖先,因為`<html>`包含了其他所有的元素。 ![圖五](https://i.imgur.com/A8QXpBq.png) 圖五:`<html>`是所有元素的祖先 ##### Descendant: 當元素A被巢狀元素B包含時,元素A即是元素B的子孫。 已圖六來說,除了`<html>`元素,所有的元素皆是`<body>`的子孫。 ![圖六](https://i.imgur.com/XeXjqlL.png) 圖六:`<body>`元素所有的子孫 ##### Parent and Child: 當元素A被巢狀元素B直接包含時,元素A是元素B的 child,而元素B是元素A的 parent。 就圖七來說,較上層的 `<div>` 是 `<img>` 的 parent,而 `<img>` 是 `<div>` 的 child。 ![圖七](https://i.imgur.com/EJZhZ26.png) 圖七:介紹 Parent 和 Child 之間的關係。 ##### Siblings: 當元素A、元素B被巢狀元素C直接包含時,元素A是元素B是siblings。 ![圖八](https://i.imgur.com/0XMYBGN.png) 圖八:介紹 Siblings 的關係。 #### 觀念三:瀏覽器在排版時,方向是**由左至右、由上至下排列HTML元素**。 在理解瀏覽器如何排版前,我們必須先理解元素的呈現方式(display)。 #### HTML元素的呈現方式: 1) **display: block** 瀏覽器會提供一整行的區塊。 可以指定 block 的寬度和高度。 2) **display: inline** 瀏覽器會根據 inline 的寬度給適當的空間,如果多個 inline 的元素寬度加總不超過瀏覽器的寬度,則多個 inline 元素會並排在同一行。 無法指定 inline 的寬度和高度, inline 的寬高度根據內容決定。 3) **display: inline-block** 同時具有 inline 和 block 的特性。 可以指定寬高度,多個 inline-block 和 inline 的元素的寬度總和若不大於瀏覽器寬度,會並排在同一行上。 除了上面三種呈現方式,之後還會陸續介紹其他的呈現方式,現階段我們先搞懂上述三種就夠了。 `<div>`預設的`display`是`block`;仔細來說,`<div>`是`<div style="display:block;">`的縮寫。 對大多數的瀏覽器來說,`<img>`預設的`display`是`inline-block`;`<img>`是`<img style="display:inline-block;">`的縮寫。 當瀏覽器遇到`display:block`的元素時,會由上至下排列元素,因此就圖三來說,瀏覽器會由上至下排列 `<div class="first-b">` `<div class="second-b">` `<div class="third-b">` (`class`屬性之後會專章解釋,目前可以先跳過不看) 當瀏覽器遇到`display:inline-block`和`display:inline`的元素時,會由左至右排列元素。就圖三來說,瀏覽器會試圖由左至右排列`<img src="logo">`和`<div class="ham">`。 (更詳盡的內容請見[新聞網頁製作(三)- CSS 選擇器與基礎網頁排版#排版前,必須知道的幾個重點]( https://hackmd.io/ccO-gvxFR5-49q3ePoNJkg#%E6%8E%92%E7%89%88%E5%89%8D%EF%BC%8C%E5%BF%85%E9%A0%88%E7%9F%A5%E9%81%93%E7%9A%84%E5%B9%BE%E5%80%8B%E9%87%8D%E9%BB%9E)) 咦,如果你夠認真上課,你會發現`<div class="ham">` 不該像圖三畫面呈現的那樣,與`<img src="logo">`並排才對;因為`<div>`是`display:block`,它自己就會佔了瀏覽器的一排空間。 那就讓大家思考一下,我們要改變這個`<div>`的`display`,好讓它會和`<img>` 站在同一排? 答案是:`<div class="ham" style="display: inline-block;">` --> ###### tags: `teach-at-nccu`, `html`, `css`

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully