HTML to Bean

On Pranab’s site

DRAFT (needs work or removal)

Show/Hide contents
  1. Paragraphs
    1. HTML
    2. Basic Bean
    3. Bean
  2. List
    1. HTML
    2. Basic Bean
    3. Bean
  3. Nested list
    1. HTML
    2. Basic Bean
    3. Bean
  4. Empty document
    1. HTML
    2. Basic Bean
    3. Bean
  5. Basic document
    1. HTML
    2. Basic Bean
    3. Bean

What an HTML document might look like in Bean, both with and without the syntax sugar and post-processing.

Bean markup (missing)

ParagraphsπŸ”—

HTMLπŸ”—

<p>This is a paragraph.</p>
<p>Another paragraph.</p>

Basic BeanπŸ”—

[p]
This is a paragraph.

[p]
Another paragraph.

BeanπŸ”—

This is a paragraph.

Another paragraph.

ListπŸ”—

HTMLπŸ”—

<ul>
  <li>List item</li>
  <li>Another list item</li>
</ul>

Basic BeanπŸ”—

[ul]
`List item`[li]
`Another list item`[li]

BeanπŸ”—

* List item
* Another list item

Nested listπŸ”—

HTMLπŸ”—

<ul>
  <li>List item</li>
  <li>Another list item
    <ul>
      <li>Nested list item</li>
    </ul>
  </li>
  <li>Third item</li>
</ul>

Basic BeanπŸ”—

[ul]
`List item`[li]
`Another list item`[li]
  [ul]
  ``
  `Nested list item`[li]
  ``
`Third item`[li]

BeanπŸ”—

* List item
* Another list item
** Nested list item
* Third item

Empty documentπŸ”—

HTMLπŸ”—

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
</body>
</html>

Basic BeanπŸ”—

[!DOCTYPE html]

[html lang en]
[head]
``
  [meta charset UTF-8]

  [meta name viewport content "width=device-width, initial-scale=1.0"]

  [title]
  Document
``
[body]
``

``

BeanπŸ”—

Basic documentπŸ”—

HTMLπŸ”—

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <h1>Hello, world</h1>
</body>
</html>

Basic BeanπŸ”—

[!DOCTYPE html]

[html lang en]
[head]
``
  [meta charset UTF-8]

  [meta name viewport content "width=device-width, initial-scale=1.0"]

  [title]
  Document
``
[body]
``
  [h1]
  Hello, world
``

BeanπŸ”—

### Hello, world