I have used Jeykll tool to generate mark down content into HTMl .
I want to group the below mark down elements in to div element or any other custom Html tag.
Marked Down
#Multiple Axis
{:.title}
Different types of data can be visualized in a single chart with the help of
{: .description}
It can be used when we need to compare the trends of different kinds of data.
{: .description}
HTML Output
<h1 id="multiple-axis" class="title">Multiple Axis</h1>
<p class="description">Different typ`enter code here`es of data can be visualized in a single chart with the help of</p>
<p class="description">It can be used when we need to compare the trends of different kinds of data.</p>
How to group the above markdown into Div element or any custom tag like this
<div class="">
<h1 id="multiple-axis" class="title">Multiple Axis</h1>
<p class="description">Different types of data can be visualized in a single chart with the help of</p>
<p class="description">It can be used when we need to compare the trends of different kinds of data.</p>
</div>
The answer depends in part on which Markdown parser you are using. As it happens, Jekyll supports a few different Markdown parsers. And you may need to set some options on the parser you are using to enable the appropriate features.
Generally speaking, Markdown requires you to use raw HTML to get a div. As the Syntax Rules explain:
However, the syntax rules also state:
In other words, you would need to define the entire div and everything in it as raw HTML. Essentially, you would need to copy your desired output from your question above and paste that into the Markdown document.
However, some Markdown parsers have added additional functionality which allows various shortcuts. For example, it appears that the parser you are using supports assigning attributes to the various parts of a document without falling back to raw HTML -- which leads me to believe that you are probably using Kramdown which has documented support for attribute lists.
As it turns out, Kramdown also includes optional support for parsing Markdown content inside HTML Blocks. While the docs explain all of the options, the basic idea is that if you set an attribute of
markdown=1
on the raw HTML tag, then the content of that tag will be parsed as HTML. Like this:Which would generate the following HTML output:
Of course, you can then assign a class on your div as well. Therefore, you final document would look like this:
Of course, if you are using a different Markdown parser, you will need to consult that parser's documentation to see if it supports a similar non-standard feature.