The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> HTML Strong Tag, My entire text on html is in bold - using only one strong tag for my n
mozza251
post Apr 8 2021, 01:32 PM
Post #1





Group: Members
Posts: 2
Joined: 8-April 21
Member No.: 27,887



Hey guys,

I have spent the last hour trying to decipher my html code as to explain why my using of the <strong> tag actually makes all of the html text bold instead of just my name.

Here is my code. I am new to coding but I have ran my code through a generator without problems except for empty <h3> tags which I need to fill.

The issue is within my 1st <section> regarding the intro.

However the rest of my text in other sections is also bold.

Kind regards,
Sean

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> Sean Morris Dev Portfolio</title>
<link rel="styesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudfare.com/ajax/libs/font-awesome/5.11.2/css/all.css"
integrity="sha256-46qynGAkLSFpVbEBog43gvNhfr0j+BmwXdxFgVK/Kvc=" crossorigin="anonymous"/>
</head>


<body>

<header>
<div class="logo">
<img src="img/devsean.png" alt="sean logo">
</div>

<button class="nav-toggle" aria-label="toggle navigation">
<span class="hamburger"></span>
</button>

<nav class="nav">
<ul class="nav__list">
<li class="nav__item"><a href="home" class="nav__link">Home</a></li>
<li class="nav__item"><a href="services" class="nav__link">My Services</a></li>
<li class="nav__item"><a href="#" class="nav__link">About Me</a></li>
<li class="nav__item"><a href="#" class="nav__link">Portfolio</a></li>
</ul>
</nav>
</header>

<!-- Introduction -->
<section class="intro" id="home">
<h1 class="section__title section__title--intro">
Hi, I am <strong>Sean Morris</strong>
</h1>
<p class="section__subtitle section__subtitle--intro">
Front-End Dev
</p>
<img src="img/sean-ig-profile.jpg" alt="Jane Smiling">
</section>

<!-- My Services -->
<section class="my-services" id="services">
<h2 class="section__title section__title--services">
What I Do
</h2>
<div class="services">
<div class="service">
<h3>Design & Development</h3>
<p></p>
</div> <!-- / service -->
</div>

<div class="service">
<h3></h3>
<p></p>
</div> <!-- / service -->
</div>

<div class="service">
<h3></h3>
<p></p>
</div> <!-- / service -->
</div>
</section>

</body>
</html>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Apr 8 2021, 01:43 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



I don't see that. Only three lines are bold, the headings.

You shouldn't use STRONG to make something bold though (and your name is already made bold by the heading). Use elements for what meaning they imply. Then style them to look as you like. STRONG is for strong emphasis, not bold text. If you want your name even bigger and bolder than the heading makes it, style the heading.

Most browsers display STRONG with bold text by default, but that's just styling. Browsers add that, just as we do. A browser could decide to make STONG red instead, or I could do so with a user style sheet. Ignore how browsers make unstyled HTML look. You can control that yourself.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
mozza251
post Apr 8 2021, 01:50 PM
Post #3





Group: Members
Posts: 2
Joined: 8-April 21
Member No.: 27,887



QUOTE(pandy @ Apr 8 2021, 07:43 PM) *

I don't see that. Only three lines are bold, the headings.

You shouldn't use STRONG to make something bold though (and your name is already made bold by the heading). Use elements for what meaning they imply. Then style them to look as you like. STRONG is for strong emphasis, not bold text. If you want your name even bigger and bolder than the heading makes it, style the heading.

Most browsers display STRONG with bold text by default, but that's just styling. Browsers add that, just as we do. A browser could decide to make STONG red instead, or I could do so with a user style sheet. Ignore how browsers make unstyled HTML look. You can control that yourself.



Yep, 100% with you. I was specifically playing with the <strong> tag to emphasize my name, otherwise I will use the <b> tag or style it with font in .css smile.gif

I was unaware that <h> tags naturally bold text. I was trying as many browsers as possible SMH!

Thank you for your detailed response. I am sure I will encounter many perils through my .css journey biggrin.gif

Regards,
Sean
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 10:40 AM