/
index.html
809 lines (573 loc) · 35.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
<!DOCTYPE html>
<html lang="zh-TW">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 4.2.0">
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
<link rel="mask-icon" href="/images/logo.svg" color="#222">
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css">
<script id="hexo-configurations">
var NexT = window.NexT || {};
var CONFIG = {"hostname":"yoursite.com","root":"/","scheme":"Gemini","version":"7.7.2","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":true,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
</script>
<meta property="og:type" content="website">
<meta property="og:title" content="Ivey">
<meta property="og:url" content="http://yoursite.com/index.html">
<meta property="og:site_name" content="Ivey">
<meta property="og:locale" content="zh_TW">
<meta property="article:author" content="Ivey">
<meta name="twitter:card" content="summary">
<link rel="canonical" href="http://yoursite.com/">
<script id="page-configurations">
// https://hexo.io/docs/variables.html
CONFIG.page = {
sidebar: "",
isHome : true,
isPost : false
};
</script>
<title>Ivey</title>
<noscript>
<style>
.use-motion .brand,
.use-motion .menu-item,
.sidebar-inner,
.use-motion .post-block,
.use-motion .pagination,
.use-motion .comments,
.use-motion .post-header,
.use-motion .post-body,
.use-motion .collection-header { opacity: initial; }
.use-motion .site-title,
.use-motion .site-subtitle {
opacity: initial;
top: initial;
}
.use-motion .logo-line-before i { left: initial; }
.use-motion .logo-line-after i { right: initial; }
</style>
</noscript>
</head>
<body itemscope itemtype="http://schema.org/WebPage">
<div class="container use-motion">
<div class="headband"></div>
<header class="header" itemscope itemtype="http://schema.org/WPHeader">
<div class="header-inner"><div class="site-brand-container">
<div class="site-nav-toggle">
<div class="toggle" aria-label="切換導航欄">
<span class="toggle-line toggle-line-first"></span>
<span class="toggle-line toggle-line-middle"></span>
<span class="toggle-line toggle-line-last"></span>
</div>
</div>
<div class="site-meta">
<div>
<a href="/" class="brand" rel="start">
<span class="logo-line-before"><i></i></span>
<span class="site-title">Ivey</span>
<span class="logo-line-after"><i></i></span>
</a>
</div>
<p class="site-subtitle">學習記事</p>
</div>
<div class="site-nav-right">
<div class="toggle popup-trigger">
</div>
</div>
</div>
<nav class="site-nav">
<ul id="menu" class="menu">
<li class="menu-item menu-item-home">
<a href="/" rel="section"><i class="fa fa-fw fa-home"></i>首頁</a>
</li>
<li class="menu-item menu-item-tags">
<a href="/tags/" rel="section"><i class="fa fa-fw fa-tags"></i>標籤</a>
</li>
<li class="menu-item menu-item-categories">
<a href="/categories/" rel="section"><i class="fa fa-fw fa-th"></i>分類</a>
</li>
</ul>
</nav>
</div>
</header>
<div class="back-to-top">
<i class="fa fa-arrow-up"></i>
<span>0%</span>
</div>
<a role="button" class="book-mark-link book-mark-link-fixed"></a>
<main class="main">
<div class="main-inner">
<div class="content-wrap">
<div class="content">
<div class="posts-expand">
<article itemscope itemtype="http://schema.org/Article" class="post-block home" lang="zh-TW">
<link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/03/11/HTML-4/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/cat.jpg">
<meta itemprop="name" content="Ivey">
<meta itemprop="description" content="">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Ivey">
</span>
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a href="/2020/03/11/HTML-4/" class="post-title-link" itemprop="url">HTML 字體</a>
</h1>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">發表於</span>
<time title="創建時間:2020-03-11 06:48:47 / 修改時間:20:43:42" itemprop="dateCreated datePublished" datetime="2020-03-11T06:48:47+08:00">2020-03-11</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="fa fa-folder-o"></i>
</span>
<span class="post-meta-item-text">分類於</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/HTML/" itemprop="url" rel="index"><span itemprop="name">HTML</span></a>
</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<img src="https://images.unsplash.com/reserve/uZYSV4nuQeyq64azfVIn_15130980706_64134efc6e_o.jpg?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1347&q=80" alt="html" height="450" />
<p>在閱讀的過程中,最重要的莫過於文字的顯示,本章將會介紹HTML標籤中,專門拿來標記文字,做出粗體等等效果</p>
<p>但其實這些效果主要還是要看當前使用的瀏覽器的預設樣式,不同瀏覽器對HTML的標籤都有不同的定義。</p>
<h3 id="粗體"><a href="#粗體" class="headerlink" title="粗體"></a>粗體</h3><h4 id="lt-b-gt"><a href="#lt-b-gt" class="headerlink" title="<b>"></a><code><b></code></h4><p>顯示粗體</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><html></span><br><span class="line"> <body></span><br><span class="line"> <b>Sunt</b> cupidatat ullamco sint et proident <b>consequat</b> sit voluptate aliqua voluptate.</span><br><span class="line"> </body></span><br><span class="line"></html></span><br></pre></td></tr></table></figure>
<table>
<tr>
<th>輸出</th>
</tr>
<tr>
<td>
<html>
<body>
<b>Sunt</b> cupidatat ullamco sint et proident <b>consequat</b> sit voluptate aliqua voluptate.
</body>
</html>
</td>
</tr>
</table>
<h4 id="lt-strong-gt"><a href="#lt-strong-gt" class="headerlink" title="<strong>"></a><code><strong></code></h4><p>重要的文本,能夠為瀏覽器、拚寫檢查程序、翻譯系統以及搜索引擎分度器提供有用的信息</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><html></span><br><span class="line"> <body></span><br><span class="line"> <strong>Ut Lorem eiusmod deserunt</strong> occaecat nulla minim.</span><br><span class="line"> </body></span><br><span class="line"></html></span><br></pre></td></tr></table></figure>
<table>
<tr>
<th>輸出</th>
</tr>
<tr>
<td>
<html>
<body>
<strong>Ut Lorem eiusmod deserunt</strong> occaecat nulla minim.
</body>
</html>
</td>
</tr>
</table>
<h3 id="鈄線"><a href="#鈄線" class="headerlink" title="鈄線"></a>鈄線</h3><h4 id="lt-i-gt"><a href="#lt-i-gt" class="headerlink" title="<i>"></a><code><i></code></h4><p>顯示鈄線</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><html></span><br><span class="line"> <body></span><br><span class="line"> Do consectetur <i>enim</i> ipsum occaecat ea cillum.</span><br><span class="line"> </body></span><br><span class="line"></html></span><br></pre></td></tr></table></figure>
<table>
<tr>
<th>輸出</th>
</tr>
<tr>
<td>
<html>
<body>
Do consectetur <i>enim</i> ipsum occaecat ea cillum.
</body>
</html>
</td>
</tr>
</table>
<h4 id="lt-em-gt"><a href="#lt-em-gt" class="headerlink" title="<em>"></a><code><em></code></h4><p>被強調的文本,能夠為瀏覽器、拚寫檢查程序、翻譯系統以及搜索引擎分度器提供有用的信息</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><html></span><br><span class="line"> <body></span><br><span class="line"> <em>Ea veniam aute fugiat aliquip esse ex irure dolor.</em></span><br><span class="line"> </body></span><br><span class="line"></html></span><br></pre></td></tr></table></figure>
<table>
<tr>
<th>輸出</th>
</tr>
<tr>
<td>
<html>
<body>
<em>Ea veniam aute fugiat aliquip esse ex irure dolor.</em>
</body>
</html>
</td>
</tr>
</table>
<h4 id="lt-dfn-gt"><a href="#lt-dfn-gt" class="headerlink" title="<dfn>"></a><code><dfn></code></h4><p>定義術語/專業行話</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><html></span><br><span class="line"> <body></span><br><span class="line"> <dfn>PM</dfn>:Project Manager的簡稱,又稱專案經理</span><br><span class="line"> </body></span><br><span class="line"></html></span><br></pre></td></tr></table></figure>
<table>
<tr>
<th>輸出</th>
</tr>
<tr>
<td>
<html>
<body>
<dfn>PM</dfn>:Project Manager的簡稱,又稱專案經理
</body>
</html>
</td>
</tr>
</table>
<h3 id="刪除線"><a href="#刪除線" class="headerlink" title="刪除線"></a>刪除線</h3><h4 id="lt-del-gt"><a href="#lt-del-gt" class="headerlink" title="<del>"></a><code><del></code></h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><html></span><br><span class="line"> <body></span><br><span class="line"> <del>Sit ex pariatur </del> cupidatat sunt officia Lorem anim culpa commodo.</span><br><span class="line"> </body></span><br><span class="line"></html></span><br></pre></td></tr></table></figure>
<table>
<tr>
<th>輸出</th>
</tr>
<tr>
<td>
<html>
<body>
<del>Sit ex pariatur </del> cupidatat sunt officia Lorem anim culpa commodo.
</body>
</html>
</td>
</tr>
</table>
<h3 id="上標文本"><a href="#上標文本" class="headerlink" title="上標文本"></a>上標文本</h3><h4 id="lt-sup-gt"><a href="#lt-sup-gt" class="headerlink" title="<sup>"></a><code><sup></code></h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><html></span><br><span class="line"> <body></span><br><span class="line"> Lorem cupidatat <sup>velit non mollit</sup> enim ullamco sit ullamco nulla nostrud.</span><br><span class="line"> </body></span><br><span class="line"></html></span><br></pre></td></tr></table></figure>
<table>
<tr>
<th>輸出</th>
</tr>
<tr>
<td>
<html>
<body>
Lorem cupidatat <sup>velit non mollit</sup> enim ullamco sit ullamco nulla nostrud.
</body>
</html>
</td>
</tr>
</table>
<h3 id="下標文本"><a href="#下標文本" class="headerlink" title="下標文本"></a>下標文本</h3><h4 id="lt-sub-gt"><a href="#lt-sub-gt" class="headerlink" title="<sub>"></a><code><sub></code></h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><html></span><br><span class="line"> <body></span><br><span class="line"> <sub>Esse est nisi</sub> ipsum velit voluptate quis.</span><br><span class="line"> </body></span><br><span class="line"></html></span><br></pre></td></tr></table></figure>
<table>
<tr>
<th>輸出</th>
</tr>
<tr>
<td>
<html>
<body>
<sub>Esse est nisi</sub> ipsum velit voluptate quis.
</body>
</html>
</td>
</tr>
</table>
<h3 id="下劃線"><a href="#下劃線" class="headerlink" title="下劃線"></a>下劃線</h3><h4 id="lt-ins-gt"><a href="#lt-ins-gt" class="headerlink" title="<ins>"></a><code><ins></code></h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><html></span><br><span class="line"> <body></span><br><span class="line"> Ut ut laborum eu eu excepteur <ins>elit</ins> esse ad eu velit aute.</span><br><span class="line"> </body></span><br><span class="line"></html></span><br></pre></td></tr></table></figure>
<table>
<tr>
<th>輸出</th>
</tr>
<tr>
<td>
<html>
<body>
Ut ut laborum eu eu excepteur <ins>elit</ins> esse ad eu velit aute.
</body>
</html>
</td>
</tr>
</table>
<h3 id="展示縮寫"><a href="#展示縮寫" class="headerlink" title="展示縮寫"></a>展示縮寫</h3><h4 id="lt-abbr-gt"><a href="#lt-abbr-gt" class="headerlink" title="<abbr>"></a><code><abbr></code></h4><p>通過對縮寫詞語進行標記,能夠為瀏覽器、拚寫檢查程序、翻譯系統以及搜索引擎分度器提供有用的信息</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><html></span><br><span class="line"> <body></span><br><span class="line"> <p>use <abbr title=<span class="string">"Hyper Text Markup Language"</span>>HTML</abbr>.</p></span><br><span class="line"> </body></span><br><span class="line"></html></span><br></pre></td></tr></table></figure>
<table>
<tr>
<th>輸出</th>
</tr>
<tr>
<td>
<html>
<body>
<p>use <abbr title="Hyper Text Markup Language">HTML</abbr>.</p>
滑鼠移至文字上方就可以展示縮寫
</body>
</html>
</td>
</tr>
</table>
<h3 id="引用"><a href="#引用" class="headerlink" title="引用"></a>引用</h3><h4 id="lt-q-gt"><a href="#lt-q-gt" class="headerlink" title="<q>"></a><code><q></code></h4><p>短的引用,在兩側加入雙引號</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><html></span><br><span class="line"> <body></span><br><span class="line"> Lorem ad <q>esse</q> eiusmod commodo duis ea.</span><br><span class="line"> </body></span><br><span class="line"></html></span><br></pre></td></tr></table></figure>
<table>
<tr>
<th>輸出</th>
</tr>
<tr>
<td>
<html>
<body>
Lorem ad <q>esse</q> eiusmod commodo duis ea.
</body>
</html>
</td>
</tr>
</table>
<h4 id="lt-blockquote-gt"><a href="#lt-blockquote-gt" class="headerlink" title="<blockquote>"></a><code><blockquote></code></h4><p>長的引用</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><html></span><br><span class="line"> <body></span><br><span class="line"> Anim ipsum laborum tempor proident ea culpa.</span><br><span class="line"> <br/></span><br><span class="line"> <blockquote></span><br><span class="line"> Anim ipsum laborum tempor proident ea culpa.</span><br><span class="line"> </blockquote></span><br><span class="line"> </body></span><br><span class="line"></html></span><br></pre></td></tr></table></figure>
<table>
<tr>
<th>輸出</th>
</tr>
<tr>
<td>
<html>
<body>
Anim ipsum laborum tempor proident ea culpa.
<br/>
<blockquote>
Anim ipsum laborum tempor proident ea culpa.
</blockquote>
</body>
</html>
</td>
</tr>
</table>
<h3 id="程式碼"><a href="#程式碼" class="headerlink" title="程式碼"></a>程式碼</h3><h4 id="lt-code-gt"><a href="#lt-code-gt" class="headerlink" title="<code>"></a><code><code></code></h4><p>表現出電腦程式碼的片段</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><html></span><br><span class="line"> <body></span><br><span class="line"> <p>The <code> push()</code> Labore labore et cupidatat occaecat.</p></span><br><span class="line"> </body></span><br><span class="line"></html></span><br></pre></td></tr></table></figure>
<table>
<tr>
<th>輸出</th>
</tr>
<tr>
<td>
<html>
<body>
<p>The <code>push()</code> Labore labore et cupidatat occaecat.</p>
</body>
</html>
</td>
</tr>
</table>
<h3 id="鍵盤文本"><a href="#鍵盤文本" class="headerlink" title="鍵盤文本"></a>鍵盤文本</h3><h4 id="lt-kbd-gt"><a href="#lt-kbd-gt" class="headerlink" title="<kbd>"></a><code><kbd></code></h4><p>顯示類似鍵盤的圖示</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><html></span><br><span class="line"> <body></span><br><span class="line"> <p>Please press <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>R</kbd> to re-render an page.</p></span><br><span class="line"> </body></span><br><span class="line"></html></span><br></pre></td></tr></table></figure>
<table>
<tr>
<th>輸出</th>
</tr>
<tr>
<td>
<html>
<body>
<p>Please press <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>R</kbd> to re-render an page.</p>
</body>
</html>
</td>
</tr>
</table>
<h2 id="結語"><a href="#結語" class="headerlink" title="結語"></a>結語</h2><p>本章主要示範目前會對字體產生變化的HTML標籤。</p>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article itemscope itemtype="http://schema.org/Article" class="post-block home" lang="zh-TW">
<link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/03/11/HTML-3/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/cat.jpg">
<meta itemprop="name" content="Ivey">
<meta itemprop="description" content="">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Ivey">
</span>
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a href="/2020/03/11/HTML-3/" class="post-title-link" itemprop="url">HTML-3</a>
</h1>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">發表於</span>
<time title="創建時間:2020-03-11 04:48:00 / 修改時間:20:45:42" itemprop="dateCreated datePublished" datetime="2020-03-11T04:48:00+08:00">2020-03-11</time>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article itemscope itemtype="http://schema.org/Article" class="post-block home" lang="zh-TW">
<link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/03/10/HTML-2/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/cat.jpg">
<meta itemprop="name" content="Ivey">
<meta itemprop="description" content="">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Ivey">
</span>
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a href="/2020/03/10/HTML-2/" class="post-title-link" itemprop="url">HTML 基礎</a>
</h1>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">發表於</span>
<time title="創建時間:2020-03-10 21:12:11" itemprop="dateCreated datePublished" datetime="2020-03-10T21:12:11+08:00">2020-03-10</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-check-o"></i>
</span>
<span class="post-meta-item-text">更新於</span>
<time title="修改時間:2020-03-11 20:45:23" itemprop="dateModified" datetime="2020-03-11T20:45:23+08:00">2020-03-11</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="fa fa-folder-o"></i>
</span>
<span class="post-meta-item-text">分類於</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/HTML/" itemprop="url" rel="index"><span itemprop="name">HTML</span></a>
</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<img src="https://images.unsplash.com/photo-1542831371-29b0f74f9713?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80" alt="html" height="450" />
<h2 id="HTML是什麼?"><a href="#HTML是什麼?" class="headerlink" title="HTML是什麼?"></a>HTML是什麼?</h2><p>HTML是 Hyper Text Markup Language的首字縮寫,中文為超文本標記語言。</p>
<p>提到HTML就不得不提網頁瀏覽器,網頁瀏覽器的種類很多,最常見的就是Google Chrome,然後還有Internet Explorer,這些瀏覽器讀取HTML的文本,根據HTML的標籤,將其中的文字、圖片、影片等等,排列組合後,呈現可視覺化的網頁。</p>
<p>所以HTML是給瀏覽器看的,區域應該多寬多長,文字要多大多小,瀏覽器會從上而下的讀取文本,並決定要呈現什麼出來,基本上網頁瀏覽器都支援HTML,因為HTML是網頁的標準標記語言。</p>
<p>瀏覽器在解析HTML有自己的容錯處理機制,無效的內容會糾正或不顯示,所以有時缺少標籤時,仍然可以正常顯示畫面</p>
<h2 id="HTML-文件的架構"><a href="#HTML-文件的架構" class="headerlink" title="HTML 文件的架構"></a>HTML 文件的架構</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><!DOCTYPE html></span><br><span class="line"><html></span><br><span class="line"> <head></span><br><span class="line"> <meta charset=<span class="string">"utf-8"</span>></span><br><span class="line"> <title>我的標題</title></span><br><span class="line"> </head></span><br><span class="line"> <body></span><br><span class="line"> </span><br><span class="line"> </body></span><br><span class="line"></html></span><br></pre></td></tr></table></figure>
<ul>
<li><code><!DOCTYPE></code>- 為了讓瀏覽器知道這個頁面的文件類型是什麼,瀏覽器根據該標籤來決定要怎麼支援顯示出來的畫面,如果沒有宣告的時候,大部份的瀏覽器會以它們自訂的默認的 DOCTYPE 解釋該頁的 HTML,有可能會出現使用者看到的畫面不完全相同的情形</li>
<li><code><html></html></code>-除了宣告用的<code><!DOCTYPE></code>,所有要顯示的內容都要放在這個標籤的範圍內,它又被稱為根元素(root element)</li>
<li><code><head></head></code>-這裡是要放置<b>不顯示於畫面上的預存資訊</b>,像是引用的樣式文件、搜尋結果的關鍵字、頁面說明。</li>
<li> <code><body></body></code>-這裡是要放置<b>顯示於畫面上的內容</b>,像是文字、圖片、影片。</li>
<li> <code><meta charset="utf-8"></code>-指定你的網頁文件要使用的字元編碼。</li>
<li><code><title></title></code>-呈現於網頁瀏覽者眼前的網頁標題</li>
</ul>
<h2 id="HTML-元素的組成"><a href="#HTML-元素的組成" class="headerlink" title="HTML 元素的組成"></a>HTML 元素的組成</h2><p>在看HTML文件的架構的時候,會發現有一些元素只有一個標籤,有一些元素卻有成對的標籤,還有標籤包著標籤的狀況</p>
<h4 id="一般的元素"><a href="#一般的元素" class="headerlink" title="一般的元素"></a>一般的元素</h4><p>大部份的元素都是成對的標籤,在相對的標籤之間插入想要顯示的內容。</p>
<p>需特別注意,後面的標籤在標籤名稱前面多了一個前置鈄線<code>/</code>是為了來表示元素的結束。</p>
<p>成對標籤大部份的情況下,還可以再放入其他的標籤</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><p>Id adipisicing consectetur tempor</p></span><br></pre></td></tr></table></figure>
<h4 id="空元素"><a href="#空元素" class="headerlink" title="空元素"></a>空元素</h4><p>部份元素不需要放入內容,所以只有一個標籤,並根據它的屬性,與該標籤存在的特性來顯示相應的畫面</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><img src=<span class="string">"images/test.png"</span> alt=<span class="string">"this is test"</span>></span><br></pre></td></tr></table></figure>
<h4 id="巢狀元素"><a href="#巢狀元素" class="headerlink" title="巢狀元素"></a>巢狀元素</h4><p>部份元素與一般元素的可以放入其他標籤的狀況不同,它們只能放入特定的標籤,例如:<code><ul></code>、<code><ol></code></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><ul></span><br><span class="line"> <li>Pariatur</li></span><br><span class="line"> <li>veniam</li></span><br><span class="line"> <li>nisi</li></span><br><span class="line"></ul></span><br></pre></td></tr></table></figure>
<h2 id="結語"><a href="#結語" class="headerlink" title="結語"></a>結語</h2><p>本章主要講解HTML與瀏覽器的關係,和HTML元素的構成</p>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
</div>
<script>
window.addEventListener('tabs:register', () => {
let { activeClass } = CONFIG.comments;
if (CONFIG.comments.storage) {
activeClass = localStorage.getItem('comments_active') || activeClass;
}
if (activeClass) {
let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
if (activeTab) {
activeTab.click();
}
}
});
if (CONFIG.comments.storage) {
window.addEventListener('tabs:click', event => {
if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
let commentClass = event.target.classList[1];
localStorage.setItem('comments_active', commentClass);
});
}
</script>
</div>
<div class="toggle sidebar-toggle">
<span class="toggle-line toggle-line-first"></span>
<span class="toggle-line toggle-line-middle"></span>
<span class="toggle-line toggle-line-last"></span>
</div>
<aside class="sidebar">
<div class="sidebar-inner">
<ul class="sidebar-nav motion-element">
<li class="sidebar-nav-toc">
文章目錄
</li>
<li class="sidebar-nav-overview">
本站概要
</li>
</ul>
<!--noindex-->
<div class="post-toc-wrap sidebar-panel">
</div>
<!--/noindex-->
<div class="site-overview-wrap sidebar-panel">
<div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
<img class="site-author-image" itemprop="image" alt="Ivey"
src="/images/cat.jpg">
<p class="site-author-name" itemprop="name">Ivey</p>
<div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap motion-element">
<nav class="site-state">
<div class="site-state-item site-state-categories">
<a href="/categories/">
<span class="site-state-item-count">1</span>
<span class="site-state-item-name">分類</span></a>
</div>
<div class="site-state-item site-state-tags">
<a href="/tags/">
<span class="site-state-item-count">17</span>
<span class="site-state-item-name">標籤</span></a>
</div>
</nav>
</div>
</div>
</div>
</aside>
<div id="sidebar-dimmer"></div>
</div>
</main>
<footer class="footer">
<div class="footer-inner">
<div class="copyright">
©
<span itemprop="copyrightYear">2020</span>
<span class="with-love">
<i class="fa fa-user"></i>
</span>
<span class="author" itemprop="copyrightHolder">Ivey</span>
</div>
<div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> 強力驅動 v4.2.0
</div>
<span class="post-meta-divider">|</span>
<div class="theme-info">主題 – <a href="https://theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Gemini</a> v7.7.2
</div>
</div>
</footer>
</div>
<script src="/lib/anime.min.js"></script>
<script src="/lib/velocity/velocity.min.js"></script>
<script src="/lib/velocity/velocity.ui.min.js"></script>
<script src="/js/utils.js"></script>
<script src="/js/motion.js"></script>
<script src="/js/schemes/pisces.js"></script>
<script src="/js/next-boot.js"></script>
<script src="/js/bookmark.js"></script>
</body>
</html>