Eliot Yoon
Eliot Yoon

Reputation: 38

Trying to get my span text to be bold and have a bigger font

I'm trying to get my span to be bold and have a different font than my paragraph. The CSS is correctly linked to my html.

span.bold {
  font-size: 20px;
  font-weight: 700;
}

p {
  font-size: 16px;
  color: black;
  font-family: sans-serif;
  padding: 22px;
  max-width: 60%;
  display: inline-block;
  margin-top: 0px;
}
<p align="center">
  <span="bold">Welcome to Coding Club for Web Developers</span> <br> Coding Club web developers is specifically designed to teach the basics of making a website by learning HTML, Javascript, and CSS. Using Discord, we talk with our team to learn from each other and
    to design for our upcoming projects. As a beginner or an amateur, you'll learn everything you need to know about Web Development. To practice, you can go to W3Schools, Sololearn, or Codecademy. <br>

Upvotes: 0

Views: 8399

Answers (2)

Sanchit Patiyal
Sanchit Patiyal

Reputation: 4920

You need to specify class keyword span=bold doesn't mean anything

span.bold {
  font-size: 20px;
  font-weight: 700;
}

p {
  font-size: 16px;
  color: black;
  font-family: sans-serif;
  padding: 22px;
  max-width: 60%;
  display: inline-block;
  margin-top: 0px;
}
<p align="center">
  <span class="bold">Welcome to Coding Club for Web Developers</span> <br> Coding Club web developers is specifically designed to teach the basics of making a website by learning HTML, Javascript, and CSS. Using Discord, we talk with our team to learn from each other and
    to design for our upcoming projects. As a beginner or an amateur, you'll learn everything you need to know about Web Development. To practice, you can go to W3Schools, Sololearn, or Codecademy. <br>

Upvotes: 7

Ammar Alyousfi
Ammar Alyousfi

Reputation: 4382

If you want to assign a class named bold to span element, you do it with:

<span class="bold">

not with

<span="bold">

Upvotes: 0

Related Questions