Copy the code below, and add embedded (internal) styles so that it looks like the image below.  You will need the following colours: #E5F4E1 and #017B1B. Use any image you like for dogs.jpg. (you do not need to submit your image, you only need to submit your code).   Document Amazing facts about dogs Did you know that dogs can only see two colours and can smell cancer and diabetes? And they can learn over 100 words and gestures! More fun facts

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Copy the code below, and add embedded (internal) styles so that it looks like the image below.  You will need the following colours: #E5F4E1 and #017B1B. Use any image you like for dogs.jpg. (you do not need to submit your image, you only need to submit your code).

 

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
body {
margin: 80px;
}
article {
width: 360px;
font-family: sans-serif;
}

</style>
</head>

<body>
<article>
<div class="header">
<h2>Amazing facts about dogs</h2>
</div>
<div>
<img src="images/dogs.jpg" alt="dogs">
<p>Did you know that dogs can only see two colours and can smell cancer and diabetes?</p>
<p>And they can learn over 100 words and gestures!</p>
<a href="dogs.html">More fun facts</a>
</div>
</article>
</body>

</html>
Expert Solution
Step 1: Algorithm:

Algorithm: Styling a Webpage with Embedded (Internal) Styles

1. Start with an HTML document.
2. Within the `<head>` section of the HTML document:
   a. Define the character set with <meta charset="UTF-8">.
   b. Set the title of the document with <title>.
   c. Include a `<style>` block to add embedded (internal) CSS.
3. Inside the `<style>` block, define the following styles:
   a. Set the background color of the body to #E5F4E1.
   b. Center the content in the middle of the page using flexbox.
   c. Style the article with a white background, padding, and a box shadow.
   d. Add text-align: center to center the content inside the article.
   e. Style the header with a green background (#017B1B) and white text.
   f. Style the heading with no margin to remove default spacing.
   g. Set the image width to 100% and limit its height to 250px.
   h. Add margin to the paragraphs for spacing.
   i. Style the link with a green background and white text.
   j. On hover, change the link's background color to a darker green (#015415).
4. In the `<body>` section, create an `<article>` element.
5. Inside the `<article>` element:
   a. Create a `<div>` with a class of "header" for the header.
   b. Add an `<h2>` with the title text.
   c. Include an `<img>` element with the source set to "dogs.jpg" and alt text.
   d. Add two `<p>` elements for information about dogs.
   e. Create an `<a>` element with an href to "dogs.html" for additional facts.
6. Close the HTML document.

Ensure that "dogs.jpg" is a valid image file in the same directory as the HTML file. The HTML file, image, and CSS styles should work together to create the desired web page layout with the specified colors and styles.

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Hyperlinks
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education