HTML++
HTML++ looks similar to regular HTML5, but with some differences. Note that B9 is a new engine, not all classic HTML5 features are supported.
Basic structure.
Same as regular HTML5, the html
tag, with the head
for metadata and body
for your page's content.
<head>
: Metadata in HTML++
<head>
: Metadata in HTML++A complete WebX head looks like this:
Let's explain everything. <title>
and <meta name="*">
are tags you know from classic HTML5. <title>
will give a Title to your page, which will be displayed on both the browser's tab and the search results. <meta name="description" content="*">
will give Dingle a description to show on the search results, and other meta tags may be used by websites that wish to embed Web X sites.
Now, let's go beyond the standard. You might wonder, why do links have no rel
attribute? And why is the script
tag self-closing? (which might even be rendered as an error by your IDE).
Linking in HTML++
You can link images (as much as you like), stylesheets and scripts (only 1 of each type).
The thing is, B9 does not use rel
to define what to do with each thing. It uses the order of your tags, being the first tag of each kind the one that will be used for it's specific purpose. In other words: your first <link>
has to href an image and will be your site's icon, your second <link>
has to href a stylesheet and will be the source for the page's CSS, and your <script>
tag should be the third one, and will be the source for the page's Luau script.
This isn't the standard web, HTTPS is supported only by the <script> tag. Both (CSS & Lua) files must be available locally, in the same path as the index.html
. As we told you before, the three files must be in the root. HTTP(S) is supported for the icon's link and for images. We recommend using Imgur.
Well, your head is done. Great! Now let's move on onto the body.
<body>
: Page's content in HTML++
<body>
: Page's content in HTML++Currently, you can use the following HTML tags:
Headers (
<h1>
,<h2>
,<h3>
,<h4>
,<h5>
,<h6>
) and paragraphs (<p>
). Headers will be bigger or smaller based on the number, being 1 the biggest and 6 the smallest.Anchors (or hyperlinks) (
<a>
), which can have ahref
property (<a href="#>
).If the href starts with
buss://
, Napture will open it and redirect the user away from your page. If it starts with anything else, GTK will handle it and automaticaly open your default WWW browser.
Divisions (
<div>
), basically containers where you can put your tags to organise your page.Lists, which can be ordered (
<ol>
) or unordered (<ul>
). Both can have list items (<li>
) in them.Horizontal rule (
<hr>
), which creates a horizontal line on the entire page.
Inputs (
<input>
) are one-line text fields. You can interact with them with Web X's Lua API.Textareas (
<textarea>
) are equivalent to inputs, but they are multi-line text fields instead of one-line.Dropdowns (
<select>
), which can have options in them (<option>
).
As of B9 1.2.2, dropdowns are purely decorative at the moment as they don't have a Lua API.
We're done with the HTML++, but you must note one more thing.
Every tag that is made for the body (
<h1>
,<p>
,<input>
, etc...) has support for a property called "class
". You might know them for CSS 3 styling, but here they are more important as they are used for scripting aswell. Therefore, HTML 5's standardid
is not supported. Keep that in mind.
Now, let's move onto styling.
Last updated