Elm: Inline Formatting

This post documents an example of inline formatting using Elm:

Oh… And by the way, this video discusses how to simplify verbose syntax by using functions:

Look at the following code:

p [] [ span [] [ text "This text might be an " ], b [] [ text "introduction" ], text " to the rest of the page." ]

The following html is rendered from the code above:

When doing inline formatting, I learned to use the span element and pass-in individual elements that can be for either text or formatting. Just be aware that these elements are delimited by commas.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s