📋 チートシート

よく使うタグ・プロパティ・構文の早見表です。

💡 Ctrl+P(Mac: Cmd+P)で印刷して手元に置いておくと便利です。

🌐 HTMLタグ一覧 詳しく見る →

タグ用途
<!DOCTYPE html>HTML5宣言(1行目に書く)<!DOCTYPE html>
<html>HTML全体の入れ物<html lang="ja">
<head>設定情報(画面に表示されない)<head><title>...</title></head>
<body>画面に表示する内容<body>...</body>
<h1><h6>見出し(h1が最大)<h1>タイトル</h1>
<p>段落<p>文章</p>
<a>リンク<a href="URL">テキスト</a>
<img>画像(終了タグ不要)<img src="photo.jpg" alt="説明">
<ul> / <ol> / <li>リスト(ul=箇条書き、ol=番号付き)<ul><li>項目</li></ul>
<table> / <tr> / <td>表(tr=行、td=セル、th=見出しセル)<table><tr><td>データ</td></tr></table>
<form>フォームの入れ物<form>...</form>
<input>入力欄(終了タグ不要)<input type="text" id="name">
<button>ボタン<button type="submit">送信</button>
<div>ブロック要素の入れ物<div class="card">...</div>
<span>インライン要素の入れ物<span class="red">赤い文字</span>

🎨 CSSプロパティ一覧 詳しく見る →

プロパティ用途値の例
color文字色color: #3a86ff;
font-size文字サイズfont-size: 16px;
font-weight文字の太さfont-weight: bold;
background-color背景色background-color: #f0f4ff;
border枠線(太さ・種類・色)border: 2px solid #ccc;
border-radius角丸border-radius: 8px;
margin外側の余白margin: 16px auto;
padding内側の余白padding: 24px;
display表示方法display: flex;
justify-contentFlex横方向の揃えjustify-content: center;
align-itemsFlex縦方向の揃えalign-items: center;
flex-directionFlex並ぶ方向flex-direction: column;
width / height幅 / 高さwidth: 300px;
@mediaメディアクエリ(レスポンシブ)@media (min-width: 768px) {}
box-sizing幅の計算方法box-sizing: border-box;

⚡ JavaScript構文一覧 詳しく見る →

構文用途
let / const変数宣言(let=変更可、const=変更不可)const name = "田中";
if / else条件分岐if (x > 0) { } else { }
for繰り返しfor (let i = 0; i < 5; i++) { }
while条件付き繰り返しwhile (条件) { }
function関数定義function greet(name) { return "Hello " + name; }
=>アロー関数const add = (a, b) => a + b;
console.log()コンソールに出力console.log("hello");
getElementById()idで要素を取得document.getElementById("title")
querySelector()CSSセレクタで要素を取得document.querySelector(".btn")
textContentテキストを変更el.textContent = "新しいテキスト";
addEventListener()イベント登録btn.addEventListener("click", fn)
createElement()新しい要素を作るdocument.createElement("li")
appendChild()子要素を追加ul.appendChild(li)
Math.random()0〜1のランダムな数Math.floor(Math.random() * 10)
localStorageブラウザにデータを保存localStorage.setItem("key", "value")

📦 Gitコマンド一覧

コマンド説明
git initリポジトリを作成git init
git addステージに追加git add .
git commit変更を記録git commit -m "メッセージ"
git status状態を確認git status
git log履歴を確認git log --oneline
git pushリモートに送信git push origin main
git pullリモートから取得git pull origin main
git branchブランチ一覧git branch
git checkout -bブランチ作成&切替git checkout -b feature
git mergeブランチを統合git merge feature

📄 個別チートシート

🔗 関連ページ