今課題でこの写真と同じサイトを作らないといけないのですが、CSS Validator でWarning が出てしまいます。この警告の出どころが
ここ何ですが、
どうしたら警告を消して、なおかつウェブも少しも変えることはなくできるのでしょうか?
HTML
1<!DOCTYPE html> 2<html> 3 <head> 4 <meta charset="UTF-8"> 5 <link rel = "stylesheet" type = "text/css" href = "receipe2_style.css"> 6 <title>recipe2</title> 7 </head> 8 <body> 9 <h1>Recipe #1</h1> 10 <div> 11 <h2>Chocolate Rough</h2> 12 13 14 15 16 <!-- Division The <div> tag defines a division or a section in an HTML document. 17 The <div> tag is used to group block-elements to format them with CSS.--> 18 <figure><!-- image part division --> 19 <img src = "chocRough.jpg" alt="chocolate_cake"> 20 </figure> 21 22<!-- "Base" Ingredients part division --> 23 <section> 24 <h3>Base Ingredients:</h3> 25 <ul> 26 <li>110g butter</li> 27 <li>1 cup sugar</li> 28 <li>2 tsp cocoa</li> 29 <li>2½ tsp golden syrup</li> 30 <li>1 cup flour</li> 31 <li>1 tsp baking powder</li> 32 <li>¾ cup coconut</li> 33 </ul> 34 </section> 35 36<!-- "Icing Ingredients part" --> 37 <section id= "Icing"> 38 <h3>Icing Ingredients:</h3> 39 <ul> 40 <li>1 cup icing sugar</li> 41 <li>25g melted butter</li> 42 <li>2 tsp cocoa</li> 43 <li>¾ tsp golden syrup</li> 44 <li>A little water to <br>combine</li> 45 </ul> 46 </section> 47 48 <p>Cream butter and sugar together. Add golden syrup. Add sifted cocoa, flour and baking powder. Add coconut. Combine and press into a shallow tin. Bake at 180°c for 20 - 30 minutes. Ice while still warm. 49 </p> 50 <p>To make icing: sift icing sugar and cocoa together, stir through coconut and then add butter and enough water to mix to a stiff paste. 51 </p> 52 53 </div> 54 </body> 55</html>
CSS
1html{ 2background-color:rgb(235, 255, 249); 3color:inherit; 4} 5 6body{ 7 font-family: "Arial" , Verdana, sans-serif; 8 color:#4ca68d; 9 background-color:inherit; 10} 11 12/* Main heading */ 13h1{ 14 text-align:center; 15 font-family: "Times New", Times, serif; 16} 17/* Chocolate Rough*/ 18h2{ 19 margin:0px auto; 20 position:relative; 21 top:-50px; 22 left:-13px; 23 margin-bottom:-28px; 24 font-family: "Times New", Times, serif; 25 } 26 27h3{ 28 29 margin:0px; 30 font-family: "Times New", Times, serif; 31} 32/* Inside part */ 33div{ 34 35 background-color:#fff9eb; 36 color:inherit; 37 margin:20px auto; 38 padding:20px 15px 20px 15px; 39 border:none; 40 width:670px; 41 height:313px; 42} 43 44 45/* chocolate image */ 46figure{ 47 float:left; 48 margin:0px; 49 width:223px; 50 51 52 53 54} 55 56figure+section{ 57 border-right:1px solid; 58 59 60 61 62} 63 64/* Base_Ingredients */ 65section{ 66 width:223px; 67 float:left; 68} 69#Icing h3{ 70 margin-left:30px; 71} 72#Icing ul{ 73 74 margin-left:75px; 75} 76section ul{ 77 78 margin-bottom:0px; 79 margin-top:0px; 80 margin-left:43px; 81 padding-left:0px; 82 83 84} 85section ul li{ 86 text-indent:-4px; 87} 88 89 90 91p{ 92 text-align: justify; 93 text-justify:inter-word; 94 clear:left; 95 margin-top:0px; 96 margin-bottom:0px; 97 padding-top:20px; 98 99 100} 101 102 103 104 105コード
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。