HTML

From Tygron Support wiki
Jump to navigation Jump to search
This article is a stub.

Template:Learned

HTML

HTML stands for HyperText Markup Language. It is a language used to indicate how text or content should be laid out for display. Along with Cascading Style Sheets (CSS), it is generally used for styling webpages.

How HTML relates to the Tygron Engine

In the Tygron Engine, there are a number of places where the user is responsible for providing text and information. When that information can be complex, such as the Excel output for an Excel Indicator, the Engine allows HTML to be used for determining how the information should be laid out. The Engine is effectively HTML5 compliant for these purposes.

How HTML is structured

HTML consists of a number of elements, which are demarked by two tags: an opening and a closing tag. The opening tag indicates where an element starts, and the closing tag indicates where an element finishes. Each tag consists of a word or a few characters, enclosed by less-than and greater-than characters (< and >). A closing tag has an additional slash in it to indicate it's a closing tag. For example, a full element is constructed as follows: <element>hello!</element>.

Elements can also have attributes. Attributes configure or fine-tune the behavior of the elements. They generally consist of a key and a value. Attributes are placed in the opening tag, and not in the closing tag. For example, an attribute to indicate an intended address: <a href='www.example.com'>Link to another site</a>. Here, the attribute is "href", and the value is "www.example.com".

There are also tags which are used by themselves, and do not require a closing tag. These are elements like <br>, which insert a linebreak in the layout at the location of the element.

Using HTML

The full span of the capabilities of HTML extends far beyond the scope of this wiki. Instead, some basic elements will be explained here which will allow you to tackle most formatting challenges. For further information regarding HTML, CSS and javascript, please refer to other online information sources.

Text formatting

For basic text styling, a number of elements exist.

Paragraph: <p>

The paragraph element <p>paragraph</p> is used to define a segment of text which is supposed to appear as a paragraph of text. A paragraph is slightly indented, and is surrounded by a bit of empty space. This automatically separates consecutive paragraphs, for easy of reading.

Horizontal rule: <hr>

The horizontal rule element <hr> inserts a horizontal line into the layout. Horizontal lines are useful for separating segments of information.

Linebreak: <br>

The linebreak element <br> indicates that in this point of the layout, the line ends. Anything that comes after should appear on a new line.

Headings: <h1>, <h2>, etc

The heading elements <h1>heading</h1>, <h2>heading</h2>, (continuing through to <h6>heading</h6>) are generally used for titles. The lower the number, the larger and more prominent the title.

Table: <table>

A table element consists of multiple nested elements. The main element is <table>the table</table>. A table consists of one or multiple rows, which are also elements. A row element is <tr>the row</tr>. In turn, each row consists of one or multiple cells, which are also elements. The cell elements are <td>the cell</td>. The net result for a full table will look something like this:

<table>
<tr> <td> A </td> <td> B </td> </tr>
<tr> <td> C </td> <td> D </td> </tr>
</table>

is interpreted as follows:

<table>
<tr> <td> A </td> <td> B </td> </tr>
<tr> <td> C </td> <td> D </td> </tr>
</table>

and thus becomes

  A     B  
  C     D  

Styling

Width, Height

Align

Colors