Complete the style rules above by providing your Google Fonts as values to the font- family property. Be sure to include a web safe font as a fallback if the browser fails to load the Google Font. Apply the primary font class to the Level One Section Heading. Then apply the secondary font class to the Level Two Section Heading. Finally, create a style rule that applies the third Google Font to any paragraph element that immediate follows an element with the secondary font class.

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

Question

what I have so far

 

 

<!DOCTYPE html>

<html lang="en">

 

<style>

 

body{

margin: 0;

font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

background-color: #556271;

color: white;

}

 

h1{

color: #fe6a67;

text-align: center;

font-weight: normal;

text-transform: uppercase;

border-top: 1px dotted #d4dccd;

margin-top: 30px;

}

 

h2{

font-size: 1em;

text-align: center;

}

 

body{

margin: 0;

font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

}

 

h1{

width: 2px;

border-top: 1px dotted;

border-top-color: #506D84;

}

 

h2{

text-align: center;

}

 

</style>

 

 

<head>

<link rel="stylesheet" href="style.css">

<meta charset="UTF-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Document</title>

<style>

.first>h2, .second>h2, .third>h2 {

margin-top: 10px;

margin-bottom: 10px;

}

 

.image {

width: 200px;

}

</style>

</head>

 

<body>

<div class="first">

<h1>Cursus Eget</h1>

<p>Cursus EgetPurus sit amet volutpat consequat mauris nunc congue nisi vitae. Suscipit tellus mauris a diam

maecenas sed enim ut sem viverra aliquet eget sit.</p>

</div>

 

<div class="second">

<h2>Diam</h2>

<p>Urna condimentum mattis pellentesque id nibh tortor. Id aliquet lectus proin nibh nisl condimentum id

venenatis. A condimentum vitae sapien pellentesque habitant.</p>

</div>

 

<div class="third">

<h2>Aliquam Sem Fringilla</h2>

<p>Pellentesque, NecEst velit egestas dui id ornareEst ultricies integer quis auctor elit</p>

</div>

 

<img src="21.png" alt="picture" class="image">

</body>

 

</html>

1. Go to Google Fonts.
2. Search for three interesting fonts
3. To select a font family, click on the font preview and press the "select this style" button
4. When you've chosen the font families, press the View your selected families button in
the top right corner of the page.
5. Use the import rule (without the <style> tags) in your style sheet to import the font
6. Refer to the CSS declarations example in the selected families menu to learn how to use
your selected fonts
Add the following style rules to your style sheet:
primary-font {
.secondary-font {
Complete the style rules above by providing your Google Fonts as values to the font-
family property. Be sure to include a web safe font as a fallback if the browser fails to
load the Google Font.
Apply the primary font class to the Level One Section Heading. Then apply the secondary
font class to the Level Two Section Heading.
Finally, create a style rule that applies the third Google Font to any paragraph element
that immediate follows an element with the secondary font class.
Transcribed Image Text:1. Go to Google Fonts. 2. Search for three interesting fonts 3. To select a font family, click on the font preview and press the "select this style" button 4. When you've chosen the font families, press the View your selected families button in the top right corner of the page. 5. Use the import rule (without the <style> tags) in your style sheet to import the font 6. Refer to the CSS declarations example in the selected families menu to learn how to use your selected fonts Add the following style rules to your style sheet: primary-font { .secondary-font { Complete the style rules above by providing your Google Fonts as values to the font- family property. Be sure to include a web safe font as a fallback if the browser fails to load the Google Font. Apply the primary font class to the Level One Section Heading. Then apply the secondary font class to the Level Two Section Heading. Finally, create a style rule that applies the third Google Font to any paragraph element that immediate follows an element with the secondary font class.
Expert Solution
Step 1

To applying google font to the external CSS style sheet we just have to select google fonts by + symbol and then it will show the right side menu with the title "Selected Families" and in that, you can find the "Use on the web" option, and in that option, there is two more option <link> and @import choose @import option and copy inner part of <style>.

Now paste that code into your external CSS style sheet. That you can see in Step 3.

Then we have to create CSS style rules and apply those CSS style rules as a class to Level One Section Heading and Level Two Section Heading as a primary-font class and secondary-font class respectively. 

.primary-font {
   font-family: 'Londrina Solid', cursive;
}

.secondary-font {
   font-family: 'Righteous', cursive;
}

Now, we have to create a third rule for the paragraph element that immediately follows an element with a secondary-font class.

So for that, we have to use sibling selector

Sibling selector is using for the make rule for elements that immediately follow a particular element, id, or class. And element, id, or class must have the same parent element, which makes them siblings.

Syntax:

element_name/class_name/id + element_name/class_name/id {

   //  style rule

}

Example:

h1 + p {

   background-color: pink;

}

The above example's style rule will apply to all paragraph elements which immediately follow the h1 tag.

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE 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