Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <a href="https://muki.tw/">一個女生前端大大的網站</a>

<h3>4/3學習紀錄</h3>

<h4>0.4.6.a 結構標籤</h4>
<ul>id/class
  <ul>每個標籤都可以有 id / class
    <ul>id:名字,某一個元素,例如:黃詩惟</ul>
    <ul>class:類別,某一種元素,例如:美女</ul>
    <ul>一個頁面只能有一個id</ul>
  </ul>
  <ul>呈現方式:<h3 id="aaa" class="bbb" ><h4 id="aaa" class='bbb' >123</h4>
  </ul>
<ul>CSS選取器:
<ul>#aaa=id</ul>
  <ul>.bbb=class</ul>
  <ul><h3 class="r">id="r"</h3></ul>
</ul>
</ul>
<ul>div與span
    <ul>div:division(分隔),占用整整一行的區塊</ul>
    <ul>span:行中零碎的區塊</ul>
    <ul>兩者皆屬於沒有"語意"的標籤,是最基礎最原始的區塊標籤,以下是練習</ul>
</ul>
<ul>
----------------
<p>
  一篇文字裡<div class='r'>有一個區塊</div>如果是div的話就會整個換行,顯然附帶分段功能
</p>
----------------
<p>
一篇文字裡<span class="r">有一個區塊</span>如果是span的話會維持原行  
</p>
----------------
</ul>

<h4>0.4.6.b 語意化標籤一</h4>
<ul>含有"語意"的標籤是進階的標籤,除了看得見的外型之外還含有看不見的內涵,有利於瀏覽器分辨區塊內容,進而判斷權重,且有益於視障瀏覽器進行閱讀
  <ul>
    <ul>header:標頭</ul>
    <ul>article:正文</ul>
    <ul>footer:註腳</ul>
    <ul>aside:附掛</ul>
  </ul>
</ul>
<p>
<header>
  《正經地說笑》如何寫出讓人瘋傳的雞湯式文案</header>
<article>
  <p>
   <p> 這世界總是不缺溫暖,當你覺得疲憊,一定有一篇心靈雞湯,符合你的心境,給你滿滿的元氣。</p>
  <p>首先,要先定義一下什麼叫雞湯,或正名勵志。<br>
  勵志原意為:「勉勵意志」,再拆分意為勉強砥礪你的意念心志。<br>
  簡單說,就是當你撐不下去時,透過各種方式讓你硬撐下去的方法。
    </p>
  舉例來說,就好像老闆看你快撐不下去了,不替你加薪、也不幫你調整工作內容、更不會請新人幫你分擔工作。只是拍拍你的肩膀,說:<br><br>
  <em>「今日的辛苦,會化成明日燦爛的果實,加油。」</em><br><br>
  <em>「曾經我也為工作的煩悶而困擾,但如今我感謝過往那些歷練。」</em><br><br>
  <em>「成功的人找方法,失敗的人找藉口,你想當哪種人?」</em><br><br>
  於是你聽了之後,覺得好像又可以撐下去了,就繼續的努力打拼。<br>
  <p>過了一年後,終於。</p><br>
  <p><strong>你老闆買了新車。</strong></p><br>
  心靈勵志的力量尤其強大,畢竟心可以強迫肉體,激發出肉體的極限,當你覺得自己什麼都沒有的時候,要想想著名公主病女神雅典娜說過的:<br><br><em>你不是還有生命嗎?</em>
 </p>
</article>
<footer>
  <a href="https://www.copywriter.com.tw/teaching/detail/%E5%A6%82%E4%BD%95%E5%AF%AB%E5%87%BA%E8%AE%93%E4%BA%BA%E7%98%8B%E5%82%B3%E7%9A%84%E9%9B%9E%E6%B9%AF%E5%BC%8F%E6%96%87%E6%A1%88%EF%BD%9C%E6%AD%A3%E7%B6%93%E5%9C%B0%E8%AA%AA%E7%AC%91.html">文案的美:201903林育聖</a>
</footer>
<aside>
我們最新的線上課程【行銷必上文案課:受眾溝通與表達】上線囉!
</aside>
</p>

<h4>0.4.6.c語意化標籤二</h4>
<ul>
  <ul>nav:導覽列
    <nav>
      <ul>導覽列
        <li><a href="index.html">首頁</a></li>
        <li><a href="about.html">關於</a></li>
        <li><a href="archive.html">歸檔</a></li>
      </ul>
    </nav>
    </ul>
    <ul>section:章節,在article中分出章節來</ul>
  </ul>
</ul>
  <ul>架構原理
    <ul>
      <li>nav</li>
      <li>header</li>
      <li>article
        <ul>
          <li>section
            <ul>
              <li>paragraph
              <ul>
                <li>(ul/ol)+li
                </li>
                <li>br</li>
                <li>strong=b</li>
                <li>em=i</li>
              </ul>
              </li>
            </ul>
          </li>
        </ul>
      </li>
      <li>footer</li>
      <li>aside</li>
    </ul>
  </ul>

<h4>0.4.7 表單一</h4>
<ul>表單元件
  <ul>
    <li>select: 下拉選單</li>
    <li>radio: 單選框</li>
    <li>checkbox: 多選框</li>
    <li>text: 文字輸入</li>
    <li>submit: 提交</li>
  </ul>
</ul>
<ul>表單語法:form
  <ul><form action="按下送出之後要去的頁面" method="送出資料的方法">標單元件們元件們</form></ul>
  <ul>其中送出資料的方法有兩種:
  <ul>
    <li>Get方法:會被看到資料,搜尋引擎使用這種</li>
    <li>Post方法:比較不會被看到資料,通常使用這種</li>
  </ul>
  </ul>
</ul>
<ul>建立表單元件
  <ul>
    <li>
      <form action="aaa.php" method="post"><br>
      <label for="username">帳號:</label><br>
      <input id="username" type="text" placeholder="請輸入帳號" name="username"><br>
      <label for="password">密碼:</label><br>
      <input id="password" type="password" placeholder="請輸入密碼" name="password"><br>
      <label for="email">信箱:</label><br>
      <input id="email" type="email" placeholder="請輸入信箱" name="email"><br>
      <label for="tel">電話:</label><br>
      <input id="tel" type="tel" placeholder="請輸入電話" name="tel"><br>
      <input type="submit" value="送出!"><br>
      <textarea id="comment" cols="10" rows="1" placeholder="留話給我" name="comment"></textarea>
      </form>
    </li>
    <li>    
      <form action="aaa.php" method="post">
        <label for="username">帳號:</label>
        <input id="username" type="text" placeholder="請輸入帳號" name="username">
        <label for="password">密碼:</label>
        <input id="password" type="password" placeholder="請輸入密碼" name="password">
        <label for="email">信箱:</label>
        <input id="email" type="email" placeholder="請輸入信箱" name="email">
        <label for="tel">電話:</label>
        <input id="tel" type="tel" placeholder="請輸入電話" name="tel">
        <label for="comment">留言:</label>
        <textarea name="comment" id="comment" cols="10" rows="1" placeholder="留話給我"></textarea>
        <input type="submit" value="送出!">
      </form>
  </li>
  </ul>
</ul>
<ul>說明
  <ul>
    <li>label標籤可以指定特定id(即for對象),之後按下label,鍵號就會直接跑到該框框</li>
    <li>type=password,輸入時會隱藏密碼變成....</li>
    <li>type=email,輸入時會自帶一個簡單的驗證,檢查有沒有@,但風險高,不建議依賴</li>
    <li>type=tel,若在手機或平板輸入時會出現九宮格輸入</li>
    <li>input標籤裡獨特且必要的「name」屬性,專供後端資料庫所檢視,即為「資料格標題」</li>
    <li>textarea是多行輸入框,不必使用input標籤</li>
  </ul>
</ul>

<h4>0.4.8 表單二</h4>
<ul>表單元件:單選radio
  <ul>
    <li>
      若要串聯成同一組需要加上「name」<br>
      另外要加上獨一無二的值「value」作為代號(供js/sql看)<br>
      預設選項使用「checked」</li>
    <li><input type="radio" name="fruit" value="1" id="fruit1" checked><label for="fruit1">蘋果</label><br>
        <input type="radio" name="fruit" value="2" id="fruit2"><label for="fruit2">香蕉</label><br>
        <input type="radio" name="fruit" value="3" id="fruit3"><label for="fruit3">芭樂</label>
    </li>
    <li><input type="radio" name="fruit" value="1" id="fruit1" checked><label for="fruit1">蘋果</label>
        <input type="radio" name="fruit" value="2" id="fruit2"><label for="fruit2">香蕉</label>
        <input type="radio" name="fruit" value="3" id="fruit3"><label for="fruit3">芭樂</label>
    </li>
  </ul>
</ul>
<ul>表單元件:多選checkbox
  <ul>
    <li><input type="checkbox" name="fruit" value="1" id="fruit1"><label for="fruit1">蘋果</label><br>
        <input type="checkbox" name="fruit" value="2" id="fruit2"><label for="fruit2">香蕉</label><br>
        <input type="checkbox" name="fruit" value="3" id="fruit3"><label for="fruit3">芭樂</label></li>
    <li><input type="checkbox" name="family" value="1" id="family1"><label for="family1">媽媽</label>
        <input type="checkbox" name="family" value="2" id="family2"><label for="family2">爸爸</label>
        <input type="checkbox" name="family" value="3" id="family3"><label for="family3">弟弟</label></li>
  </ul>
</ul>
<ul>表單元件:下拉選單select option
  <ul>
    <li>label沒啥屁用<br>
        預選要用「selected」
    </li>
    <li><select name="home" id="home"><br>
        <option value="1">桃園</option><br>
        <option value="2">台北</option><br>
        <option value="3">台南</option><br>      
    </li>
    <li>
      <label for="home">居住地</label>
      <select name="home" id="home">
        <option value="1">桃園</option>
        <option value="2">台北</option>
        <option value="3">台南</option>
      </select>
    </li>
  </ul>
</ul>

<h2><b>高鐵訂票</b></h2>
<ul>
  <li>啟程站:
      <select name="fromwhere" id="fromwhere">
      <option value="1">桃園</option>
      <option value="2">台南</option>
      </select>
      到達站:
      <select name="towhere" id="towhere">
      <option value="1">桃園</option>
      <option value="2">台南</option>
      </select>
  </li>
  <li>
    <input type="radio" name="class" id="secondclass">
    <label for="secondclass">標準車廂</label>
    <input type="radio" name="class" id="firstclass">
    <label for="firstclass">商務車廂</label>
  </li>
  <li><input type="radio" name="seat" id="no">
    <label for="no">無</label>
    <input type="radio" name="seat" id="window">
    <label for="window">靠窗優先</label>
    <input type="radio" name="seat" id="aisle">
    <label for="aisle">靠走道優先</label>
  </li>
  <li>
    <input type="checkbox" name="comeback" id="comeback"><label for="comeback">訂購回程</label>
  </li>
  <li>為確保交易安全,請輸入驗證碼:<input type="text" col="10" row="10" placeholder="驗證碼"></li>
  <li>
    <input type="submit">
  </li>
</ul>



0.4.9表格

<ul>
  <ul>
    <li>表格:<table></table>
      <br>→表頭:<thead></thead>
      <br>→表身:<tbody></tbody>
      <br>→表末:<tfoot></tfoot>
      <br>-→列 row:<tr></tr>
      <br>--→標題 head:<th></th>
      <br>--→欄 data:<td></td>
    </li>
    <li>邊框<table border=1></li>
    <li>head,body,foot(語意化標籤)對於瀏覽器有顯示順序的權重效果</li>
  </ul>
</ul>

<table border=1>
  <thead>
  <tr>
    <th>序號</th>
    <th>姓名</th>
    <th>年齡</th>
  </tr>    
  </thead>
  <tbody>
    <tr>
     <td>0</td>
     <td>小吳尊</td>
     <td>45</td>
    </tr>
    <tr>
     <td>1</td>
     <td>小明天</td>
     <td>20</td>
    </tr>
    <tr>
     <td>2</td>
     <td>小華語</td>
     <td>15</td>
    </tr> 
  </tbody>
  <tfoot>
    <tr>
      <td></td>
      <td>加總</td>
      <td>80</td>
    </tr>
  </tfoot>
  
</table>



              
            
!

CSS

              
                body {
  background-color: #A3D5D0;
}
.r{
  font-size:17px;
  color:#820216
}
*{
 line-height:30px;
 font-family:微軟正黑體;
}
              
            
!

JS

              
                document.getElementsByTagName("h1")[0].style.fontSize = "80px";
              
            
!
999px

Console