Copy link to clipboard
Copied
Hello. Apologize for the inconvenience. This post was originally posted on Adobe Fonts section, but after 10 days nobody replied, maybe because is not so popular like dreamweaver forum. Anyway, it's related to web design. Here it is.
Hi,
I've downloaded these styles, al based on Skolar Sans.
.regular-paragraph{
font-family: skolar-sans-latin, sans-serif;
font-weight: 400;
font-style: normal;
}
.spanBold{
font-family: skolar-sans-latin, sans-serif;
font-weight: 700;
font-style: normal;
}
.spanItalic{
font-family: skolar-sans-latin, sans-serif;
font-weight: 400;
font-style: italic;
}
------------------------
I have regular, italic and bold. If I want to insert a Bold or an italic word within a paragraph. What is the correct way?
Option 1: using just the html tags
<p class="regular-paragraph">
This is a paragraph with an <strong>important</strong> content for all our <em>premium members</em> only.
</p>
Option 2: using the classes brought from the Adobe Fonts.
<p class="regular-paragraph">
This is a paragraph with an <span class="spanBold">important</span>content for all our <span class="spanItalic">premium members</span>only.
</p>
Opinions, suggestions, workflows, etc, please. Thank U.
1 Correct answer
Either works, using CSS classes gives you the flexibility to make global changes quickly and can give you more control over the font-weight. If you use fthe strong tag , by default browsers will style the text with:
font-weight: bold
I'm assuming you've embedded the font(s)?
Copy link to clipboard
Copied
IMO
This is fine:
<p class="regular-paragraph">
This is a paragraph with an <strong>important</strong> content for all our <em>premium members</em> only.
</p>
Using classes in span tags would be useful if you say for example wanted to make global changes, for example if you decided to change all italic styled text to bold, you could do it via the style sheet to update your pages globally. Ths seems an unlikely scenario in reality but just using it to demonstrate why you might want to do it that way...
Copy link to clipboard
Copied
Thank U. However, my concern doesn't go for the semantic issue, but for the correct technical use of the CSS and proper styling. It's about the TRUE TYPE issue.
For your reply, that makes me think that I don't need to download (or activate) bold, italics, etc, because with the <strong> and <em> tags I solve everything. So when I use these tags, the browser will FORCE the regular font to LOOK LIKE "italic" and "strong". Or even so, the browser will look for any class that appears the closest to the "strong" and "em" shows?
But what happen if I really have activated the italic and bold styles? The browser will look find them and render properly if I just type <em> and <strong>? Or...
...Do I really need to POINT to the correct classes declared in the CSS ".spanBold", ".spanItalic" to get a nice and clean rendering of the fonts? Thanks a lot for your patience.
Copy link to clipboard
Copied
Either works, using CSS classes gives you the flexibility to make global changes quickly and can give you more control over the font-weight. If you use fthe strong tag , by default browsers will style the text with:
font-weight: bold
I'm assuming you've embedded the font(s)?
Copy link to clipboard
Copied
Here's something on semantic markup which might be useful for you to read also: https://codeengineered.com/blog/2013/html5-semantic-diff-bold-strong/

