How to add Bold or Italic (INLINE) using Jade? *Like markdown
For Pug or Jade, you need to wrap the element in a paragraph, and use the |
for line continuation.
p
strong This Starts out strong
| but finishes out not
i quite
| as bold.
Which will look like:
This starts out strong but finishes out not quite as bold.
EDIT: As noted in the comments, you need an additional whitespace before each component, as pug doesn't add spaces. The above will render out as:
<p><strong>This Starts out strong </strong> but finishes out not <i> quite </i> as bold.</p>
I think you can simply do:
p Here is my #[strong strong words] in my sentence!
You can use a span tag with style attribute (or CSS class).
p Here is my
span(style='font-weight:bold') strong words
in my sentence!
Or you can do the same formatting (add line break and indent) with strong tags.
p Here is my
strong strong words
in my sentence!