The following is a list of the accepted HTML (HyperText Markup Language) elements (or called tags) that are allowed to be posted. Use the tags how you would use them normally for a web page.
You can also add a "style" attribute to most of the tags below. Within that, you can add various properties, such as font size, color, width and others, where they apply. A companion tutorial on adding inline CSS (Cascading Style Sheets) to HTML tags can be found here. It contains a complete listing of the allowed CSS you can use to customize your message.
We will now discuss the various parts of the sample code below.
Code:
<div style="background-color: lightblue; padding: 10px;">
Text
</div>
Result:
Text
In that example, "div" is an HTML element. Most HTML elements have an opening and closing tag which surround content. "style" is an attribute. The value of that attribute is located within double quotation marks ("). An equals sign (=) is between the two. The "style" attribute allows you to set inline CSS. "background-color" and "padding" are CSS properties. You can have as many properties within that single style attribute, separated by a semicolon (;). (you can't have more than one "style" attribute) The "background-color" property has a value of "lightblue". The "padding" property has a value of "10px". The space after the ":" and ";" are not required, but we include them for legibility. In short, that gives you a basic tutorial of what terms we will use here and in our CSS tutorial.
Any HTML tag that is not listed below is not allowed.
To view a tutorial on how to display an image in your message, click here. It goes into detail about how to get the image address (URL) for an image or about using an image-sharing site if you need to upload an image from your computer first. One you have an image address, you can simply use the method described later on this page.
For some elements, like <img/>, <hr/> and <br/>, you will see that we add a "/" at the end of the tag so that the tag is shown as self-closing. We write it that way because there is no closing tag for that particular element. (Meaning it isn't like most tags, such as this for example: <span>Text</span>) We try to follow a stricter coding standard, more closely resembling XHTML. (Extensible HyperText Markup Language) In that, an element must have a closing tag. Our system adds that character in automatically if you do not include it.
The <span> element is a generic inline container. This can be used to customize text.
If you place two <span> elements together, the second one appears on the same line. This is because it is an inline element. See the example below. The <div> element is a generic block-level container. If you were two place two <div> elements together, the second one would appear below the other. To format a specific line of text, or various words, you could do that with a <span> element. But if you wanted to format a section of content, which could also include a lot of text, a <div> element would be more appropriate. See that section for an example.
Example 1:
Code:
A line of text before the "span" tag. <span style="background-color: lightblue;">A line of text.</span> <span style="background-color: lightgreen;">A second line of text.</span> A line of text after the "span" tag.
Result:
A line of text before the "span" tag. A line of text.A second line of text. A line of text after the "span" tag.
Example 2:
Code:
<span style="font-size: 20px; font-family: Arial; font-weight: bold; text-decoration: underline; font-style: italic; color: blue;">The quick brown fox jumps over the lazy dog.</span>
Result:
The quick brown fox jumps over the lazy dog.
Example 3:
Code:
<span style="text-decoration: line-through;">Text with a line through it.</span>
Result:
Text with a line through it.
Example 4:
Code:
<span style="direction: rtl; unicode-bidi: bidi-override;">This text is reversed.</span>
Result:
This text is reversed.
Example 5:
Code:
Default text. <span style="color: green;">Green colored text, <span style="font-weight: bold;">with bold here</span>, using a "span" inside a "span" element.</span>
Result:
Default text. Green colored text, with bold here, using a "span" inside a "span" element.
A <b> element used to be more commonly known as the "boldface" element. While it does make text bold in browsers, other tags are now preferred to help specify why the text is bold.
In our system, <b> is automatically converted to <span style="font-weight: bold;"> and </b> is automatically converted to </span>.
Example 1:
Code:
<b>A line of bold text.</b>
Result:
A line of bold text.
Example 2:
Code:
<span style="font-weight: bold;">A line of bold text.</span>
A <i> element used to be more commonly known as the "italic" element. While it does make text slanted in browsers, other tags might be preferred to help specify why the text is emphasized.
In our system, <i> is automatically converted to <span style="font-style: italic;"> and </i> is automatically converted to </span>.
Example 1:
Code:
<i>A line of text in italics.</i>
Result:
A line of text in italics.
Example 2:
Code:
<span style="font-style: italic;">A line of text in italics.</span>
A <u> element used to be more commonly known as the "underline" element. While it does underline text in browsers, other tags might be preferred to help specify why the text is being singled out. Because the text is rendered with an underline, and can be confused for a link, it should be avoided where it could be mistaken for a link.
In our system, <u> is automatically converted to <span style="text-decoration: underline;"> and </u> is automatically converted to </span>.
Example 1:
Code:
<u>A line of text underlined.</u>
Result:
A line of text underlined.
Example 2:
Code:
<span style="text-decoration: underline;">A line of text underlined.</span>
The <a> (anchor) element is used to create a link.
The "href" attribute, which we require, is where you specify the link.
If you would like the link to open in a new window, use the "target" attribute and set its value to "_blank".
On our site, you can also add a link using specific code that can be used to create a link. You can add it using the "Link" button below the message box. Examples 3 and 4 demonstrate the code that is used for that feature. When using that feature, the link will always open in a new window.
We don't allow any CSS to be used for this element.
In our forum, we try to automatically create line breaks for you based on what you enter in the message box. In most instances, if you press enter inside the message box, that is where we will attempt to place a line break. Press enter twice and you will have a blank line separating two sections of text. That is shown in example 3. The code that we actually use to do that, which we do automatically for you, is shown in example 2.
You should not need to actually use this element yourself. If you did, and also used the "enter" button, you would get twice as many line breaks.
Because we automatically try to create line breaks for you, it gets complex to try to determine where you intend to have line breaks and where you do not intend to have line breaks, such as when using a <div> tag for example. It's not a perfect process. You may have to move certain tags or content next to each other, and continue to preview your message, to ensure that line breaks are where you want them.
The <center> element was previously used to center not only inline content, but also block-level content. This element has deprecated and should no longer be used.
In our system, <center> is automatically converted to <div style="text-align: center;"> and </center> is automatically converted to </div>.
It should be noted that our system converts this tag to a span tag that will center text. That will not allow it to center a block-level element, like a <div> element. To center a block-level element you would need to use margin which we show in an example 3 below.
Example 1:
Code:
<center>
Centered Text
</center>
Result:
Centered Text
Example 2:
Code:
<div style="text-align: center;">
Centered Text
</div>
Result:
Centered Text
Example 3:
Code:
<div style="margin: 0 auto; background: lightgreen; max-width: 150px;">
Text in box
</div>
Result:
Text in box
In the previous example, note how the <div> element is centered, but the inline content within it, the text, is not centered.
Example 4:
Code:
<div style="margin: 0 auto; text-align: center; background: lightgreen; max-width: 150px;">
Text in box
</div>
Result:
Text in box
In the previous example, we now also center the text as well.
The <div> element is a generic block-level container. The name "div" might come from "document division", as it is described in an older specification. This can be used to customize a section of content, which could also include a lot of text.
If you place two <div> elements together, the second one appears below the other. This is because it is a block-level element. See the example below. The <span> element is a generic inline container. If you were two place two <span> elements together, they would appear on the same line. To format a section of content, which could also include a lot of text, you could do that with a <div> element. But if you wanted to format a specific line of text, or various words, a <span> element would be more appropriate. See that section for an example.
Example 1:
Code:
A line of text before the "div" tag.
<div style="background-color: lightblue; padding: 10px; font-size: 17px;">
Text in a box.
</div>
<div style="background-color: lightgreen; padding: 10px; font-size: 17px;">
Text in another box.
</div>
A line of text after the "div" tag.
Result:
A line of text before the "div" tag.
Text in a box.
Text in another box.
A line of text after the "div" tag.
Example 2:
Code:
<div style="background-color: lightblue; color: blue; padding: 10px; font-size: 17px;">
Text in a box. <span style="color: green;">But this is an example of using span here for this specific text.</span>
</div>
Result:
Text in a box. But this is an example of using span here for this specific text.
The <p> element is a block-level container. This can be used for a paragraph of text. It adds a margin, of about the line-height of one line of text, above and below the paragraph.
Because our site automatically inserts line breaks (<br/>), using this element isn't as necessary when it comes to a visual standpoint. If you add two line breaks between text you enter, meaning you hit enter in the message box twice between the end of one line of text and the start of another, you will simulate the visual effect of this element if you have no other style that you are adding.
Example 1:
Code:
A line of text before the "p" tag.
<p>
Text in a paragraph.
</p>
<p>
Text in another paragraph.
</p>
A line of text after the "p" tag.
Result:
A line of text before the "p" tag.
Text in a paragraph.
Text in another paragraph.
A line of text after the "p" tag.
Example 2:
Code:
A line of text before the "p" tag.
<p style="background-color: lightblue; padding: 10px; font-size: 17px;">
Text in a paragraph.
</p>
<p style="background-color: lightgreen; padding: 10px; font-size: 17px;">
Text in another paragraph.
</p>
A line of text after the "p" tag.
The <pre> element displays text exactly as entered, preserving all spaces and using a monospaced font. This is helpful for text messages from NOAA when you need to preserve the text formatting so that data, in columns for example, is preserved. This can apply to such things as an advisory from the National Hurricane Center, a National Weather Service Public Information Statement, a SHIPS intensity forecast, the Plan of the Day for the hurricane hunters or a Daily Climate Report (CLI) from the NWS.
This can also be used for more fun purposes, like for ASCII art displayed in an example below from an ASCII art generator. (using the font setting described as "Big" on some sites that have a similar generator)
Example, part of the Daily Climate Report for St. Louis, Missouri on July 26th, 2022 when they experienced record rainfall:
Code:
<pre>
WEATHER ITEM OBSERVED TIME RECORD YEAR NORMAL DEPARTURE LAST
VALUE (LST) VALUE VALUE FROM YEAR
NORMAL
...................................................................
PRECIPITATION (IN)
TODAY 8.64R 2.24 1909 0.13 8.51 0.00
MONTH TO DATE 11.05 3.29 7.76 5.71
SINCE JUN 1 12.84 7.78 5.06 11.04
SINCE JAN 1 32.17 25.65 6.52 28.63
</pre>
Result:
WEATHER ITEM OBSERVED TIME RECORD YEAR NORMAL DEPARTURE LAST
VALUE (LST) VALUE VALUE FROM YEAR
NORMAL
...................................................................
PRECIPITATION (IN)
TODAY 8.64R 2.24 1909 0.13 8.51 0.00
MONTH TO DATE 11.05 3.29 7.76 5.71
SINCE JUN 1 12.84 7.78 5.06 11.04
SINCE JAN 1 32.17 25.65 6.52 28.63
The elements <h1> to <h6> are used for HTML headings. A heading of <h1> is the heading of highest importance and you should only have one <h1> element on a page, though we have no limit on the amount you have. The heading of least importance is <h6>.
The <hr/> element displays a horizontal line. It used to refer to "horizontal rule" and was to act as a visual divider between sections. It is now known as a "thematic break" and while "previous versions of HTML defined the hr element only in presentational terms, the element has now been given the specific semantic purpose of representing a 'paragraph-level thematic break'."
The <blockquote> element is used to indicate that the enclosed text is a quotation. Visually, it has a margin on all four sides. We previously added this element because a social media site previously used it and we needed to add support for it.
Example 1:
Code:
A line of text before the "blockquote" tag.
<blockquote>
"Four score and seven years ago our fathers brought forth, upon this continent, a new nation, conceived in liberty, and dedicated to the proposition that all men are created equal."
</blockquote>
A line of text after the "blockquote" tag.
Result:
A line of text before the "blockquote" tag.
"Four score and seven years ago our fathers brought forth, upon this continent, a new nation, conceived in liberty, and dedicated to the proposition that all men are created equal."
A line of text after the "blockquote" tag.
Example 2:
Code:
A line of text before the "blockquote" tag.
<blockquote style="padding: 15px; background: #eee; border-radius: 20px; text-align: justify;">
"Four score and seven years ago our fathers brought forth, upon this continent, a new nation, conceived in liberty, and dedicated to the proposition that all men are created equal."
</blockquote>
A line of text after the "blockquote" tag.
Result:
A line of text before the "blockquote" tag.
"Four score and seven years ago our fathers brought forth, upon this continent, a new nation, conceived in liberty, and dedicated to the proposition that all men are created equal."
The "alt" attribute should be used so that people with screen readers can be able to have the text in that attribute read to them. We allow you to provide a brief description of up to 200 simple characters. Unless the image is not displayed for some reason, this text will not appear visually. If you don't add the "alt" attribute, we add a blank "alt" attribute when your image is posted.
We don't allow the "title" attribute. This is because a screen reader might read both that attribute and the "alt" attribute, saying the same thing twice if you used both the same thing for each. The "title" attribute could create a tooltip over the image if the user hovered their mouse over it, but since that requires interaction from a mouse, which the user might not have, it is not recommended and we therefore don't allow it.
On our site, you can also add an image using specific code that can be used to embed an image. You can add it using the "Image" button below the message box. Example 2 demonstrates the code that is used for that feature.
This element can be used with the <figcaption> element to display a caption alongside an image. If used without a caption, it would normally display an image with only margins alongside the caption. On our site however, we either draw a box around the image and the caption or just the image.
Example 1:
Code:
<figure>
<img src="https://canetalk.com/images/lightning.jpg"/>
<figcaption>A lightning strike in Tampa, Florida on October 12th, 2002.</figcaption>
</figure>
The <ol> element allows you to create an ordered list. Each item in the list must be defined by a list item (<li>) element. While the default is a numerical list, you can change it to alphabetical, Roman numerals or a few other options on our site. You can learn more on our CSS tutorial page in the section "list-style-type".
We support the attribute "start" for this element. This starts the list at that number. If you wanted to start at 4 in a numerical list, your tag would be <ol start="4">. If you have letters for your "list-style-type", you still use a number. To start at "d" you would set "start" to "4".
Allowed values for the attribute "start":
-1000 to 1000
We also support the attribute "reversed" for this element. This reverses the order of the list. We support reversed written as <ol reversed> or in the XML compliant way as <ol reversed="reversed">.
The <ul> element allows you to create an unordered list. Each item in the list must be defined by a list item (<li>) element. You can change the marker type used by setting the property "list-style-type". You can learn more about that on our CSS tutorial page by clicking that link.
The <table> element allows you to create a table which can contain data that is presented in rows and columns.
You can add simple tables to your message. Within each table you can add other HTML as well, like images and links. We require that all table elements have a closing tag. If using some of the optional table elements, they must be in the order: table caption (<caption>), table column group (<colgroup>), table head (<thead>), table body (<tbody>) and table foot (<tfoot>).
Our site has a default styling for tables in a message which you will see in example 1. You can change it somewhat using inline CSS. See the tables section in our CSS tutorial for table specific CSS and other sections for additional CSS you can try to use.
If you want to set the width in a <table> tag, you can only set a "width" using a percent. You can set a "max-width" using pixels or a percent. You can set the "width" of a table data cell (<td>) using pixels or a percent since the maximum width of the "table" tag will either force the table to stay within the visible area of the screen or if needed the table may be partially hidden. This could happen on a mobile device or on any device for a table that is very wide. We no longer support older attributes like "cellpadding", "cellspacing" or "border". You will need to use the CSS counterpart for those.
See the table data cell section <td> for simple examples using the attributes "colspan" and "rowspan".
The optional <colgroup> element groups columns in a table when used with the table column (<col>) element. It can allow you to style the CSS of the columns more easily. If used, it must directly follow the table caption (<caption>). If there is no table caption, then it must directly follow the table tag (<table>).
Inside this you would add table column (<col>) elements. You can learn more about that element in that section.
We don't require the number of columns defined to match the number of columns in your table, as shown in example 2.
The optional <thead> element contains a table row (<tr>) which itself contains either table header cells (<th>) or table data cells (<td>). This is not a required element in tables, but it can optionally be used to define a header row at the top of a table. If you use table header cells (<th>) in that table row, it will make the text bold.
If used, this must appear before a table body (<tbody>) element.
The optional <tbody> element contains table rows (<tr>). This is not a required element in tables, but it can optionally be used to specifically define the body of your table.
Rather than use this element, you can put table rows directly in a <table> element.
The optional <tfoot> element contains a table row (<tr>) which contains table data cells (<td>). This is not a required element in tables, but it can optionally be used to define a footer row at the bottom of a table which could summarize things in your table. By default, our site doesn't apply any special CSS to the row.
We require that you have a table body (<tbody>) element when using this element. We also require that it be placed directly after that element.
The <td> element contains the content you want to put in the particular table data cell.
We support the attributes "colspan" and "rowspan" for this element.
If you wanted a table data cell to span 2 columns, your tag would be <td colspan="2">.
Allowed values for the attribute "colspan":
1 to 100
If you wanted a table data cell to span 2 rows, your tag would be <td rowspan="2">. If you set the value to "0", it will extent to the end of the table section.
Allowed values for the attribute "rowspan":
0 to 1000
See <table> for more information, and examples, on tables.
The <th> element is a table header cell which contains text defining the data in that column or row. While these can be used in a table head element <thead>, they can also be used vertically as well if needed.
Like for <td>, we also support the attributes "colspan" and "rowspan" for this element.
For accessibility, we also support the attribute "scope" being set to "row" or "col". For more info on that: Mozilla | World Wide Web Consortium (W3C)
See <table> for more information, and examples, on tables.