Is bolding text is affected by screen type?
This is JSX in react:
function App() {
return (
// Problem Here
<b className="info-text">Info:{" "}</b>
);
}
ReactDOM.render(<App />, document.getElementById("root"));
.info-text {
font-size: 14px;
font-weight: bolder;
line-height: 24px;
color: #15366D;
}
<script src="https://cdn.jsdelivr.net/npm/react/umd/react.production.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/react-dom/umd/react-dom.production.min.js"></script>
<div id="root"></div>
2
Answers
You can use specific numeric values for font-weight (e.g., 600 for semi-bold, 700 for bold).
I think you should use the
<span>
tag rather than the<b>
tag.See this example:
Note: Do convert this into JSX and use
className
instead ofclass
.