The “nobr” tag just prevents line breaks in the passage it’s put on, unless you force a line break using something like the HTML
<br> element or the like. In order to keep your widget code clean and readable, it’s usually easier to just use the “nobr” tag so that you don’t have to worry about tons of line breaks when you call the widget.
Widgets should not be put in any special passages, as noted in the
<<widget>> macro documentation. So you should not put widgets in your StoryInit special passage.
For learning Twine/SugarCube, generally speaking, I’d recommend starting by skimming through all of the SugarCube documentation, just so you have an idea of what all it can do, and keep it bookmarked. You don’t need to memorize or understand all of it immediately, you just need to remember enough that you can recognize things in the documentation which might be useful later on.
Next, if there are any Twine games that you like or have effects, features, or UI elements that you like, you can import them into Twine to take a look at them to see how they work, and then adapt that code to your own project. (Note: If it’s a Twine 1 game then you’ll need to convert it to a Twine 2 game in order to open it in Twine 2. Use the “Twine 1 compiled HTML to Twine 2 archive converter” for that.)
For other resources, Chapel has collected a ton of Twine Resources here. There’s also the r/twinegames subreddit (where I’m one of the moderators). If you use Discord, there’s also the Twine Discord server, if you want to talk with people live. And finally, Google is your friend , you can find lots of helpful info just by searching around the net (especially at the Stack Overflow site).
<<run alert("Some alert message text.")>>
The “Stylesheet” section, on the other hand, is where you put your CSS code, so they’re not like two separate files or anything. You just put any CSS styling you want to use in the Stylesheet section.
Any code you see which uses
jQuery(something) that code is usually using jQuery to examine or modify elements on the screen. SugarCube extends jQuery a bit with its own jQuery methods.
Hope that helps!