上記のように、リンクの上に段落を入れたいのですが、入れ方がわかりません。
「むかしむかし〜」の文と「おばあさんが〜」の分の間を1文字分のみ開けたまま
「HTML」
HTML
1<!DOCTYPE html> 2<html lang="ja"> 3<head> 4<meta charset="UTF-8"> 5<title>昔話</title> 6<link rel="stylesheet" href="challenge_momotaro.css"> 7</head> 8<body> 9 <h1>桃太郎</h1> 10 <p>むかしむかし、あるところにおじいさんとおばあさんが住んでいました。おじいさんは山へ芝刈りに、おばあさんは川に洗濯に行きました。</p> 11 <p>おばあさんが洗濯をしていると、川上からどんぶらこどんぶらこと、大きな桃が流れてきました。</p> 12 <a href="http://codecamp.jp">CodeCamp</a> 13</div> 14</body> 15</html>
「CSS」
CSS
1body{ 2 background-color: black; 3} 4 5h1 { margin-top: 0; margin-bottom: 0;} 6a { margin-top: 2;} 7p { margin-top: 0; margin-bottom: 0; } 8 9h1{ 10 font-size: 24px; 11 color:red; 12 text-align: center; 13 padding: 0.5em 0; 14 border-top: dashed 3px white; 15 border-bottom: dashed 3px white;› 16 padding:0.5 0; 17} 18 19p{ 20 font-size: 16px; 21 color:#ffffff; 22} 23 24a{ 25 font-size: 16px; 26 color: #4b0082; 27}
回答1件
あなたの回答
tips
プレビュー