Jump to content

Font family not changing in CSS


Bebo Khouja
 Share

Recommended Posts

I want to style my website using CSS but it does not change font family. How to fix this?

This is html code:

<!DOCTYPE html>

  

  <!-- ANGER. You are not supposed to be here! -->

  

<!-- Do Not edit this code and/or files unless you are a staff -->

  

  <!-- Use The left,center,right value for align= -->

	

  <html> <!-- HTML Start-->

 <!-- Header -->

  <head>

 <meta charset="UTF-8">

 <meta name="description" content="Mokka Chocolata">

 <meta name="keywords" content="Youtube,Discord,Instagram ,And Roblox!">

 <meta name="author" content="">

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

 <title>YouTube,Discord,Instagram,And Roblox! - Mokka Chocolata</title>

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

<!-- DANGER: DO NOT COPY --> <script type="text/javascript">

var _smartsupp = _smartsupp || {};

_smartsupp.key = 'd3b676d5423287c5c984896d6238c9f446955e43';

window.smartsupp||(function(d) {

  var s,c,o=smartsupp=function(){ o._.push(arguments)};o._=[];

  s=d.getElementsByTagName('script')[0];c=d.createElement('script');

  c.type='text/javascript';c.charset='utf-8';c.async=true;

  c.src='https://www.smartsuppchat.com/loader.js?';s.parentNode.insertBefore(c,s);

})(document);

</script>

  </head> <!-- Header End -->

  <body> <!-- Body -->

 <!-- Letters -->

  

    <h1 align="center">Mokka <br> Chocolata</h1>

 <p align="center">

 <a href="/links.html">Links</a> <br>

 <a href="/application.html">Apply for staff</a> <br>

    <a href="https://mokkachocolata1.statuspage.io/">Web Status</a> <br>

 <a href="/secureconnection.html">Secure connection Help</a> <br>

	

   <a> Our Bot! </a> <br>

   <a href="https://discordbotlist.com/bots/857259867827208192"><img src="https://discordbotlist.com/api/v1/bots/857259867827208192/widget"></a>

 </p>

  </body> <!-- Body End-->

</html> <!-- HTML End-->

And CSS code (sorry if the } is missing)

body
{
  font-size: 28pt;
  font-family:sans-serif

But instead it's not changing font

Screenshot_2021-08-08-11-32-57-91.jpg

Link to comment
Share on other sites

It would probably help to end the line with a ; semi-colon. If not, it will mix up with the CSS rule that follows it and neither of them will work.

If that does not fix the problem, then there is probably code further down in the stylesheet which is setting the font.

Link to comment
Share on other sites

1 hour ago, Ingolme said:

It would probably help to end the line with a ; semi-colon. If not, it will mix up with the CSS rule that follows it and neither of them will work.

If that does not fix the problem, then there is probably code further down in the stylesheet which is setting the font.

It does not work. These code are correct:

body

{

  font-size: 28pt;

  font-family:sans-serif;

}

Link to comment
Share on other sites

Without seeing the rest of the CSS stylesheet or testing the page myself, I am not able to know what is causing this problem.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...