4. Did you add a font-family property of Palatino with fall-back fonts of 'Palatino Linotype' and serif?


#1

This is the entire coding;

<!DOCTYPE html>
<html>
<head>
	<title>Sprout</title>
	<link rel="stylesheet" type="text/css" href="main.css"/>
  h1 {
        font-family: Palatino, 'Palatino Linotype', serif;
  }
  
</head>
<body>
	<h1>Mystwood Publishers Ltd.</h1>
	<div class="hero">
		<h2>Sprout.</h2>
		<p>A book by J. Daniel Bedford</p>
		<a href="#">Read now.</a>
	</div>
	<p>&copy; Mystwood Publishers Limited</p>
</body>
</html>

pls refer to my h1 styling; when I launch it, it gives this error message: Did you add a font-family property of Palatino with fall-back fonts of 'Palatino Linotype' and serif?
I have even tried a different browser from chrome to microsoft edge but it doesnt help. please can someone help identify my error?


#2

@felxebe1,

h1 {
 font-family: Palatino, 'Palatino Linotype', serif;
 }

You had to insert this so-called rule-set
into your CSS-file......and NOT in your HTML-file.

https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax
https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_started/What_is_CSS


#3

Thank you very much. but per the code, which part of it will be defined as the CSS file? I still do not know exactly where to insert it. Again this is the entire code: pls advise me where exactly to insert the CSS code.

<!DOCTYPE html>
<html>
<head>
	<title>Sprout</title>
	<link rel="stylesheet" type="text/css" href="main.css"/>
  
  
</head>
<body>
	<h1>Mystwood Publishers Ltd.</h1>
 
	<div class="hero">
		<h2>Sprout.</h2>
		<p>A book by J. Daniel Bedford</p>
		<a href="#">Read now.</a>
	</div>
	<p>&copy; Mystwood Publishers Limited</p>
</body>
</html>

#4

There are two tabs at the top of screen where you can input codes: index.html & main.css
Click on the "main.css" tab.


#5

try chrome it may be help


#6

Thank you! I was able to identify and fix it immediately. The main.css is on a different tab as opposed to the html side. It's an easy mistake to make in the beginning!


#7

Just close to the index.html tab where we were working in the previous exercise there is the main.css tab (top right). Really silly mistake but took me a while to realise. Thank you guys


#8

I had the same issue. I think this exercise could be worded MUCH clearer, very confusing as currently explained.


#9