テキスト関連タグ


見出しラベル


h(heading)タグは、タイトル表示時にh 1〜h 6がある.
h 1は最も重要なタイトルを意味し、サイズも最大である.
検索エンジンはタイトルラベルを重要な意味と見なしているので、タイトル以外では使用しないほうがいいです.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h1>Heading 1</h1>
    <h2>Heading 2</h2>
    <h3>Heading 3</h3>
    <h4>Heading 4</h4>
    <h5>Heading 5</h5>
    <h6>Heading 6</h6>
</body>
</html>

フォントタグ


1.bラベル


太字を指定します.意味の重要性がない
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>This text is normal.</p>
    <b>This text is bold.</b>
    <p style="font-weight: bold;">This text is bold.</p>
</body>
</html>

2.強いラベル


bマークと同じ太字を指定します.
意義論の重要性を持つ.Web規格の遵守を強く求める
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>This text is normal.</p>
    <strong>This text is strong.</strong>
</body>
</html>

3.iラベル


Italic体を指定します.意味論の重要性がない.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>This text is normal.</p>
    <i>This text is italic.</i>
    <p style="font-style: italic;">This text is italic.</i>
</body>
</html>

4.emタグ


強調するテキストを指定します.iラベルのようにItalic体で表現することは,意味論的重要性を持つ.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>This text is normal.</p>
    <em>This text is emphasized.</em>
</body>
</html>

5.小さなラベル


小さなテキストを指定します.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h2>HTML <small>Small</small> Formatting</h2>
</body>
</html>

6.markタグ


ハイライトテキストを指定します.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h2>HTML <mark>Marked</mark> Formatting</h2>
</body>
</html>

7.delラベル


削除するテキストを指定します.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>The del element represents deleted (removed) text.</p>
    <p>My favorite color is <del>blue</del> red.</p>
</body>
</html>

8.insラベル


追加するテキストを指定します.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>The ins element represent inserted (added) text.</p>
    <p>My favorite <ins>color</ins> is red.</p>
</body>
</html>

9.sub/supラベル


subタグはサブスクリプション(書き込み)テキストを指定し、supタグは上付きテキストを指定します.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>This is <sub>subscripted</sub> text.</p>
    <p>This is <sup>superscripted</sup> text.</p>
</body>
</html>

テキストタグ


1. p


段落を指定します.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h1>This is a heading.</h1>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.Ut enim ad minim veniam,</p>
    <p> quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat</p>
</body>
</html>

2. br


brラベルは開行を指定します.空の要素として終了フラグがありません
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>This is<br>a para<br>graph with line breaks</p></body>
</html>

3. pre


書式設定テキストを指定します.タグの内部に作成されたコンテンツをブラウザに表示
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <pre>
        let hello = "Hello world!!";
        console.log(hello);
    </pre>
</html>

4. hr


水平線を追加します.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h1>HTML</h1>
    <hr>
    <h1>CSS</h1>
</html>

5. q


短い引用文を指定します.q要素の内容を二重引用符で囲む.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>HTML is <q>Hyper Text Markup Language</q></p>
</html>

6. blockquote


長い引用文を指定します.ブラウザのblockquote要素のインデント
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    Lorem ipsum dolor sit amet
    <blockquote>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
    </blockquote>
</html>