htmlコードの作り方
- yokowax0621
- 2024年12月29日
- 読了時間: 1分
①開始/終了タグ(見出しタグ)について
<h1>~</h1>
<h1>→開始タグ
</h1>→終了タグ ※/が必要
②pタグについて
<p>~</p>
段落を表示する
③aタグについて
リンクを設置する
<a href="https://youtube.com">~</a>
href=属性タグ
④ネストについて
例:<p>Let' see <a href='https://youtube.com>youtube!</a></p>
⑤セクションについて
<section>
<h1>~</h1>
<p>~</p>
</section>
⑥最重要タグについて
<!DOCTYPE html>※重要
<html>
<head>
<meta carset="utf-8"> utf-8は文字化け防止
<meta name="viewport" content="width=device-width, initial-scale=1">これは丸暗
<title>~</title>タイトル名
<meta name="description" content="~">検索時に表示されるタイトル
</haed>
<body>
<h1>~</h1>
<p>~</p>
<a href="https://youtube.com">~</a>
</body>
</html> htmlの終了
作ってみる
<!DOCTYPE html>
<html>
<head>
<meta carset="utf-8".
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>test</title>
<meta name="description" content="test">
</head>
<body>
<h1>testdesu<h1>
<p>test2desu<p>
<p>let is go to <a href="https://youtube.com"</a>youtube!</p>
</body>
</html>
応用編も今度投稿します
Comments