In: Computer Science
Use CSS to format the appearance of a web page containing several literary quotes marked as blockquote elements. Figure 2–54 shows a preview of the formatted page.
Figure 2-54
Do the following:
1.Open the files code2-1.html and code2-1.css and in the comment section enter your name (First + Last) and the date (MM/DD/YYYY) into the Author: and Date: fields of each file.
2. Go to the code2-1.html file and within the head section insert a link element linking the page to the code2-1.css file. Review the contents.
3.In the code2-1.css file create a style rule for the h1 element that sets the font-size property to 3.5em and sets the line-height property to 0em.
4.Create a style rule for h1 and h2 elements that applies the fonts Helvetica, Arial, sans-serif to the font-family property and sets the letter-spacing property to 0.1em.
5. Create a style rule for the blockquote element that sets the color property to the value hsl(30, 85%, 45%) and sets the font-size property to 1.5em. Also, create a style for the first letter of the blockquote element that sets the font-size property to 1.5em.
6. Create a style for the footer element that:
7. Open the code2-1.html file in browser preview, verifying that the page resembles that shown in Figure 2–54 (aside from the line length which depends on the width of your browser window.)
Pages to be edited:
code2-1.css:
@charset "utf-8";
/*
New Perspectives on HTML5 and CSS3, 8th Edition
Tutorial 2
Coding Challenge 1
Author:Alexandria Woodson
Date: 10/6/2020
Filename: code2-1.css
code2-1.html:
<!doctype html>
<html lang="en">
<head>
<!--
New Perspectives on HTML5 and CSS3, 8th Edition
Tutorial 2
Coding Challenge 1
Author:
Date:
Filename: code2-1.html
-->
<meta charset="utf-8">
<title>Coding Challenge 2-1</title>
</head>
<body>
<h1>Literary Excerpts</h1>
<h2>A Selection of Great Prose</h2>
<blockquote>
We are the music-makers, And we are the dreamers of dreams, Wandering
by lone sea-breakers, And sitting by desolate streams. World-losers and
world-forsakers, Upon whom the pale moon gleams; Yet we are the movers
and shakers, Of the world forever, it seems.<br />
— <cite>Arthur O’Shaughnessy, Poems of Arthur O’Shaughnessy</cite>
</blockquote>
<blockquote>
I took a deep breath and listened to the old brag of my heart.
I am, I am, I am.<br />
— <cite>Sylvia Plath, The Bell Jar</cite>
</blockquote>
<blockquote>
The most beautiful things in the world cannot be seen or touched, they
are felt with the heart.<br />
— <cite>Antoine de Saint-Exupéry, The Little Prince</cite>
</blockquote>
<blockquote>
Stuff your eyes with wonder, he said, live as if you’d drop dead in ten
seconds. See the world. It’s more fantastic than any dream made
or paid for in factories.<br />
— <cite>Ray Bradbury, Fahrenheit 451</cite>
</blockquote>
<footer>
The Word Factory
</footer>
</body>
</html>
Kindly upvote if
this helped
HTML
<!doctype html>
<html lang="en">
<head>
<link rel="stylesheet" href="code2-1.css">
<meta charset="utf-8">
<title>Coding Challenge 2-1</title>
</head>
<body>
<h1>Literary Excerpts</h1>
<h2>A Selection of Great Prose</h2>
<blockquote>
We are the music-makers, And we are the dreamers of dreams, Wandering
by lone sea-breakers, And sitting by desolate streams. World-losers and
world-forsakers, Upon whom the pale moon gleams; Yet we are the movers
and shakers, Of the world forever, it seems.<br />
— <cite>Arthur O’Shaughnessy, Poems of Arthur O’Shaughnessy</cite>
</blockquote>
<blockquote>
I took a deep breath and listened to the old brag of my heart.
I am, I am, I am.<br />
— <cite>Sylvia Plath, The Bell Jar</cite>
</blockquote>
<blockquote>
The most beautiful things in the world cannot be seen or touched, they
are felt with the heart.<br />
— <cite>Antoine de Saint-Exupéry, The Little Prince</cite>
</blockquote>
<blockquote>
Stuff your eyes with wonder, he said, live as if you’d drop dead in ten
seconds. See the world. It’s more fantastic than any dream made
or paid for in factories.<br />
— <cite>Ray Bradbury, Fahrenheit 451</cite>
</blockquote>
<footer>
The Word Factory
</footer>
</body>
</html>
CSS:
* Name of CSS file should be code2-1.css
h1{
font-size:3.5em;
line-height:0em;
}
h1,h2{
font-family:Helvetica, Arial, sans-serif;
letter-spacing:0.1em;
}
blockquote{
color: hsl(30, 85%, 45%);
font-size:1.5em;
}
blockquote:first-letter{
font-size:1.5em;
}
footer{
text-align:center;
font-size:2em;
color:#ffffff;
background-color:hsl(30, 85%, 45%);
}
Final output