I have an h1 that has a strong tag inside it.
The strong text is emphasized and looks bold on Windows, Mac Safari, Android but for some weird reason that I am unable to find, it does not work on ios.
The text looks same as the rest of the content enclosed in h1.
This is the html and css for the same, I have only added font-family to these tags, no other extra styling.
<h1 tabindex="-1"> Some random text <strong> highlighted text </strong> other </h1>
h1 {
font-family: "Open-Sans-SemiBold"
}
strong {
font-family: "Open-Sans-Bold";
}
2
Answers
You can use
<b>
tag, it’s similar to<strong>
and i think it will work.If this still don’t work, you can do it with css
The issue likely occurs because iOS isn’t rendering the "Open-Sans-Bold" font properly. Ensure the font file is correctly linked and provided in web-safe formats like .woff or .woff2. Explicitly set font-weight: bold; for the strong tag and include a fallback font-family, such as sans-serif, in case the primary font fails. Verify the font file is loading correctly in the browser’s developer tools, as missing or incompatible files can cause this issue.