Hi Corvid community,
I am new to WIX but like the platform and will continue using it, however, there are some issues.
I am between beginner and intermediate for a coder so understand some basics, however I am struggling to make some text bold within the developer tools section.
This is my code:
if (productQuantityNum > 0) { //if it's greater than 0, Display number remaining
let productQuantityString = productQuantityNum.toString();
$w("#StockRemaining").text = "Stock Remaining: "+ " " + productQuantityString;
I would like the string "Stock Remaining: " and productQuantityString to be Bold when presented on the website. I am trying variants of other solutions I have seen on this forum, but have not solved it yet.
If anyone could point out the obvious it would be very much appreciated.
Thanks in advance.
Hi theo 
The only way to achieve this using code is using the text.html to set the text to be bold.
Example:
let myText = 'A test text...';
// Using the span tag
$w('#text1').html = "<span style='font-weight: bold' >" + myText + "</span>";
// OR using the <b> tag
$w('#text1').html = "<span><b>" + myText + "</b></span>";
Hope that helped~!
Ahmad
Hi Ahmed yes it did, thank you. The solution I derived is as follows incase it helps anyone else:
let productQuantityString = "Stock Remaining: " + productQuantityNum.toString();
$w("#StockRemaining").html = "<span><b>" + productQuantityString + "</b></span>";
If one was to edit the font size I would use the top solution you suggested and add a text size to that? Is that correct?
Answered my own question, inputting the code for others:
$w("#StockRemaining").html = "<span style='font-weight:bold;font-size: 17pt'>" + productQuantityString + "</span>";
Thank you Ahmed for giving me the tools to resolve this myself.
Yes your answer is correct, I just didn’t find a reason to include the font size and family since they’re not related to the question.
If your question is answered and your problem is solved, please edit the title of your post including a [Solved!] statement.
Glad that it helped!