Will HTML will effect the XML file


#1

while create a blog posts I have added a html code inside the markdown file.
The code which i have written, will it count in the XML file.

Is there is any better solution, instead of writing HTML in XML file.


#2

I don’t get what you are asking here.
Could you clarify?


#3

This is a screenshot of an XML file, where you can see the HTML code also.
How can I remove the HTML code to showing up in XML.

I have added this html code in markdown file to make the output beautiful.


#4

When you say “XML” you are referring to the HTML tags?
I.e. the div, p, etc?

Don’t put them in MD. Read the Kramdown documentation (it is quite good). The normal way is to do the formatting through classed or id’s.

You specify the class as follows in MD:

This is my text
{:.myclass}

This will cause the text to be of the class type “my class”.


#5

I have tried
{:.myclass}

Using this code class is not applying. Instead it is all converting into text.


#6

Make sure you have an empty line following the line with myclass in it. Markdown needs that to ensure it sees the preceding as the end of a block to which it can apply the class.

I find MD can be a bit picky, well, rather “non intuitively”, at times.


#7

Can you show some example?


#8

This is from a site of mine:

![icon](/assets/img/AIM-Trader-icon.png){:.image-centered}

{:.text-centered}
[App Store](https://itunes.apple.com/us/app/aim-trader/id477766752)

# Overview

AIM-Trader: A friend for volatile markets. 

Trading is not easy, it takes a lot of time and skill. In the 1970s a man named R. Lichello developed an algorithm that takes the sweat work out of trading. This algorithm has stood up to the test of time. It works best in volatile markets (like today) but also over the long haul it compares favorably to other long term strategies. 

This reminds me, image and text seem to be treated differently. With images the class spec should be following, with text it should precede.