+ 2

web development

can you help me to explain why css doesnt work i copied html <html> <head> </head> <body> <section> <h1>The Eiffel Tower</h1> <a href="https:sololearnassets.azureedge.net/" target="blank" > <img src="https:sololearnassets.azureedge.net/eiffel-tower.jpg" alt="A Tree" width="30%" > </a> <p><b>The Eiffel Tower</b>is a wrought-iron tower that stands <strong>1,063 ft (324 m)</strong>tall in <b>Paris.</b></p> <p>Currently, the <b>Eiffel Tower</b> is the most-visited monument in the world with over <b>7 million </b>visitors a year.</p> <p>Visitors can choose to go up using the Tower lift or the stairs. There are <b>1,665 steps</b>to the top.</p> </section> <section> <h1><b>Transport</b></h1> <ul> <li> Bus: lines 42, 69, 72, 82 and 87.</li> <li>Metro: Trocadero, Ecole militaire.</li> <li>Train: Champ de Mars - Tour Eiffel, line C</li> </ul> <section> <H1 style="strong"><b>Prise:</b></H1> <table border="1"> <tr> <th>category </th> <th>price </th> </tr> <tr> <td>Adults</td> <td>12

lt;/td> </tr> <tr> <td>Children</td> <td>5
lt;/td> </tr> </table> </section> <br> <section> <form style="label"> <br><label for="adults">Adults: </label> <input type="text" id="adults" > </br> <br> <label for="CHILDREN">Children: </label> <input type="TEXT" id="children"> </br> <input type="button" value="Buy"> </form> </section> </body> <footer style="footer"> &copy </footer> </html> and css footer{ background-color: color:#595959; font-size:14px; } strong {color: #595959; } label{ font-size: 16px; font-weight: bold; }

14th Dec 2022, 12:45 PM
Vitali Gogoberidze
Vitali Gogoberidze - avatar
5 Respostas
+ 3
Again: CSS classes are applied to HTML elements with the ***class*** attribute (not with the style attribute)
14th Dec 2022, 1:05 PM
Lisa
Lisa - avatar
+ 2
Put your code in a script on playground. Do not paste it in the description. Go to Code section, click +, select web, insert your code, save. Come back to this thread, click +, Insert Code, sort for My Code Bits, select your code. CSS classes are applied to HTML elements with the class attribute (not with the style attribute)
14th Dec 2022, 12:48 PM
Lisa
Lisa - avatar
+ 1
For inline styles we use next syntax <h1 style="color:red; font-size: 18px;">Title</h1> Just style="someWord" wont do anything Also use + to add code it is little hard to read code here in Q&A it is much easier if we see it in editor.
14th Dec 2022, 12:59 PM
PanicS
PanicS - avatar
0
css and html codes are written separate files, and there is link between them foot style='' foot" in css .foot{ }
14th Dec 2022, 1:04 PM
Vitali Gogoberidze
Vitali Gogoberidze - avatar
0
Vitali Gogoberidze we access class with .className { color: red; } In html: <div class="className"></div> Not style Also there is 3 ways to add css to page: 1. Inline - inside tag we need to style using style attribute - i posted already comment for it 2. External - here we link our css file using <link> tag 3. Internal - we use <style> tag Here is more about is: https://www.w3schools.com/html/html_css.asp Check link so you can understand better
14th Dec 2022, 7:39 PM
PanicS
PanicS - avatar