Html tags in markdown

Syntax Guide for Markdown

Markdown is a plain text and lightweight markup programming language meant for formatting for the web and following source code form. It is designed to use a plain-text editor, however, specialist editors now exist that have been adapted for its use, such as CKEditor 5. The language was originally created in 2004 and continues to be used in web writing as an alternative to WYSIWYG editors and HTML formatting (although some overlap exists).

Markdown aims to make text documents more readable without relying on various tags to abstruse the document or confuse the reader. It was also to add text formatting options like italics or bold.

Reasons to use Markdown

Markdown is an unobtrusive language that can be used for a variety of purposes. This includes writing notes, composing email messages, creating web pages and technical documents in addition to standard web writing as it converts to HTML easily. It is also relatively painless or quick to learn for non-programmers.

Basic syntax

Keep in mind that there are minor discrepancies between Markdown processors. However, nearly all Markdown applications support the basic syntax outlined in the original Markdown design document.

Headings

Headings are used to separate sections of a document and change the font size depending on the heading being used; they range from level 1-6. In order to create headings, simply add a number sign ( # ) in front of the first word of the heading sentence you will be using.

The lower the number, starting with , the more important the level is of the heading. For example the heading below uses or the second level beyond the most important headings and thus it can be considered a subheading of the main heading of the page or :

## This is an example of a level 2 heading

This is an example of a level 2 heading

This is an example of a level 2 heading

Also keep in mind that for best compatibility across Markdown applications, always put a space between the first letter of a heading and the number sign as shown above with the T and the second # . Putting a blank line between headings or other sections of the document above or below a heading is also a good idea.

Line breaks

The best way to ensure a line break and split up sentences or forms of writing within a document is to add two or more (we recommend three to be sure) spaces at the end of the line before clicking enter. That way the second line or sentence does not join with the first in one continuous line or paragraph.

Читайте также:  Java function type signature

Another option is to use the HTML
tag if your markdown application supports HTML.

Paragraphs

Paragraphs are created like in standard word processors, except in Markdown the best practice is not to indent it in any way. This means a blank line should be used to separate paragraphs and the first letter should be on the leftmost side of the page. Here is an example:

I am creating a document in Markdown.

It is a nice way to format text.

I am creating a document in Markdown.

It is a nice way to format text.

I am creating a document in Markdown.

It is a nice way to format text.

Bold

In order to create bold syntax within a word, phrase, or line of text, using Markdown, simply put two asterisks, or underscores, before and after the text you want bolded.

**an example of bolded text using Markdown**

an example of bolded text using Markdown

an example of bolded text using Markdown

__another example of bolded text using Markdown__

another example of bolded text using Markdown

another example of bolded text using Markdown

Using the asterisks method is a better practice to keep in mind as you may want to bold just certain letters within a larger word or phrase and for compatibility having asterisks before and after this word will work better than underscoring the letters.

Just **Like** This

Italics

Italics works in a similar way to bold except having two asterisks or underscores, it is one in this case. Like bold, it is recommended to use asterisks as it is possible to italicise just a word within a phrase or even a letter within a word.

Using both italics and bold simultaneously

In order to put a strong emphasis on a word, phrase or text using Markdown and using both italics and bold at the same time, simply add three asterisks to the section you want emphasized this way.

Читайте также:  Php preg match любой символ

Here is an ***important section of text*** to consider

Here is an important section of text to consider

Here is an ***important section of text*** to consider

Blockquotes

If you want to create a paragraph as a block quote, insert the greater-than sign in front of it. Just like the example below shows:

It is a good practice to put a blank line before and after a blockquote within a Markup document.

Blockquotes with more than one paragraph

If you want a single blockquote to cover multiple paragraphs being part of the blockquote you have to add the greater-than sign between the paragraphs you are including.

Nested blockquotes

To create nested blockquote, or a blockqote as part of a larger blockquote, add to greater-than signs in front of the specific paragraph you want nested in the main paragraph. Keep one greater-than sign between them as well.

>> The second paragraph that will be nested

Keep in mind that you can insert other Markdown elements within the blockquotes as well, such as bold or italics.

Lists

Lists separate items, such as to-do tasks, in a top-down order. However, the order does not have to be chronological or ordered a certain way, but it can be, within Markdown syntax.

Ordered lists

Creating ordered or numbered lists is as easy as it is in a standard word document. Simply add a number and a period following it, then write your item or content on that same line.

Источник

Markdown Syntax

The dotCMS Markdown Viewtool uses Github-flavored Markdown syntax. This document describes the most commonly used markdown features using this syntax.

Markdown Basics

Markdown allows you to write using an easy-to-read, easy-to-write plain text format, which then converts to valid HTML for viewing on dotCMS. This list of examples was taken from github.com, which has popularized markdown to the point that it has become a defacto web standard. Markdown tags use simple characters and text conventions to allow the most common types of HTML formatting, without using HTML tags. Note that most markdown formatting does not require a closing tag or character.

Styling

When you use Markdown in dotCMS, dotCMS automatically applies standard styling to your Markdown-formatted text based on a pre-defined style sheet that ships with dotCMS. Other than the formatting characters supplied by Markdown, can’t apply specific styles to individual text elements within a markdown-formatted block of text. However you can still use HTML formatting with specific styling within a Markdown document. Please see Mixing Markdown with HTML, below.

Читайте также:  Си шарп темы для изучения

Mixing Markdown with HTML

When you create a document in dotCMS that uses Markdown, the document will also recognize all HTML tags. This allows you to use Markdown for the majority of your formatting, but also use HTML tags for more advanced formatting which

Markdown and Velocity

Important: You can not use Velocity code anywhere within your Markdown-formatted document. If you wish to use Velocity code within your document, you can not specify your document format as Markdown.

Common Formats

The following are some of the most common types of formatting used in HTML documents. Each includes a description, the equivalent HTML tags, and an example which displays both the Markdown formatted text and how the text will be displayed.

Paragraphs

To create paragraphs in Markdown, use one or more lines of consecutive text followed by one or more blank lines. Note: If you don’t leave a blank line between blocks of text, they will be collapsed into a single paragraph.

HTML Tags:

Markdown:

On July 2, an alien mothership entered Earth's orbit and deployed several dozen saucer-shaped "destroyer" spacecraft, each 15 miles (24 km) wide. On July 3, the Black Knights, a squadron of Marine Corps F/A-18 Hornets, participated in an assault on a destroyer near the city of Los Angeles. On July 4, the aliens struck back. On July 5, Los Angeles was evacuated. 

Displayed:

On July 2, an alien mothership entered Earth’s orbit and deployed several dozen saucer-shaped “destroyer” spacecraft, each 15 miles (24 km) wide. On July 3, the Black Knights, a squadron of Marine Corps F/A-18 Hornets, participated in an assault on a destroyer near the city of Los Angeles. On July 4, the aliens struck back. On July 5, Los Angeles was evacuated.

Headings

HTML Tags: , , etc.

To create a heading, add one or more has marks ( # ) at the beginning of a line, before your heading text. The number of hash marks you use will determine the size of the heading.

Markdown:

# The largest heading (an tag) ## The second largest heading (an tag) . ###### The 6th largest heading (an tag) 

Displays:

The largest heading (an

tag)

Источник

Оцените статью