Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
9th Edition
ISBN: 9780134801148
Author: Terry Felke-Morris
Publisher: PEARSON
Question
Book Icon
Chapter 6, Problem 3AYK

Given code:

The given code is used to display a web page contains the style properties for heading, body, id selector and paragraph elements.

Screenshot of the web page

images

Error in the given code:

In above code, the heading style contains position property for the heading “Floating an Image”. Consider the above output, it not look fair for displaying a web page because each web page needs a good presentation.

  • Hence remove the position property from the heading style properties.
Program Plan Intro

Program Plan:

  • Include the HTML tag using <html>.
    • Include the header tag using <head>.
      • Include the style on the webpage using <style> tag.
        • Set the style properties for the body elements.
        • Set the style properties for the h1 elements.
        • Set the style properties for the paragraph elements.
        • Set the style properties for an id selector “yls”.
    • Close the header tag using </style>.
    • Close the header tag using </head>.
    • Open the body of the web page using <body> tag.
      • Include the heading of the web page using <h1> tag.
      • Include the <img> tag and add the image source along with the id selector.
      • Include the content to be displayed in the webpage using paragraph <p> tag.
    • Close the body using </body> tag.
  • Close the file using </html> tag.

Blurred answer
Students have asked these similar questions
Can someone tell me why my footer image isnt covering the whole bottom area and is instead leaving black areas around the perimeter? Also how do I decrease the padding so the header looks closer to the above table? <!DOCTYPE html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml"><html> <body>    <head>        <meta charset="utf-8" />        <title>HTML</title>        <link rel="stylesheet" href="style.css">    </head>    <body>        <header class="header-image">            <img src="Tardis.jpg" alt="Header Image" width="1060" />        </header>        <table style="33%">            <tr>                <th>Navigation</th>                <th>Doctor Profile</th>                <th>Image</th>            </tr>            <tr>            <tr>                <td>                    <ul>                        <li><a…
CSS and HTML Improve my code to look exactly like the picture. <!DOCTYPE html><html lang="en"><head><title>The Stuff Shop</title><meta charset="utf-8"></head><body><style> body { font-family:Verdana, Arial, sans-serif;       background-color: #800000;    text-align: center;} #wrapper { background-color: #000000;            color: #ffffff;           width: 80%;        margin: auto;           min-width: 960px;           max-width: 1200px;} nav { float: left;      width: 150px;} main {          margin-left: 0px;        padding: 200px;        background-color: #000000;        color: #fffff;} header {              color: #fffff;         font-size: 200%;         padding: 10px 10px 10px 155px;        }h1 { margin-bottom: 20px; } } #floatright { margin: 10px;              float: right;} footer { font-size:70%;         text-align: center;         clear: right;         padding: 20px;         background-color: #869dc7; }nav ul {…
JavaScript   The below HTML code sets up a template for a die. By cloring the dots (dot1,..., dot9)with black or white color, we show any of the 6 sides of the die. <!DOCTYPE html><html><head>    <meta charset="utf-8">    <meta name="viewport" content="width=device-width, initial-scale=1">    <title></title>     <style type="text/css">                 table{             border:  2px solid black;            border-radius: 5px;         }         td{             width: 20px;            height: 20px;            background-color: black;            border-radius: 50%;         }       </style></head><body> <div class="container"><div class="dice">     <table>         <tr><td id="dot1"></td><td id="dot2"></td><td id="dot3"></td></tr>         <tr><td id="dot4"></td><td id="dot5"></td><td id="dot6"></td></tr>…
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning