<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ markup - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ markup - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Thu, 21 May 2026 16:11:39 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/markup/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ What is YAML? The YML File Format ]]>
                </title>
                <description>
                    <![CDATA[ YAML is one of the most popular languages for writing configuration files. In this article, you will learn how YAML compares to XML and JSON - two languages also used for creating configuration files. You will also learn some of the rules and feature... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-is-yaml-the-yml-file-format/</link>
                <guid isPermaLink="false">66b1e4f698966ccde43c3c66</guid>
                
                    <category>
                        <![CDATA[ markup ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ YAML ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Dionysia Lemonaki ]]>
                </dc:creator>
                <pubDate>Fri, 11 Nov 2022 16:20:17 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/11/pexels-christina-morillo-1181675.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>YAML is one of the most popular languages for writing configuration files.</p>
<p>In this article, you will learn how YAML compares to XML and JSON - two languages also used for creating configuration files.</p>
<p>You will also learn some of the rules and features of the language, along with its basic syntax.</p>
<p>Here is what we will cover:</p>
<ol>
<li><a class="post-section-overview" href="#intro">What is YAML?</a></li>
<li><a class="post-section-overview" href="#differences">XML VS JSON VS YAML - What's The Difference?</a><ol>
<li><a class="post-section-overview" href="#xml">XML</a></li>
<li><a class="post-section-overview" href="#json">JSON</a></li>
<li><a class="post-section-overview" href="#yaml">YAML</a></li>
</ol>
</li>
<li><a class="post-section-overview" href="#features-and-rules">Features and basic rules of YAML</a><ol>
<li><a class="post-section-overview" href="#create-file">How to create a YAML file</a></li>
<li><a class="post-section-overview" href="#multi-document">Multi-document support in YAML</a></li>
<li><a class="post-section-overview" href="#indentation">Indentation in YAML</a></li>
<li><a class="post-section-overview" href="#tabs">Tabs in YAML</a></li>
<li><a class="post-section-overview" href="#whitespace">Whitespace in YAML</a></li>
<li><a class="post-section-overview" href="#explicit-data-types">Explicit data types in YAML</a></li>
</ol>
</li>
<li><a class="post-section-overview" href="#syntax">An introduction to YAML syntax</a><ol>
<li><a class="post-section-overview" href="#scalars">Scalars</a></li>
<li><a class="post-section-overview" href="#collections">Collections</a></li>
</ol>
</li>
</ol>
<h2 id="heading-what-is-yaml">What is YAML? <a></a></h2>
<p>YAML stands for <strong>YAML</strong> <strong>A</strong>in't <strong>M</strong>arkup <strong>L</strong>anguage, but it originally stood for <strong>Y</strong>et <strong>A</strong>nother <strong>M</strong>arkup <strong>L</strong>anguage.</p>
<p>YAML is a human-readable data serialization language, just like XML and JSON.</p>
<p>Serialization is a process where one application or service that has different data structures and is written in a different set of technologies can transfer data to another application using a standard format.</p>
<p>In other words, serialization is about translating, converting, and wrapping up a data structure in another format. </p>
<p>The data in the new format can be stored in a file or transmitted to another application or service over a network.</p>
<p>YAML is a widely used format for writing configuration files for different DevOps tools, programs, and applications because of its human-readable and intuitive syntax.</p>
<h2 id="heading-xml-vs-json-vs-yaml-whats-the-difference">XML VS JSON VS YAML - What's The Difference? <a></a></h2>
<p>XML, JSON, and YAML are all used for creating configuration files and transferring data between applications.  </p>
<p>Each language has its advantages and disadvantages. </p>
<p>Now, let's see some of the characteristics of the three languages. You will also see an example of how the same code is written in each language to demonstrate the high-level differences in their syntax.</p>
<h3 id="heading-xml">XML <a></a></h3>
<p>XML, which stands for Extensible Markup Language, was first introduced in 1996 and was designed for general-purpose use.</p>
<p>XML is a generalized markup language. It offers a structured yet flexible syntax and a defined document schema. This makes it a good choice when working with complex configurations that require a structured format and finer control over schema validation to ensure configurations always have the correct format.</p>
<p>With that said, XML's syntax can be verbose, redundant, and harder to read in comparison with other serialization languages.</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">Employees</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">Employee</span>&gt;</span> 
        <span class="hljs-tag">&lt;<span class="hljs-name">name</span>&gt;</span> John Doe <span class="hljs-tag">&lt;/<span class="hljs-name">name</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">department</span>&gt;</span> Engineering <span class="hljs-tag">&lt;/<span class="hljs-name">department</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">country</span>&gt;</span> USA <span class="hljs-tag">&lt;/<span class="hljs-name">country</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">Employee</span>&gt;</span>
     <span class="hljs-tag">&lt;<span class="hljs-name">Employee</span>&gt;</span> 
        <span class="hljs-tag">&lt;<span class="hljs-name">name</span>&gt;</span> Kate Kateson <span class="hljs-tag">&lt;/<span class="hljs-name">name</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">department</span>&gt;</span> IT Support <span class="hljs-tag">&lt;/<span class="hljs-name">department</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">country</span>&gt;</span> United Kingdom <span class="hljs-tag">&lt;/<span class="hljs-name">country</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">Employee</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">Employees</span>&gt;</span>
</code></pre>
<h3 id="heading-json">JSON <a></a></h3>
<p>JSON stands for JavaScript Object Notation and has been around since the early 2000s.</p>
<p>JSON was initially inspired by the JavaScript programming language,  but it is not tied to only one language. Instead, it is a language-independent format.</p>
<p>Most modern programming languages have libraries for parsing and generating JSON data.</p>
<p>JSON offers a much more readable, human-friendly, compact, and simple syntax compared to XML. It makes for a great format for storing and transferring information between web applications and servers over a network.</p>
<p>With that said, it may not offer the best support for complex configurations.</p>
<pre><code class="lang-json">{
    <span class="hljs-attr">"Employees"</span>: [
    {
            <span class="hljs-attr">"name"</span>: <span class="hljs-string">"John Doe"</span>,
            <span class="hljs-attr">"department"</span>: <span class="hljs-string">"Engineering"</span>,
            <span class="hljs-attr">"country"</span>: <span class="hljs-string">"USA"</span>
        },

        {
            <span class="hljs-attr">"name"</span>: <span class="hljs-string">"Kate Kateson"</span>,
            <span class="hljs-attr">"department"</span>: <span class="hljs-string">"IT support"</span>,
            <span class="hljs-attr">"country"</span>: <span class="hljs-string">"United Kingdom"</span>
        }
    ]
}
</code></pre>
<h3 id="heading-yaml">YAML <a></a></h3>
<p>YAML, originally known as Yet Another Markup Language, was created in 2001 but now stands for YAML Ain't Markup Language.</p>
<p>YAML is an official strict superset of JSON despite looking very different from JSON.  </p>
<p>YAML can do everything that JSON can and more. A valid YAML file can contain JSON, and JSON can transform into YAML.</p>
<p>YAML has the most human-readable, intuitive, and compact syntax for defining configurations compared to XML and JSON.</p>
<p>YAML uses indentation to define structure in the file, which is helpful if you are used to writing Python code and are familiar with the indentation style the language uses. </p>
<p>With that said, if you don't get the indentation and format right, it can lead to validation errors, making it not the friendliest for beginners.</p>
<pre><code class="lang-yaml"><span class="hljs-attr">Employees:</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">John</span> <span class="hljs-string">Doe</span>
  <span class="hljs-attr">department:</span> <span class="hljs-string">Engineering</span>
  <span class="hljs-attr">country:</span> <span class="hljs-string">USA</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">Kate</span> <span class="hljs-string">Kateson</span>
  <span class="hljs-attr">department:</span> <span class="hljs-string">IT</span> <span class="hljs-string">support</span>
  <span class="hljs-attr">country:</span> <span class="hljs-string">United</span> <span class="hljs-string">Kingdom</span>
</code></pre>
<h2 id="heading-features-and-basic-rules-of-yaml">Features and Basic Rules of YAML <a></a></h2>
<p>Now, let's go over some of the basic rules and features of the language.</p>
<h3 id="heading-how-to-create-a-yaml-file">How to Create a YAML File <a></a></h3>
<p>To create a YAML file, use either the <code>.yaml</code> or <code>.yml</code> file extension.</p>
<h3 id="heading-multi-document-support-in-yaml">Multi-Document Support in YAML <a></a></h3>
<p>Before writing any YAML code, you can add three dashes (<code>---</code>) at the start of the file:</p>
<pre><code class="lang-yaml"><span class="hljs-meta">---</span>
<span class="hljs-attr">Employees:</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">John</span> <span class="hljs-string">Doe</span>
  <span class="hljs-attr">department:</span> <span class="hljs-string">Engineering</span>
  <span class="hljs-attr">country:</span> <span class="hljs-string">USA</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">Kate</span> <span class="hljs-string">Kateson</span>
  <span class="hljs-attr">department:</span> <span class="hljs-string">IT</span> <span class="hljs-string">support</span>
  <span class="hljs-attr">country:</span> <span class="hljs-string">United</span> <span class="hljs-string">Kingdom</span>
</code></pre>
<p>YAML allows you to have multiple YAML documents in a singe YAML file, making file organization much easier.</p>
<p>Separate each document with three dashes (<code>---</code>):</p>
<pre><code class="lang-yaml"><span class="hljs-meta">---</span>
<span class="hljs-attr">Employees:</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">John</span> <span class="hljs-string">Doe</span>
  <span class="hljs-attr">department:</span> <span class="hljs-string">Engineering</span>
  <span class="hljs-attr">country:</span> <span class="hljs-string">USA</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">Kate</span> <span class="hljs-string">Kateson</span>
  <span class="hljs-attr">department:</span> <span class="hljs-string">IT</span> <span class="hljs-string">support</span>
  <span class="hljs-attr">country:</span> <span class="hljs-string">United</span> <span class="hljs-string">Kingdom</span>
<span class="hljs-meta">---</span>
<span class="hljs-attr">Fruit:</span>
 <span class="hljs-bullet">-</span> <span class="hljs-string">Oranges</span>
 <span class="hljs-bullet">-</span> <span class="hljs-string">Pears</span>
 <span class="hljs-bullet">-</span> <span class="hljs-string">Apples</span>
</code></pre>
<p>You can also use three dots (<code>...</code>) to mark the end of the document:</p>
<pre><code class="lang-yaml"><span class="hljs-meta">---</span>
<span class="hljs-attr">Employees:</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">John</span> <span class="hljs-string">Doe</span>
  <span class="hljs-attr">department:</span> <span class="hljs-string">Engineering</span>
  <span class="hljs-attr">country:</span> <span class="hljs-string">USA</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">Kate</span> <span class="hljs-string">Kateson</span>
  <span class="hljs-attr">department:</span> <span class="hljs-string">IT</span> <span class="hljs-string">support</span>
  <span class="hljs-attr">country:</span> <span class="hljs-string">United</span> <span class="hljs-string">Kingdom</span>
<span class="hljs-string">...</span>
</code></pre>
<h3 id="heading-indentation-in-yaml">Indentation in YAML <a></a></h3>
<p>In YAML, there is an emphasis on indentation and line separation to denote levels and structure in data. The indentation system is quite similar to the one Python uses.</p>
<p>YAML doesn't use symbols such as curly braces, square brackets, or opening or closing tags - just indentation.</p>
<h3 id="heading-tabs-in-yaml">Tabs in YAML <a></a></h3>
<p>YAML doesn't allow you to use any tabs when creating indentation - use spaces instead.</p>
<h3 id="heading-whitespace-in-yaml">Whitespace in YAML <a></a></h3>
<p>Whitespace doesn't matter as long as child elements are indented inside the parent element.</p>
<h3 id="heading-how-to-write-a-comment-in-yaml">How to Write A Comment in YAML <a></a></h3>
<p>To add a comment to comment out a line of code, use the <code>#</code> character:</p>
<pre><code class="lang-yaml"><span class="hljs-meta">---</span>
<span class="hljs-comment"># Employees in my company</span>
<span class="hljs-attr">Employees:</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">John</span> <span class="hljs-string">Doe</span>
  <span class="hljs-attr">department:</span> <span class="hljs-string">Engineering</span>
  <span class="hljs-attr">country:</span> <span class="hljs-string">USA</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">Kate</span> <span class="hljs-string">Kateson</span>
  <span class="hljs-attr">department:</span> <span class="hljs-string">IT</span> <span class="hljs-string">support</span>
  <span class="hljs-attr">country:</span> <span class="hljs-string">United</span> <span class="hljs-string">Kingdom</span>
</code></pre>
<h3 id="heading-explicit-data-types-in-yaml">Explicit Data Types in YAML <a></a></h3>
<p>Although YAML auto-detects the data types in a file, you can specify the type of data you want to use.</p>
<p>To explicitly specify the type of data, use the <code>!!</code> symbol and the name of the data type before the value:</p>
<pre><code class="lang-yaml"><span class="hljs-comment"># parse this value as a string</span>
<span class="hljs-attr">date:</span> <span class="hljs-type">!!str</span> <span class="hljs-number">2022-11-11</span>

<span class="hljs-comment">## parse this value as a float (it will be 1.0 instead of 1)</span>
<span class="hljs-attr">fave_number:</span> <span class="hljs-type">!!float</span> <span class="hljs-number">1</span>
</code></pre>
<h2 id="heading-an-introduction-to-yaml-syntax">An Introduction to YAML Syntax <a></a></h2>
<h3 id="heading-scalars">Scalars <a></a></h3>
<p>Scalars in YAML are the data on the page - strings, numbers, booleans, and nulls.</p>
<p>Let's see some examples of how to use each one.</p>
<p>In YAML, strings in some cases can be left unquoted, but you can also wrap them in single (<code>' '</code>) or double (<code>" "</code>) quotation marks:</p>
<pre><code class="lang-yaml"><span class="hljs-string">A</span> <span class="hljs-string">string</span> <span class="hljs-string">in</span> <span class="hljs-string">YAML!</span>

<span class="hljs-string">'A string in YAML!'</span>

<span class="hljs-string">"A string in YAML!"</span>
</code></pre>
<p>If you want to write a string that spans across multiple lines and you want to preserve the line breaks, use the pipe symbol (<code>|</code>):</p>
<pre><code class="lang-yaml"><span class="hljs-string">|
 I am message that spans multiple lines
 I go on and on across lines
 and lines
 and more lines</span>
</code></pre>
<p>Make sure that the message is indented!</p>
<p>Alternatively, if you have a string in a YAML file that spans across multiple lines for readability, but you want the parser to interpret it as a single line string, you can use the <code>&gt;</code> character, which will replace each line break with a space:</p>
<pre><code class="lang-yaml"><span class="hljs-string">&gt;
 I am message that spans
 multiple lines
 but I will be parsed
 on one line</span>
</code></pre>
<p>Again, make sure you don't forget to indent the message!</p>
<p>Numbers express numerical data, and in YAML, these include integers (whole numbers), floats (numbers with a decimal point), exponentials, octals, and hexadecimals:</p>
<pre><code class="lang-yaml"><span class="hljs-comment"># integer</span>
<span class="hljs-number">19</span>

<span class="hljs-comment"># float </span>
<span class="hljs-number">8.7</span>

<span class="hljs-comment"># exponential</span>
<span class="hljs-number">4.5e+13</span>

<span class="hljs-comment"># octal </span>
<span class="hljs-string">0o23</span>

<span class="hljs-comment"># hexadecimal</span>
<span class="hljs-number">0xFF</span>
</code></pre>
<p>Booleans in YAML, and other programming languages, have one of two states and are expressed with either <code>true</code> or <code>false</code>.</p>
<p>Words like <code>true</code> and <code>false</code> are keywords in YAML, so don't surround them with quotation marks if you want them interpreted as booleans.</p>
<p>Lastly, Null values are expressed with the keyword <code>null</code> or the tilde character, <code>~</code>.</p>
<h3 id="heading-collections">Collections <a></a></h3>
<p>More often than not, you will not be writing simple scalars in your YAML files - you will be using collections instead.</p>
<p>Collections in YAML can be:</p>
<ul>
<li>Sequences (lists/arrays)</li>
<li>Mappings (dictionaries/hashes)</li>
</ul>
<p>To write a sequence, use a dash (<code>-</code>) followed by a space:</p>
<pre><code class="lang-yaml"><span class="hljs-bullet">-</span> <span class="hljs-string">HTML</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">CSS</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">JavaScript</span>
</code></pre>
<p>Each item in the sequence (list) is placed on a separate line, with a dash in front of the value.</p>
<p>And each item in the list is on the same level.</p>
<p>That said, you can create a nested sequence (remember, use spaces - not tabs - to create the levels of indentation):</p>
<pre><code class="lang-yaml"><span class="hljs-bullet">-</span> <span class="hljs-string">HTML</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">CSS</span>
<span class="hljs-bullet">-</span> <span class="hljs-string">JavaScript</span>
 <span class="hljs-bullet">-</span> <span class="hljs-string">React</span>
 <span class="hljs-bullet">-</span> <span class="hljs-string">Angular</span>
 <span class="hljs-bullet">-</span> <span class="hljs-string">Vue</span>
</code></pre>
<p>In the sequence above, <code>React, Angular and Vue</code> are sub-items of the item <code>JavaScript</code>.</p>
<p>Mappings allow you to list keys with values. Key/value pairs are the building blocks of YAML documents.</p>
<p>Use a colon (<code>:</code>) followed by a space to create key/value pairs:</p>
<pre><code class="lang-yaml"><span class="hljs-attr">Employees:</span>
 <span class="hljs-attr">name:</span> <span class="hljs-string">John</span> <span class="hljs-string">Doe</span>
 <span class="hljs-attr">age:</span> <span class="hljs-number">23</span>
 <span class="hljs-attr">country:</span> <span class="hljs-string">USA</span>
</code></pre>
<p>In the example above, a name gets assigned to a specific value.</p>
<p>The value <code>John Doe</code> gets mapped (or assigned) to the <code>name</code> key, the value <code>23</code> gets mapped to the <code>age</code> key, and the value <code>USA</code> gets mapped to the <code>country</code> key. Altogether, these create an object.</p>
<p>You can also use a mapping with a sequence.</p>
<p>For example, taking the example sequence from earlier on, here is how you would build a list of <code>frontend_languages</code>:</p>
<pre><code class="lang-yaml"><span class="hljs-attr">frontend_languages:</span>
 <span class="hljs-bullet">-</span> <span class="hljs-string">HTML</span>
 <span class="hljs-bullet">-</span> <span class="hljs-string">CSS</span>
 <span class="hljs-bullet">-</span> <span class="hljs-string">JavaScript</span>
  <span class="hljs-bullet">-</span> <span class="hljs-string">React</span>
  <span class="hljs-bullet">-</span> <span class="hljs-string">Angular</span>
  <span class="hljs-bullet">-</span> <span class="hljs-string">Vue</span>
</code></pre>
<p>In the example above, I created a list of <code>frontend_languages</code>, where there are multiple values under the same key, <code>frontend_languages</code>.</p>
<p>Similarly, you can create a list of objects:</p>
<pre><code class="lang-yaml"><span class="hljs-attr">Employees:</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">John</span> <span class="hljs-string">Doe</span>
  <span class="hljs-attr">department:</span> <span class="hljs-string">Engineering</span>
  <span class="hljs-attr">country:</span> <span class="hljs-string">USA</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">Kate</span> <span class="hljs-string">Kateson</span>
  <span class="hljs-attr">department:</span> <span class="hljs-string">IT</span> <span class="hljs-string">support</span>
  <span class="hljs-attr">country:</span> <span class="hljs-string">United</span> <span class="hljs-string">Kingdom</span>
</code></pre>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Hopefully, this article was helpful and gave you insight into what YAML is, what the syntax of the language looks like, and how it differs from XML and JSON.</p>
<p>Thank you for reading, and happy coding!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What is the Jamstack? Tutorial for Beginners ]]>
                </title>
                <description>
                    <![CDATA[ You may have heard the term Jamstack and have been wondering what it means. Well, the Jamstack is nothing more than a modern way of building web applications. Jamstack takes advantage of existing technologies – which we'll discuss in a minute. The re... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/jamstack-for-beginners/</link>
                <guid isPermaLink="false">66d45e0847a8245f78752a1e</guid>
                
                    <category>
                        <![CDATA[ api ]]>
                    </category>
                
                    <category>
                        <![CDATA[ JAMstack ]]>
                    </category>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                    <category>
                        <![CDATA[ markup ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Applications ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Damilola Oladele ]]>
                </dc:creator>
                <pubDate>Thu, 10 Nov 2022 18:30:49 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/11/Damilola-Oladele-2.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>You may have heard the term Jamstack and have been wondering what it means. Well, the Jamstack is nothing more than a modern way of building web applications.</p>
<p>Jamstack takes advantage of existing technologies – which we'll discuss in a minute. The result is better performance, improved security, and easier scalability for web applications.</p>
<p>In this article, you'll learn what Jamstack means and the benefits of using this approach in your projects.</p>
<h2 id="heading-what-is-the-jamstack">What is the Jamstack?</h2>
<p>Jamstack is a web development architecture. Matt Biilmann, the CEO of Netlify, popularized it with his presentation at Smashing Conference 2016.</p>
<p>Jamstack is an acronym for Javascript, APIs, and Markup, and is a technology stack you use to build your apps.</p>
<p>This is like the MERN stack (MongoDB, ExpressJS, ReactJS and NodeJS) and the MEAN stack (MongoDB, ExpressJS, Angular and NodeJS) – just with different tools.</p>
<p>Now let's discuss the various components of a Jamstack web application:</p>
<h3 id="heading-javascript">Javascript</h3>
<p>Javascript is the core programming language of the web. It has been around for decades and you can use it both on the client side and the backend with NodeJS.</p>
<p>Javascript is the programming language you use for handling the client side of your Jamstack applications.</p>
<h3 id="heading-apis">APIs</h3>
<p>API is an acronym for <strong>Application Programming Interface</strong>. It's an interface which helps two or more computer programs communicate with each other.</p>
<p>In Jamstack apps, you use APIs to communicate with your backend.</p>
<h3 id="heading-markup">Markup</h3>
<p>Markup refers to standard text-encoding systems consisting of a set of symbols inserted into a text document. Examples of markup languages are <strong>HTML</strong>, <strong>XML</strong>, and templating languages such as <strong>JSX</strong>.</p>
<p>In the Jamstack, markup refers to the content of a Jamstack application. Note that we use markup here in its broader sense. It doesn't refer to text content only but also to the assets of the web application, such as images.</p>
<h2 id="heading-important-features-of-jamstack-apps">Important Features of Jamstack Apps</h2>
<p>To consider an application a Jamstack app, it should meet the following conditions:</p>
<h3 id="heading-distributed-architecture">Distributed Architecture</h3>
<p>This refers to the decoupling of the client side from the backend. The client side handles the presentation of the user interface, and the backend handles business logic and data.</p>
<p>Communication between the frontend and backend happens via a dedicated API. This means that a change or upgrade in one will not affect the other. This results in easier maintenance of the entire web application.</p>
<h3 id="heading-static-sites">Static Sites</h3>
<p>It is important for Jamstack applications to serve static web pages and not dynamic ones.</p>
<p>Traditional web applications are dynamic sites. This means that when you request a page, the backend will have to reach a database to retrieve the data. The data is then used to generate HTML files, and then sent back to the client.</p>
<p>The disadvantage of dynamic sites is how long it takes to complete these steps.</p>
<p>For static sites, the pages are already pre-rendered at build time. So every time you request a page, you get the pre-rendered page.</p>
<p>This eliminates the time that dynamic sites spend in obtaining data, generating HTML files, and sending it back to the client. You can serve your static sites from a <a target="_blank" href="https://www.cloudflare.com/learning/cdn/what-is-a-cdn/">content delivery network (CDN).</a> This will lead to improved speed and reduced costs.</p>
<p>Examples of static site generators that you can use for your Jamstack web applications include:</p>
<ul>
<li><p>NextJS</p>
</li>
<li><p>Gatsby</p>
</li>
<li><p>Hugo</p>
</li>
<li><p>Jekyll</p>
</li>
<li><p>Nuxt</p>
</li>
</ul>
<h2 id="heading-why-should-you-use-the-jamstack-for-your-web-applications">Why Should You Use the Jamstack for your Web Applications?</h2>
<p>Let's now discuss some of the reasons the Jamstack web architecture has become so popular in recent times and why you should consider adopting it:</p>
<h3 id="heading-jamstack-apps-are-scalable">Jamstack Apps Are Scalable</h3>
<p>You can serve most Jamstack applications from a CDN. This allows for the speedy transfer of assets needed for loading web pages.</p>
<p>As a result of the distributed nature of CDNs, your web application will also be able to handle more traffic at a reduced cost.</p>
<h3 id="heading-jamstack-apps-are-easy-to-maintain">Jamstack Apps Are Easy to Maintain</h3>
<p>Jamstack applications are easier to maintain since their client side is decoupled from their backends.</p>
<p>This means that you can maintain one part without requiring major modifications to the other.</p>
<h3 id="heading-jamstack-apps-load-faster">Jamstack Apps Load Faster</h3>
<p>As stated earlier, serving your site from a CDN increases the speed with which it loads.</p>
<p>Also, in Jamstack applications, web pages are prebuilt, saving time that would normally be spent retrieving and generating HTML files every time you make a request.</p>
<h3 id="heading-jamstack-apps-are-cheaper">Jamstack Apps Are Cheaper</h3>
<p>Since Jamstack applications are easier to maintain and deploy, they are cheaper compared to their traditional counterparts.</p>
<h3 id="heading-jamstack-apps-are-more-secure">Jamstack Apps Are More Secure</h3>
<p>Since you do not have to constantly maintain a server in Jamstack applications and the pages are constructed on read-only files (that is, the pages are static), you can worry less about the security of your applications.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Despite the fact that more and more projects are being built using the Jamstack architecture, we're still in the relatively early stages of its adoption.</p>
<p>I believe that more large and small businesses will adopt it in the near future in place of costly monolithic architectures.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Open an XML File ]]>
                </title>
                <description>
                    <![CDATA[ XML stands for eXtensible Markup Language. XML files are readable files that describe the structure of data. You store XML files with the .xml extension. An XML file contains tags that specify how the document should be structured and how it should b... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-open-an-xml-file/</link>
                <guid isPermaLink="false">66d45fab3dce891ac3a9680c</guid>
                
                    <category>
                        <![CDATA[ beginner ]]>
                    </category>
                
                    <category>
                        <![CDATA[ markup ]]>
                    </category>
                
                    <category>
                        <![CDATA[ xml ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Joel Olawanle ]]>
                </dc:creator>
                <pubDate>Thu, 27 Oct 2022 18:58:02 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/10/cover-template--18-.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>XML stands for e<strong>X</strong>tensible <strong>M</strong>arkup <strong>L</strong>anguage. XML files are readable files that describe the structure of data. You store XML files with the <code>.xml</code> extension.</p>
<p>An XML file contains tags that specify how the document should be structured and how it should be stored and transmitted over the internet.</p>
<p>It is no longer the preferred method for organizing and transmitting data, but many legacy systems still use it. Also, both RSS and SVG are based on the XML format.</p>
<p>This is how XML appears:</p>
<pre><code class="lang-xml"><span class="hljs-meta">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">catalog</span>&gt;</span>
   <span class="hljs-tag">&lt;<span class="hljs-name">book</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"bk1"</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">author</span>&gt;</span>Corets, Eva<span class="hljs-tag">&lt;/<span class="hljs-name">author</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>Maeve Ascendant<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">genre</span>&gt;</span>Fantasy<span class="hljs-tag">&lt;/<span class="hljs-name">genre</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">price</span>&gt;</span>5.95<span class="hljs-tag">&lt;/<span class="hljs-name">price</span>&gt;</span>
   <span class="hljs-tag">&lt;/<span class="hljs-name">book</span>&gt;</span>
   <span class="hljs-tag">&lt;<span class="hljs-name">book</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"bk2"</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">author</span>&gt;</span>Corets, Eva<span class="hljs-tag">&lt;/<span class="hljs-name">author</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>Oberon's Legacy<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">genre</span>&gt;</span>Fantasy<span class="hljs-tag">&lt;/<span class="hljs-name">genre</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">price</span>&gt;</span>5.95<span class="hljs-tag">&lt;/<span class="hljs-name">price</span>&gt;</span>
   <span class="hljs-tag">&lt;/<span class="hljs-name">book</span>&gt;</span>
   <span class="hljs-tag">&lt;<span class="hljs-name">book</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"bk3"</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">author</span>&gt;</span>Corets, Eva<span class="hljs-tag">&lt;/<span class="hljs-name">author</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>The Sundered Grail<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">genre</span>&gt;</span>Fantasy<span class="hljs-tag">&lt;/<span class="hljs-name">genre</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">price</span>&gt;</span>5.95<span class="hljs-tag">&lt;/<span class="hljs-name">price</span>&gt;</span>
   <span class="hljs-tag">&lt;/<span class="hljs-name">book</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">catalog</span>&gt;</span>
</code></pre>
<p>In this article, you will learn the various ways you can open an XML file, either on your computer or online.</p>
<h2 id="heading-how-to-open-an-xml-file-using-a-text-editor">How to Open an XML File Using a Text Editor</h2>
<p>You must have an XML file you are trying to open, either to view only or to view and edit.</p>
<p>If you want to open an XML file and edit it, you can use a text editor. You can use default text editors, which come with your computer, like Notepad on Windows or TextEdit on Mac.</p>
<p>All you have to do is locate the XML file, right-click the XML file, and select the "Open With" option. This will display a list of programs to open the file.</p>
<p><img src="https://paper-attachments.dropboxusercontent.com/s_6918DB109E81C99C403FDE441785C55AA8E56E1977270D55F040260DC7FE989F_1666877244802_image.png" alt="s_6918DB109E81C99C403FDE441785C55AA8E56E1977270D55F040260DC7FE989F_1666877244802_image" width="1968" height="912" loading="lazy"></p>
<p>Select Notepad if it is a Windows computer or TextEdit if it is a Mac computer, as shown in the image above. These two are pre-installed text editors for each operating system and should already be on the list. Any basic text editor will work.</p>
<p>You can use other text editors like <a target="_blank" href="https://code.visualstudio.com/">VSCode</a> (which is suggested on the image above), <a target="_blank" href="https://atom.io/">Atom</a>, <a target="_blank" href="https://www.sublimetext.com/">Sublime Text</a> and others. But it is always best to use default editors for basic tasks like this, as text editors like VSCode, Atom, and Sublime Text are pretty heavy programs.</p>
<h2 id="heading-how-to-open-an-xml-file-using-a-browser">How to Open an XML File Using a Browser</h2>
<p>If you only want to view the file, you can use any web browser such as Safari, Chrome, and lots more with similar procedures.</p>
<p>The first step is to locate the XML file you want to open, right-click the file, and select the “open with” option. A list of options will appear, including some browsers.</p>
<p><img src="https://paper-attachments.dropboxusercontent.com/s_6918DB109E81C99C403FDE441785C55AA8E56E1977270D55F040260DC7FE989F_1666878064357_image.png" alt="s_6918DB109E81C99C403FDE441785C55AA8E56E1977270D55F040260DC7FE989F_1666878064357_image" width="1968" height="912" loading="lazy"></p>
<p>Click on your preferred browser, and then your XML will load up.</p>
<p>Another option would be to open your browser and then drag the XML file to the browser. This also works for text editors.</p>
<h2 id="heading-how-to-open-an-xml-file-online">How to Open an XML File Online</h2>
<p>On the internet, dozens of XML viewers and even converters help convert XML files to other formats like JSON. Here are some of the most popular online XML viewers/editors:</p>
<ul>
<li><p><a target="_blank" href="https://codebeautify.org/xmlviewer">Code Beautify</a></p>
</li>
<li><p><a target="_blank" href="https://jsonformatter.org/xml-viewer">JSON Formatter</a></p>
</li>
<li><p><a target="_blank" href="https://www.tutorialspoint.com/online_xml_editor.htm">Tutorialspoint</a></p>
</li>
<li><p><a target="_blank" href="https://jsonformatter.org/xml-viewer">JSON Formatter</a></p>
</li>
<li><p><a target="_blank" href="https://chrome.google.com/webstore/detail/xml-viewer/legopflakafagikcpiapgnbokgkbejlk/related?hl=en">Google Chrome Extension</a></p>
</li>
</ul>
<p>Each one works similarly, allowing you to upload the XML file from your computer.</p>
<p>Chrome has an <a target="_blank" href="https://chrome.google.com/webstore/detail/xml-viewer/legopflakafagikcpiapgnbokgkbejlk?hl=en">XML Viewer</a> extension, which works like all these online XML viewers. All you have to do is download the extension. Then click on it whenever you want to open an XML file.</p>
<p><img src="https://paper-attachments.dropboxusercontent.com/s_6918DB109E81C99C403FDE441785C55AA8E56E1977270D55F040260DC7FE989F_1666878537071_image.png" alt="s_6918DB109E81C99C403FDE441785C55AA8E56E1977270D55F040260DC7FE989F_1666878537071_image" width="2296" height="696" loading="lazy"></p>
<p>Once you click on it, an interface that is easy to navigate will appear with two major options you can use to upload your XML file: From your PC or From your Google Drive.</p>
<p><img src="https://paper-attachments.dropboxusercontent.com/s_6918DB109E81C99C403FDE441785C55AA8E56E1977270D55F040260DC7FE989F_1666878607944_image.png" alt="s_6918DB109E81C99C403FDE441785C55AA8E56E1977270D55F040260DC7FE989F_1666878607944_image" width="2684" height="1364" loading="lazy"></p>
<p>When you select an option, you can search for the file, and within a few milliseconds, your XML file will open in the plain section.</p>
<p><img src="https://paper-attachments.dropboxusercontent.com/s_6918DB109E81C99C403FDE441785C55AA8E56E1977270D55F040260DC7FE989F_1666878725496_image.png" alt="s_6918DB109E81C99C403FDE441785C55AA8E56E1977270D55F040260DC7FE989F_1666878725496_image" width="2374" height="1334" loading="lazy"></p>
<h2 id="heading-ta-da">Ta-da 😂</h2>
<p>In this short article, you have learned how to open an XML file. I hope this will help you.</p>
<p>Have fun coding!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Markdown Cheat Sheet – How to Write Articles in Markdown Language ]]>
                </title>
                <description>
                    <![CDATA[ As a developer, you have likely heard of HTML, which stands for HyperText Markup Language. And you may know that HTML is a language used to create websites – but what does markup mean? Markup languages are languages that use tags to define different ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/markdown-cheatsheet/</link>
                <guid isPermaLink="false">66bc55e5a30f8b3984dad877</guid>
                
                    <category>
                        <![CDATA[ HTML ]]>
                    </category>
                
                    <category>
                        <![CDATA[ markdown ]]>
                    </category>
                
                    <category>
                        <![CDATA[ markup ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Kealan Parr ]]>
                </dc:creator>
                <pubDate>Mon, 22 Aug 2022 22:16:38 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/08/Markdown-cheatsheet.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>As a developer, you have likely heard of <a target="_blank" href="https://en.wikipedia.org/wiki/HTML">HTML</a>, which stands for <strong>H</strong>yper<strong>T</strong>ext <strong>M</strong>arkup <strong>L</strong>anguage.</p>
<p>And you may know that HTML is a language used to create websites – but what does <strong>markup</strong> mean?</p>
<p><a target="_blank" href="https://techterms.com/definition/markup_language">Markup languages</a> are languages that use tags to define different elements within a text document. Most people are familiar with <strong>Rich Text Editors</strong> – programs that allow users to add extra formatting, images, and links to their documents.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/image-30.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>A screenshot of the GUI of the Microsoft Word software (a Rich Text Editor).</em></p>
<p>But markup languages use tags like:</p>
<ul>
<li><p>is a paragraph tag.</p>
</li>
<li><p>makes bold text.</p>
</li>
</ul>
<p>There are quite a few markup languages like <a target="_blank" href="https://en.wikipedia.org/wiki/XML">XML</a>, <a target="_blank" href="https://en.wikipedia.org/wiki/HTML">HTML</a>, and the topic of this article: <strong>Markdown</strong>.</p>
<p>Developers generally use markdown for documentation – and it is often included in most repositories. For example, I used markdown to write this article on freeCodeCamp.</p>
<p>So let's look at all we can do with markdown.</p>
<p><strong>Disclaimer:</strong> There is no unifying body or specification to standardise markdown – just some widely accepted best practices. So your mileage might vary depending on what markdown parser you're using for this cheat sheet.</p>
<h1 id="heading-markdown-cheat-sheet">Markdown Cheat Sheet</h1>
<p>Here are some of the most commonly used methods for manipulating text in markdown.</p>
<h1 id="heading-how-to-create-headers-in-markdown">How to Create Headers in Markdown</h1>
<p>There are six markdown headers, H1 thorough to H6. I'll show you how it displays visually, and also the way you create it using markdown.</p>
<p>H1's are the biggest and generally are the "main" headers, and each header after H1 gets smaller.</p>
<h1 id="heading-h1-tag">H1 tag</h1>
<p><code># H1 tag</code></p>
<h2 id="heading-h2-tag">H2 tag</h2>
<p><code>## H2 tag</code></p>
<h3 id="heading-h3-tag">H3 tag</h3>
<p><code>### H3 tag</code></p>
<h4 id="heading-h4-tag">H4 tag</h4>
<p><code>#### H4 tag</code></p>
<h5 id="heading-h5-tag">H5 Tag</h5>
<p><code>##### H5 tag</code></p>
<h6 id="heading-h6-tag">H6 tag</h6>
<p><code>###### H6 tag</code></p>
<h1 id="heading-how-to-add-typographical-emphasis-in-markdown">How to Add Typographical Emphasis in Markdown</h1>
<p>The ways you commonly add emphasis with text are bold, italics and strikethroughs. Combining too much emphasis can make words much less clear, so choose carefully how you want to emphasize each bit of text.</p>
<p>There are also subscript and superscript notation that you'll use to write the names of various chemical compounds, for example. You may also use them as part of mathematical notation.</p>
<p><strong>How to make text bold:</strong></p>
<p>Add double asterisks around your text. It'll make that text appear bold. Like this: <code>**Bold text**</code></p>
<p><em>How to make your text italic:</em></p>
<p>Add single asterisks around your text to make it appear in italics, like this: <code>*Italics*</code></p>
<p>How to <s>Strike through</s> certain text:</p>
<p>If you want to "cross something out" in text, use the strikethrough method, like this: <code>~~Strike through~~</code>.</p>
<h3 id="heading-how-to-write-subscripts-in-markdown">How to Write Subscripts in Markdown</h3>
<p>If you want to write the chemical symbol for water, for example, you can make a subscript "2" by typing <code>H~2~0</code>.</p>
<p>This results in: H<sub>2</sub>0.</p>
<h3 id="heading-how-to-write-superscripts-in-markdown">How to Write Superscripts in Markdown</h3>
<p>Say you want to write an exponent - or superscript. You do that like this: <code>X^2^</code> which results in this: X<sup>2</sup>.</p>
<h1 id="heading-how-to-make-lists-in-markdown">How to Make Lists in Markdown</h1>
<p>There are multiple types of lists in markdown. For example, you can have ordered lists and unordered lists.</p>
<p>Ordered lists are commonly used when you want to follow steps in a certain order (like following a recipe: cook the chicken...serve the dish). But unordered lists work well for things that don't require sequential steps like a recipe (a shopping list, for example).</p>
<h3 id="heading-how-to-make-an-unordered-list-in-markdown">How to Make an Unordered List in Markdown</h3>
<p>This is how the unordered list looks.</p>
<ul>
<li><p>Chili oil</p>
</li>
<li><p>Rice</p>
</li>
<li><p>Spring onions</p>
</li>
</ul>
<p>And this is how you create it in markdown:</p>
<pre><code class="lang-javascript">- Chili oil
- Rice
- Spring onions
</code></pre>
<h3 id="heading-how-to-make-an-ordered-list-in-markdown">How to Make an Ordered List in Markdown</h3>
<p>This is how the ordered list looks.</p>
<ol>
<li><p>First item</p>
</li>
<li><p>Second item</p>
</li>
</ol>
<p>And this is how you create it in markdown:</p>
<pre><code class="lang-javascript"><span class="hljs-number">1.</span> First item 
<span class="hljs-number">2.</span> Second item
</code></pre>
<h1 id="heading-how-to-create-links-in-markdown">How to Create Links in Markdown</h1>
<p>The two most common ways of linking things in markdown documents is either by hyperlinks or images. Both can help make your writing much clearer and more eloquent, and should be used where appropriate.</p>
<p>Here's what a hyperlink in text looks like:</p>
<p><a target="_blank" href="https://www.kealanparr.com">Kealan's site</a></p>
<p>And here's how you'd create that link in Markdown:</p>
<p><code>[Kealan's site](https://www.kealanparr.com)</code></p>
<p>You put the text you want to link in square brackets (here, "Kealan's site"), and then immediately follow them with parenthesis containing the URL.</p>
<p>Say you want to include an image in an article. To get it to appear like this:</p>
<p><img src="https://images.unsplash.com/photo-1660866838784-6c5158c0f979?ixlib=rb-1.2.1&amp;ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&amp;auto=format&amp;fit=crop&amp;w=387&amp;q=80" alt="View of natural rock landscape formations making a valley ending in a road crossing through with a blue sky." width="387" height="581" loading="lazy"></p>
<p>You simple use the following notation:</p>
<pre><code class="lang-javascript">![View <span class="hljs-keyword">of</span> natural rock landscape formations making a valley ending <span class="hljs-keyword">in</span> a road crossing through <span class="hljs-keyword">with</span> a blue sky.](https:<span class="hljs-comment">//images.unsplash.com/photo-1660866838784-6c5158c0f979?ixlib=rb-1.2.1&amp;ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&amp;auto=format&amp;fit=crop&amp;w=387&amp;q=80)</span>
</code></pre>
<p>It's similar to a regular link, but you include the exclamation point before the brackets.</p>
<h2 id="heading-how-to-use-html-in-markdown">How to Use HTML in Markdown</h2>
<p>You can use regular HTML in Markdown documents (depending on the parser that's being used).</p>
<p>So feel free to just input any valid HTML you like.</p>
<h2 id="heading-how-to-add-spacing-in-markdown">How to Add Spacing in Markdown</h2>
<p>If you want to add a horizontal line to divide up sections of a document, you can make one like this:</p>
<hr>
<p>By using three dashes like this:</p>
<pre><code class="lang-javascript">---
</code></pre>
<h2 id="heading-how-to-create-tables-in-markdown">How to Create Tables in Markdown</h2>
<p>Tables come in handy in your articles. To make a table that looks like this:</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Name</td><td>Age</td></tr>
</thead>
<tbody>
<tr>
<td>Kealan</td><td>25</td></tr>
<tr>
<td>Jake</td><td>28</td></tr>
</tbody>
</table>
</div><p>Here's the notation you'd use:</p>
<pre><code class="lang-javascript">| Name   | Age |
| ------ | --- |
| Kealan | <span class="hljs-number">25</span>  |
| Jake   | <span class="hljs-number">28</span>  |
</code></pre>
<p>The only real "gotcha" you have to be aware of when making a markdown table is that you keep the pipes (|) vertically in line. Then your markdown table will appear as above in this article. An image to make that clearer is:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/image-139.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>A markdown table is displayed, with Name and Age as the headers and Kealan, Jake and 25 &amp; 28 as the values.</em></p>
<h2 id="heading-how-to-add-code-and-syntax-in-markdown"><strong>How to Add Code and Syntax in Markdown</strong></h2>
<p>Adding code snippets to your markdown can be incredibly helpful if you are creating documentation for developers, for example.</p>
<p>The below is a very simple JavaScript example, but almost all modern programming languages are supported (with syntax highlighting and so on).</p>
<pre><code class="lang-javascript"><span class="hljs-built_in">console</span>.log(<span class="hljs-string">'example log'</span>)
</code></pre>
<pre><code class="lang-javascript"><span class="hljs-built_in">console</span>.log(<span class="hljs-string">'example log'</span>)
</code></pre>
<p>Just type the three backticks followed by the programming language and then enter to start writing your code. End the code block with three backticks.</p>
<h1 id="heading-how-to-add-quotes-in-markdown">How to Add Quotes in Markdown</h1>
<p>When you reference someone else's work, it is expected and courteous to credit them. One easy way you can do that is by quoting them.</p>
<p>If you want to add quotes in markdown:</p>
<blockquote>
<p>"This is a quote, from someone who is very wise" - Anonymous</p>
</blockquote>
<p>Just add this symbol, which renders it like the above quote:</p>
<p><code>&gt; "This is a quote, from someone who is very wise" - Anonymous</code></p>
<h1 id="heading-conclusion">Conclusion</h1>
<p>I hope this has been a useful reference for you, and that you've learned a new feature of markdown you hadn't seen before.</p>
<p>There are lots more features (not even counting all the HTML variations you could create), but this article has covered the most used features.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What is HTML – Definition and Meaning of Hypertext Markup Language ]]>
                </title>
                <description>
                    <![CDATA[ HTML, or Hypertext Markup Language, is a markup language for the web that defines the structure of web pages.  It is one of the most basic building blocks of every website, so it's crucial to learn if you want to have a career in web development.  In... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-is-html-definition-and-meaning/</link>
                <guid isPermaLink="false">66adf270febac312b73075dc</guid>
                
                    <category>
                        <![CDATA[ HTML ]]>
                    </category>
                
                    <category>
                        <![CDATA[ HTML5 ]]>
                    </category>
                
                    <category>
                        <![CDATA[ markup ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Kolade Chris ]]>
                </dc:creator>
                <pubDate>Tue, 24 Aug 2021 16:38:12 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/08/html.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>HTML, or Hypertext Markup Language, is a markup language for the web that defines the structure of web pages. </p>
<p>It is one of the most basic building blocks of every website, so it's crucial to learn if you want to have a career in web development. </p>
<p>In this article, I will walk you through what HTML is about in detail, how it does things on web pages, and we'll also touch on a really cool part of HTML – Semantic HTML.</p>
<h2 id="heading-what-is-html">What is HTML?</h2>
<p>To understand "HTML" from front to back, let's look at each word that makes up the abbreviation: </p>
<p><strong>Hypertext</strong>: text (often with embeds such as images, too) that is organized in order to connect related items</p>
<p><strong>Markup</strong>: a style guide for typesetting anything to be printed in hardcopy or soft copy format</p>
<p><strong>Language</strong>: a language that a computer system understands and uses to interpret commands.</p>
<p>HTML determines the structure of web pages. This structure alone is not enough to make a web page look good and interactive. So you'll use assisted technologies such as CSS and JavaScript to make your HTML beautiful and add interactivity, respectively. </p>
<p>In this case, I like to break down the three technologies – HTML, CSS, and JavaScript – this way: they are like a human body. </p>
<ul>
<li>HTML is the skeleton, </li>
<li>CSS is the skin, </li>
<li>and JavaScript is the circulatory, digestive, and respiratory systems that brings the structure and the skin to life.</li>
</ul>
<p>You can also look at HTML, CSS, and JavaScript this way: HTML is the structure of a house, CSS is the interior and exterior decor, and JavaScript is the electricity, water system, and many other functional features that make the house livable.</p>
<h2 id="heading-html-tags">HTML Tags</h2>
<p>Since HTML defines the markup for a particular web page, you'll want the text, images, or other embeds to appear in certain ways. </p>
<p>For example, you might want some text to be big, other text to be small, and some to be bold, italic, or in bullet point form. </p>
<p>HTML has "tags" that let you get this done. So, there are tags to create headings, paragraphs, bolded words, italicized words, and more.</p>
<p>The image below describes the anatomy of an HTML tag:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/anatomy-of-an-html-tag.png" alt="anatomy-of-an-html-tag" width="600" height="400" loading="lazy"></p>
<h2 id="heading-html-elements">HTML Elements</h2>
<p>An element consists of the opening tag, a character, the content, and a closing tag. Some elements are empty – that is, they don't have a closing tag but instead have a source or link to content that you want to embed on the web page. </p>
<p>An example of an empty element is <code>&lt;img&gt;</code>, which you use to embed images on a web page.</p>
<p>HTML elements are often used interchangeably with tags, but there's a small difference between the two. An element is a combination of the opening and closing tag, and then the content between them.</p>
<p>I made another image to help you visualize the anatomy of an HTML element:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/anatomy-of-an-html-element.png" alt="anatomy-of-an-html-element" width="600" height="400" loading="lazy"></p>
<h2 id="heading-html-attributes">HTML Attributes</h2>
<p>HTML tags also take what are called attributes. These attributes are placed in the opening tag and range from style and ids to classes. They take values, which convey more information about the element and help you do things such as styling and manipulation with JavaScript.</p>
<p>In the infographic below, the opening tag contains a <code>class</code> attribute with a value of <code>“text”</code>. This can be used to style the element or select it with JavaScript for interactivity.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/attribute-1.png" alt="attribute-1" width="600" height="400" loading="lazy"></p>
<p>Here's the anatomy of a basic HTML page:</p>
<pre><code class="lang-html"><span class="hljs-meta">&lt;!DOCTYPE <span class="hljs-meta-keyword">html</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">html</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"UTF-8"</span> /&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">http-equiv</span>=<span class="hljs-string">"X-UA-Compatible"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"IE=edge"</span> /&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"viewport"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"width=device-width, initial-scale=1.0"</span> /&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>Definition of HTML<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
    <span class="hljs-comment">&lt;!--Page content such as text and images goes in here--&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span>
</code></pre>
<p>Let's look at the important bits of code here:</p>
<p><code>&lt;!Doctype html&gt;</code>: Specifies that we're using HTML5 in this code. Before the introduction of HTML5, you had to explicitly state which version of HTML you were coding in with the <code>&lt;!Doctype&gt;</code> tag. For example, HTML4.0, 3.2, and so on. But now we no longer need it. When “html” is written in the code, the browser automatically assumes that you are coding in HTML5.</p>
<p><code>&lt;html&gt;&lt;/html&gt;</code>: the root, or top-level element of every HTML document. Every other element must be wrapped in it.</p>
<p><code>&lt;head&gt;&lt;/head&gt;</code>: one of the most crucial parts of the HTML document. Web crawlers look inside the head tags to get important information about the page. It contains info such as the page title, stylesheets, meta information for SEO, and lots more.</p>
<p><code>&lt;meta /&gt;</code>: this is an empty element that conveys meta-information about the page. Such information may include the author, what type of encoding it's using (almost always UTF-8), responsiveness, compatibility, and a lot more. Web crawlers always look at the meta tag to get information about the web page, which will play a crucial role in SEO.</p>
<p><code>&lt;title&gt;&lt;/title&gt;</code>: this defines the title of the web page. It is always shown in the browser tab.</p>
<p><code>&lt;body&gt;&lt;/body&gt;</code>: all the content of the HTML document is located inside the body tag. There can only be one <code>&lt;body&gt;</code> tag on the whole page.</p>
<h2 id="heading-what-is-semantic-html">What is Semantic HTML?</h2>
<p>Semantic HTML means that your HTML tags convey the actual meaning of what they are used for. </p>
<p>Semantics has been an integral part of HTML since its inception in the early 90s. But it never gained particular relevance until the late 90s when CSS started working in most browsers. </p>
<p>With semantic HTML, semantically-neutral tags such as <code>&lt;div&gt;</code> and <code>&lt;span&gt;</code> are frowned upon since semantically more descriptive tags such as <code>&lt;header&gt;</code>, <code>&lt;nav&gt;</code>, <code>&lt;main&gt;</code>, <code>&lt;section&gt;</code>, <code>&lt;footer&gt;</code> and <code>&lt;article&gt;</code> can do the same thing they do.</p>
<p>A noticeable advantage of using semantic tags is that web crawlers are able to index the web page or website easily, improving SEO in return. </p>
<p>In addition, a website that uses semantics becomes more informative, adaptable, and accessible to those who use screen readers to access websites. </p>
<h3 id="heading-important-semantic-tags-and-what-they-do">Important Semantic Tags and What they Do</h3>
<p>Let's look at some of the most commonly used semantic HTML tags:</p>
<p><code>&lt;header&gt;</code>: The <code>&lt;header&gt;</code> element defines the introductory section of a web page. It contains items such as the logo, navigation, theme switcher, and search bar.</p>
<p><code>&lt;nav&gt;</code>: The <code>&lt;nav&gt;</code> element specifies the navigation items of the page such as home, contact, about, FAQs, and so on.</p>
<p><code>&lt;main&gt;</code>: The <code>&lt;main&gt;</code> element is conventionally treated as the immediate descendant of the  tag. It contains the main sections of the HTML document apart from <code>&lt;header&gt;</code> and <code>&lt;footer&gt;</code>. Ideally, there should be just one of these in the whole HTML document.</p>
<p><code>&lt;section&gt;</code>: The <code>&lt;section&gt;</code> element defines a particular section of the web page. This may be the showcase section, about section, contact section, or others. You can use numerous sections in a single HTML document.</p>
<p><code>&lt;article&gt;</code>: The <code>&lt;article&gt;</code> element represents a certain part of a web page that conveys some particular information. Such information could be a combination of text, images, videos, and embeds. Look at this element as a standalone blog post on a page containing excerpts about other blog posts.</p>
<p><code>&lt;aside&gt;</code>: As the name implies, this represents a sidebar on a web page. It is usually a part of the web page that is not directly related to the main content.</p>
<p><code>&lt;footer&gt;</code>: The <code>&lt;footer&gt;</code> element accommodates items such as quick links, copyright information, or any other data related to the entire website or web page.</p>
<p>Note that since semantic elements convey actual meaning and what some particular content actually does (such as <code>nav</code> for navigation, <code>aside</code> for a sidebar, and so on), these elements are not automatically positioned where they are supposed to be. You still have to do that with CSS. </p>
<p>A super simple semantic HTML document looks like this:</p>
<pre><code class="lang-html"><span class="hljs-meta">&lt;!DOCTYPE <span class="hljs-meta-keyword">html</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">html</span> <span class="hljs-attr">lang</span>=<span class="hljs-string">"en"</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"UTF-8"</span> /&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">http-equiv</span>=<span class="hljs-string">"X-UA-Compatible"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"IE=edge"</span> /&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"viewport"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"width=device-width, initial-scale=1.0"</span> /&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>Definition of HTML<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>

  <span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">header</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">h1</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"logo"</span>&gt;</span>LOGO<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">nav</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">ul</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>Home<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>About<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>Contact<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">li</span>&gt;</span>FAQs<span class="hljs-tag">&lt;/<span class="hljs-name">li</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">ul</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">nav</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">header</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">main</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">section</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"about-me"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">article</span>&gt;</span>
          Lorem ipsum dolor, sit amet consectetur adipisicing elit. Optio magni
          est asperiores nemo, adipisci minus itaque quam, rem libero aliquam
          nesciunt, nisi inventore assumenda earum repellat labore ratione
          architecto eos quis. Soluta mollitia cupiditate dolorem. Consequatur a
          soluta laudantium nihil. Molestias, officiis ut! Nobis adipisci
          voluptatem quam at officia beatae!
        <span class="hljs-tag">&lt;/<span class="hljs-name">article</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">section</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">section</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"contact-me"</span>&gt;</span>
        You can find me on
        <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://twitter.com/koladechris"</span>&gt;</span>Twitter<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span> You can find me on
        <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://Instagram.com/koladechris"</span>&gt;</span>Instagram<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">section</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">aside</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"address"</span>&gt;</span>My Address<span class="hljs-tag">&lt;/<span class="hljs-name">aside</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">main</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">footer</span>&gt;</span>© 2020 All Rights Reserved<span class="hljs-tag">&lt;/<span class="hljs-name">footer</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span>
</code></pre>
<p>Here's what it looks like in the browser:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/semanticHTML-4.png" alt="semanticHTML-4" width="600" height="400" loading="lazy"></p>
<p>You can see that the content inside the <code>&lt;aside&gt;</code> tag isn't in the sidebar and the content inside the <code>&lt;nav&gt;</code> tag is not automatically available as the navigation bar. This is why you still have to make them look the way they are supposed to look with CSS.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>I hope this article has helped you learn the basics of HTML and what it does. Now you can start to learn more advanced technologies such as CSS and JavaScript, and then start forming a solid career in web development. </p>
<p>Thanks a lot for reading and have a nice time.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ An Introduction to Extensible Markup Language (XML) ]]>
                </title>
                <description>
                    <![CDATA[ XML stands for eXtensible Markup Language. It is extensible, because unlike HTML, it does not use a predefined set of tags for identifying structural components. Instead, it provides a mechanism for users to define tags themselves.  XML was designed ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/an-introduction-to-extensible-markup-language-xml/</link>
                <guid isPermaLink="false">66c3442193db2451bd441404</guid>
                
                    <category>
                        <![CDATA[ markup ]]>
                    </category>
                
                    <category>
                        <![CDATA[ toothbrush ]]>
                    </category>
                
                    <category>
                        <![CDATA[ xml ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Sat, 01 Feb 2020 00:00:00 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9d1f740569d1a4ca3600.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>XML stands for eXtensible Markup Language. It is extensible, because unlike HTML, it does not use a predefined set of tags for identifying structural components. Instead, it provides a mechanism for users to define tags themselves. </p>
<p>XML was designed to simplify data sharing and data transport, and focuses on structuring that information in a logical way.</p>
<h2 id="heading-syntax-of-xml"><strong>Syntax of XML</strong></h2>
<p>The syntax for XML is very straight forward and quite easy to learn. </p>
<p>XML documents must contain one root element that is the parent of all other elements:</p>
<pre><code class="lang-text">&lt;root&gt;
  &lt;child&gt;
    &lt;subchild&gt;.....&lt;/subchild&gt;
  &lt;/child&gt;
&lt;/root&gt;
</code></pre>
<p>Above syntax shows the root element which is necessary while creating an XML code.</p>
<p>But the root element can be called anything. For example:</p>
<pre><code class="lang-text">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;note&gt;
  &lt;to&gt;Tove&lt;/to&gt;
  &lt;from&gt;Jani&lt;/from&gt;
  &lt;heading&gt;Reminder&lt;/heading&gt;
  &lt;body&gt;Don't forget me this weekend!&lt;/body&gt;
&lt;/note&gt;
</code></pre>
<p>In the code above <code>&lt;note&gt;</code> is the root element.</p>
<p>Advantages of using XML:</p>
<ul>
<li>Simplicity - XML documents are ordinary text files that can be created and edited with any text editor.</li>
<li>Vendor independence</li>
<li>Platform independence</li>
<li>Extensive infrastructure</li>
</ul>
<p>Disadvantages of using XML:</p>
<ul>
<li>Verbose and cumbersome syntax</li>
<li>Highly inefficient storage</li>
</ul>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ We need a new document markup language — here is why ]]>
                </title>
                <description>
                    <![CDATA[ By Christian Neumanns Introduction: What’s the Problem? There are many document markup languages available already. Wikipedia lists over 70 variations in its List of document markup languages — among them HTML, Markdown, Docbook, Asciidoctor, reStruc... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/we-need-a-new-document-markup-language-c22e0ec44e15/</link>
                <guid isPermaLink="false">66c364d68e244e1678738616</guid>
                
                    <category>
                        <![CDATA[ documentation ]]>
                    </category>
                
                    <category>
                        <![CDATA[ markup ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ UX ]]>
                    </category>
                
                    <category>
                        <![CDATA[ writing ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 16 Apr 2019 16:39:47 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*ge4Z5bQFJwk5AUA8DjHgNQ.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Christian Neumanns</p>
<h3 id="heading-introduction-whats-the-problem">Introduction: What’s the Problem?</h3>
<p>There are many document markup languages available already. Wikipedia lists over 70 variations in its <a target="_blank" href="https://en.wikipedia.org/wiki/List_of_document_markup_languages">List of document markup languages</a> — among them HTML, Markdown, Docbook, Asciidoctor, reStructuredText, etc.</p>
<p>Why, then, does the title of this article suggest we need <em>yet another one</em>???</p>
<p>What’s the problem?</p>
<p>There are two fundamental problems with the existing document markup languages: Either they are not easy to use, or they are not well suited to write complex documents, such as technical articles, user manuals, or books. An example of “not easy to use, but suited for complex documents” would be Docbook. An example of “easy to use, but not suited for complex documents” would be Markdown.</p>
<p>Of course, the above categorization is simplistic. But it should serve as a good starting point to get the gist of this article which aims to delineate the kind of problems that occur in practice. You’ll see many representative examples of markup code that illustrates what’s wrong, complemented by links to more information.</p>
<p>You’ll also discover a <em>new</em> markup language. Lots of examples will demonstrate how a new syntax can lead to a language that is “easy to use and suited for complex documents”. A <em>proof-of-concept</em> implementation is already available. More on this later.</p>
<h3 id="heading-preliminary-remarks">Preliminary Remarks</h3>
<p>Please note:</p>
<ul>
<li>This article is about document markup languages used to write <em>text documents</em>, such as books and articles published on the net. There are other markup languages used to describe specific data, such as mathematical formulas, images, and geographic information, but these are out of scope of this article. However, some ideas presented in this article might be applied to other kinds of markup languages as well.</li>
<li>This article focuses solely on the <em>syntax</em> of markup languages. We will not discuss other aspects that are also important in the choice of a suitable markup language, such as: support on your OS, ease of installation and dependencies, the tool chain available to create final documents, the quality of documentation, price, customer/user support, etc.</li>
<li>Readers of this article should have some basic experience with a markup language like HTML, Markdown, Asciidoctor, or similar.</li>
<li>Readers not aware of the <em>many</em> advantages of document markup languages might first want to read:<br><a target="_blank" href="https://medium.freecodecamp.org/the-advantages-of-document-markup-languages-vs-wysiwyg-editors-829dc8362219">Advantages of Document Markup Languages vs WYSIWYG Editors</a> (Word Processors)</li>
</ul>
<h3 id="heading-inconveniences-part-1">Inconveniences / Part 1</h3>
<p>Let us first consider some well-known markup languages and have a look at some inconveniences.</p>
<h4 id="heading-html">HTML</h4>
<p>HTML is the language of the web. So, why not write everything in HTML? The reasons to discard this option are well known. Let’s quickly recapitulate them.</p>
<p>HTML is cumbersome to write. Nobody wants to write XML code by hand, although editors with HTML/XML support might help.</p>
<p>Some frequent writing tasks require non-trivial HTML code.</p>
<p>Suppose we want to display a horizontally centered image with a simple black border and a link. The HTML code an inexperienced user would expect to work could look like this:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"ball.png"</span> <span class="hljs-attr">align</span>=<span class="hljs-string">"center"</span> <span class="hljs-attr">border</span>=<span class="hljs-string">"yes"</span> <span class="hljs-attr">link</span>=<span class="hljs-string">"http://www.example.com/ball"</span>&gt;</span>
</code></pre>
<p>But the code he or she actually has to write is cumbersome and there are different ways to do it. Here is one way:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"text-align: center"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"http://www.example.com/ball"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"ball.png"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"border:1px solid black;"</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
</code></pre>
<p>HTML lacks “productivity features for writers”, such as:</p>
<ul>
<li>Automatic generation of a table of contents, index, glossary, etc.</li>
<li>Variables used to hold recurring values</li>
<li>Splitting a document into different files</li>
</ul>
<p>Other inconveniences will be shown later.</p>
<h4 id="heading-markdown">Markdown</h4>
<p><a target="_blank" href="https://en.wikipedia.org/wiki/Markdown">Markdown</a> is a very popular, lightweight markup language. It is easy to learn and use, and well suited for short and simple texts, such as comments in forums, readme files, etc.</p>
<p>However, it suffers from the following problems that make it unsuitable for complex or big documents (e.g. technical articles, user manuals, and books):</p>
<ul>
<li>The original Markdown defined by John Gruber lacks many features expected by writers, such as tables (only embedded HTML tables are supported), automatic generation of table of contents, syntax highlighting, file splitting, etc.</li>
<li>There is no unique, unambiguous specification for Markdown. Many flavors of Markdown exist, with different rules and different features supported. This leads to incompatibility issues when markup code is shared. <a target="_blank" href="https://commonmark.org/">CommonMark</a> is an attempt to solve this problem. However, the specification is huge and not completed yet (at the time of writing, April 2019, version 0.28, dated 2017–08–01, is the latest one).</li>
<li>Markdown has similar problems and limitations to those shown later in chapter “Inconveniences / Part 2”. These flaws can quickly become an annoyance when you use Markdown for anything else than short, simple texts.</li>
</ul>
<p>Here is a list of articles with more information about Markdown’s shortcomings:</p>
<ul>
<li><a target="_blank" href="http://www.ericholscher.com/blog/2016/mar/15/dont-use-markdown-for-technical-docs/">Why You Shouldn’t Use “Markdown” for Documentation</a></li>
<li><a target="_blank" href="https://www.red-gate.com/simple-talk/blogs/sundown-on-markdown/">Sundown on Markdown?</a></li>
<li><a target="_blank" href="http://www.wilfred.me.uk/blog/2012/07/30/why-markdown-is-not-my-favourite-language/">Why Markdown Is Not My Favourite Language</a></li>
</ul>
<h4 id="heading-docbook">Docbook</h4>
<p><a target="_blank" href="https://docbook.org/">Docbook</a> is an XML-based markup language that uses semantic tags to describe documents.</p>
<p>It has probably the most complete set of features among all markup languages. It has been used by many authors, is pre-installed on some Linux distributions, and is supported by many organizations and publishers. Docbook has been successfully used to create, publish, and print lots of big documents of all kinds.</p>
<p>But it has the following drawbacks:</p>
<p>It uses XML and a verbose syntax. Look at the following example, borrowed from <a target="_blank" href="https://en.wikipedia.org/wiki/DocBook">Wikipedia</a>:</p>
<pre><code class="lang-xml"><span class="hljs-meta">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">book</span> <span class="hljs-attr">xml:id</span>=<span class="hljs-string">"simple_book"</span> <span class="hljs-attr">xmlns</span>=<span class="hljs-string">"http://docbook.org/ns/docbook"</span> <span class="hljs-attr">version</span>=<span class="hljs-string">"5.0"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>Very simple book<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">chapter</span> <span class="hljs-attr">xml:id</span>=<span class="hljs-string">"chapter_1"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>Chapter 1<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">para</span>&gt;</span>Hello world!<span class="hljs-tag">&lt;/<span class="hljs-name">para</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">para</span>&gt;</span>I hope that your day is proceeding <span class="hljs-tag">&lt;<span class="hljs-name">emphasis</span>&gt;</span>splendidly<span class="hljs-tag">&lt;/<span class="hljs-name">emphasis</span>&gt;</span>!<span class="hljs-tag">&lt;/<span class="hljs-name">para</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">chapter</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">chapter</span> <span class="hljs-attr">xml:id</span>=<span class="hljs-string">"chapter_2"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>Chapter 2<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">para</span>&gt;</span>Hello again, world!<span class="hljs-tag">&lt;/<span class="hljs-name">para</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">chapter</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">book</span>&gt;</span>
</code></pre>
<p>Would you enjoy writing and maintaining such code?</p>
<p>Now compare the above code with the following one, written in a modern markup language like Asciidoctor:</p>
<pre><code>= Very simple book

== Chapter <span class="hljs-number">1</span>

Hello world!

I hope that your day is proceeding _splendidly_!

== Chapter <span class="hljs-number">2</span>

Hello again, world!
</code></pre><p>Docbook is also complex, and therefore hard to learn and use.</p>
<p>Output produced by Docbook, especially HTML, looks old-fashioned (see examples on its website). Of course, presentation can be customized, but this is not an easy task.</p>
<h4 id="heading-latex">LaTeX</h4>
<p><a target="_blank" href="https://en.wikipedia.org/wiki/LaTeX">LaTeX</a> is a high-quality typesetting system. It is widely used in academia to create scientific documents. It is considered to be the best option for writing PDF documents containing lots of mathematic formulas and equations.</p>
<p>I never used LaTeX myself, because I don’t write scientific documents — just articles and books to be published on the web. Therefore, I don’t want to comment on it too much. However, it is important to mention it because of its popularity in academia.</p>
<p>LaTeX’s unique syntax seems verbose to me, and a bit complex. Here is an abbreviated example from <a target="_blank" href="https://en.wikipedia.org/wiki/LaTeX#Example">Wikipedia</a>:</p>
<pre><code class="lang-latex">\documentclass{article}
\usepackage{amsmath}
\title{\LaTeX}

\begin{document}
    \maketitle
    \LaTeX{} is a document preparation system ...

    % This is a comment
    \begin{align}
        E_0 &amp;= mc^2 \\
        E &amp;= \frac{mc^2}{\sqrt{1-\frac{v^2}{c^2}}}
    \end{align}  
\end{document}
</code></pre>
<p>The article <a target="_blank" href="https://texfaq.org/FAQ-LaTeX2HTML">Conversion from (La)TeX to HTML</a> states that converting LaTeX math to HTML is “a challenge”.</p>
<p>Some markup languages allow LaTeX snippets to be embedded in their markup code, which can be very useful if you need the power of LaTeX for maths. There are other options to display maths on the web, such as <a target="_blank" href="https://www.mathjax.org/">Mathjax</a> or <a target="_blank" href="https://en.wikipedia.org/wiki/MathML">MathML</a> (an ISO standard and part of HTML5).</p>
<h3 id="heading-popular-for-big-documents">Popular for Big Documents</h3>
<p>A impressive number of markup languages have emerged. Many of them use a syntax similar to Markup, and are therefore easy to learn and use. Some have more features than Markdown and are even extensible. However, as soon as we start writing complex documents, corner-cases and limits diminish the initial joy of using them.</p>
<p>Two popular markup languages used for big documents are Asciidoctor (an improved version of <a target="_blank" href="https://en.wikipedia.org/wiki/AsciiDoc">Asciidoc</a>), and <a target="_blank" href="https://en.wikipedia.org/wiki/ReStructuredText">reStructuredText</a> (an improved version of StructuredText). We will have a look at them soon.</p>
<h3 id="heading-practical-markup-language-pml">Practical Markup Language (PML)</h3>
<p>Before moving on to the most interesting part of this article, let me briefly introduce the new markup language I mentioned already in the introduction.</p>
<p>The language is called <strong><em>Practical</em></strong> <em>Markup Language (PML)</em>.</p>
<blockquote>
<p>“fitting the needs of a particular situation in a helpful way; helping to solve a problem or difficulty; effective or suitable”</p>
<p><em>— definition of ‘practical’ in the Cambridge Dictionary</em></p>
</blockquote>
<p>I started the <a target="_blank" href="http://www.practical-programming.org/pml/index.html">PML project</a> a few months ago because I couldn’t find a markup language that was easy to use <em>and</em> well suited for big, complex documents, such as a user manual.</p>
<p>In the next section we’ll look at examples of markup code written in PML, compared to code written in other languages. So let’s first mention two basic PML syntax rules needed to understand the upcoming examples.</p>
<p>A PML document is a tree of nodes (similar to an XML/XHTML document). Each node starts with a <code>{</code>, followed by a tag name. Each node ends with a <code>}</code>. A node can contain text or child nodes.</p>
<p>For example, here is a node containing text that will be rendered in italics:</p>
<pre><code>{i bright}
</code></pre><p>This node starts with <code>{i</code> , and ends with <code>}</code>. <code>i</code> is the tag name. In this case <code>i</code> is an abbreviation for <code>italic</code>, which means that the node's content will be rendered in <em>italics</em>. The content of this node is the text <code>bright</code>. The above PML markup code will be rendered as:<br> <em>bright</em></p>
<p>Some nodes have attributes, used to specify additional properties of the node (besides its tag name).</p>
<p>For example, the title of a chapter is defined with attribute <code>title</code>, as follows:</p>
<pre><code>{chapter title=A Nice Surprise
    Once upon a time ...
}
</code></pre><p>There is not much more to say about the basic concept of PML syntax. For more insight, and a description of features not used in this article, please consult the <a target="_blank" href="http://www.practical-programming.org/pml/docs/User_Manual/PML_User_Manual.html">PML User Manual</a>.</p>
<p>You can download and play around with a free implementation of PML. But please note: PML is a <em>work in progress</em>. There are missing features, you might encounter bugs, and backwards compatibility is currently not guaranteed.</p>
<p>I use PML myself to write all my web documents, such as this article. For links to more real-life examples please visit the <a target="_blank" href="http://www.practical-programming.org/pml/about/faq.html#examples">FAQ</a>.</p>
<h3 id="heading-inconveniences-part-2">Inconveniences / Part 2</h3>
<p>I this section we’ll look at examples that reveal <em>some</em> problems encountered with markup languages. This is by no means an exhaustive enumeration of all troubles and corner cases. The aim is to just show a few examples that demonstrate the kind of inconveniences and limits encountered in the real world.</p>
<p>For each example the markup code will be shown in <a target="_blank" href="https://www.w3.org/TR/html/">HTML</a>, <a target="_blank" href="https://asciidoctor.org/">Asciidoctor</a>, <a target="_blank" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a>, and <a target="_blank" href="http://www.practical-programming.org/pml/">PML</a>.</p>
<p>If you want to try out some code, you can use the following online testers (no need to install anything on your PC):</p>
<ul>
<li><a target="_blank" href="https://www.w3schools.com/tryit/">HTML</a></li>
<li><a target="_blank" href="https://asciidoclive.com">Asciidoctor</a></li>
<li><a target="_blank" href="http://rst.ninjs.org">reStructuredText</a></li>
</ul>
<p>An online tester for PML is not yet available. You have to install PML on a Windows PC if you want to try it out.</p>
<h3 id="heading-font-styles">Font Styles</h3>
<p>Font styles (<em>italic</em>, <strong>bold</strong>, <code>monospace</code>, etc.) are often used in all kinds of documents, so good support is essential.</p>
<p>But as we will see, surprises and limits can emerge, as soon as we have to deal with non-trivial cases. Let’s look at <em>some</em> examples to illustrate this.</p>
<h3 id="heading-part-of-a-sentence-in-italics">Part of a Sentence in Italics</h3>
<p>Suppose we want to write:<br> They called it <em>Harmonic States</em>, a good name.</p>
<p>This is a trivial case, and all languages support it.</p>
<p><strong>HTML</strong>:</p>
<pre><code>They called it &lt;i&gt;Harmonic States&lt;/i&gt;, a good name.
</code></pre><p><strong>Asciidoctor</strong>:</p>
<pre><code>They called it _Harmonic States_, a good name.
</code></pre><p><strong>reStructuredText</strong>:</p>
<pre><code>They called it *Harmonic States*, a good name.
</code></pre><p><strong>PML</strong>:</p>
<pre><code>They called it {i Harmonic States}, a good name.
</code></pre><h3 id="heading-part-of-a-word-in-italics">Part of a Word in Italics</h3>
<p>We want to write:<br> She _un_wrapped the challenge first.</p>
<p><strong>HTML</strong>:</p>
<pre><code>She &lt;i&gt;un&lt;/i&gt;wrapped the challenge first.
</code></pre><p><strong>Asciidoctor</strong>:</p>
<pre><code>She __un__wrapped the challenge first.
</code></pre><p>Note that we have to use two underscores. Using a single underscore (as in the first example), would result in:<br> She _un_wrapped the challenge first.</p>
<p><strong>reStructuredText</strong>:</p>
<pre><code>She *un*\wrapped the challenge first.
</code></pre><p>Note that the letter w has to be escaped (preceded by a backslash) for reasons explained <a target="_blank" href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#character-level-inline-markup">here</a>. If the letter is not escaped then a warning is displayed and the result is:<br> She <em>un</em>wrapped the challenge first.</p>
<p><strong>PML</strong>:</p>
<pre><code>She {i un}wrapped the challenge first.
</code></pre><h3 id="heading-text-in-bold-and-italic">Text in Bold And Italic</h3>
<p>We want to write:<br> They were all <strong><em>totally flabbergasted</em></strong>.</p>
<p><strong>HTML</strong>:</p>
<pre><code>They were all &lt;b&gt;<span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">i</span>&gt;</span>totally flabbergasted<span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span></span>&lt;/b&gt;.
</code></pre><p><strong>Asciidoctor</strong>:</p>
<pre><code>They were all *_totally flabbergasted_*.
</code></pre><p><strong>reStructuredText:</strong></p>
<p>Combining bold and italic is not supported in reStructuredText, but there are some <a target="_blank" href="https://stackoverflow.com/questions/11984652/bold-italic-in-restructuredtext">complicated workarounds</a>.</p>
<p><strong>PML:</strong></p>
<pre><code>They were all {b {i totally flabbergasted}}.
</code></pre><h3 id="heading-real-life-example">Real-Life Example</h3>
<p>Here is an example inspired by an Asciidoctor user who <a target="_blank" href="https://github.com/asciidoctor/asciidoctor/issues/2020">asked</a> how to display:<br> <strong>_id</strong> <em>optional</em>.</p>
<p>Let’s make the exercise a little bit more interesting by also displaying:<br> _<em>id</em> <strong>optional</strong>.</p>
<p><strong>HTML</strong>:</p>
<pre><code>&lt;b&gt;_id&lt;<span class="hljs-regexp">/b&gt; &lt;i&gt;optional&lt;/i</span>&gt;
<span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">i</span>&gt;</span>_id<span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span></span> <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">b</span>&gt;</span>optional<span class="hljs-tag">&lt;/<span class="hljs-name">b</span>&gt;</span></span>
</code></pre><p>No surprise here. It just works as expected.</p>
<p><strong>Asciidoctor:</strong></p>
<p>Intuitive attempt:</p>
<pre><code>*_id* _optional_
__id_ *optional*
</code></pre><p>The first line doesn’t work, it produces:<br> <strong><em>id</em></strong> _<em>optional</em></p>
<p>However, the second line works, which is a bit counterintuitive.</p>
<p>If normal text includes a character that is also used for markup (in our case the <code>_</code> preceding <code>id</code>), then the character must be escaped. This is a fundamental rule in pretty much all markup languages. For example in HTML a <code>&amp;</code>lt; must be escaped wi<code>th &amp;</code>lt;. Many languages (including Asciidoctor and PML) use a backslash prefix (e.<code>g.</code> \r) to escape. So let's rewrite the code:</p>
<pre><code>*\_id* _optional_
_\_id_ *optional*
</code></pre><p>This doesn’t work in Asciidoctor. It produces<br> <strong>_id</strong> <em>optional</em><br>and<br>_id <strong>optional</strong></p>
<p>Here is a correct version, as suggested in an answer to the user’s question:</p>
<pre><code>*pass:[_]id* _optional_
<span class="hljs-attr">_pass</span>:[_]id_ *optional*
</code></pre><p>Another answer suggests this solution:</p>
<pre><code>*_id* __optional__
___id__ *optional*
</code></pre><p>More edge case are documented in chapters <a target="_blank" href="https://asciidoctor.org/docs/user-manual/#unconstrained-formatting-edge-cases">Unconstrained formatting edge cases</a> and <a target="_blank" href="https://asciidoctor.org/docs/user-manual/#escaping-unconstrained-quotes">Escaping unconstrained quotes</a> of the Asciidoctor User Manual.</p>
<p><strong>reStructuredText:</strong></p>
<pre><code>**_id** *optional*
*_id* **optional**
</code></pre><p>There is no problem here, because the character <code>_</code> is not used in reStructuredText to define markup.</p>
<p>However, suppose we wanted to write:<br> <em><em>id</em></em> <strong><em>optional</em></strong>.</p>
<p>Here is the code:</p>
<pre><code>*\*id\** ***optional***
</code></pre><p>Note that the <code>*</code>s in <code>id</code> must be escaped, but the <code>*</code>s in <code>optional</code> don't need to be escaped.</p>
<p><strong>PML:</strong></p>
<pre><code>{b _id} {i optional}
{i _id} {b optional}
</code></pre><h3 id="heading-nested-font-styles">Nested Font Styles</h3>
<p>Nested font styles of the same kind (e.g. <code>&lt;i&gt;...&lt;i&gt;..</code>....) occur rarely in text written by humans, but they could be more or less frequent in auto-generated markup code. If they are not supported then the tool that generates the markup code becomes more complicated to implement, because it must track the font styles that are active already, in order to avoid nesting them.</p>
<p>So, how is this supported in the different languages?</p>
<p><strong>HTML:</strong></p>
<pre><code>&lt;i&gt;This is &lt;i&gt;excellent&lt;<span class="hljs-regexp">/i&amp;gt;, isn't it?&lt;/i</span>&gt;
</code></pre><p>No problem, it produces<br><em>This is excellent, isn’t it?</em></p>
<p><strong>Asciidoctor:</strong></p>
<pre><code>_This is _excellent_, isn<span class="hljs-string">'t it?_</span>
</code></pre><p>The above code is obviously ambiguous: Are the italics nested or do we want to italicize “This is “ and “, isn’t it?”. When I tested it, the result was neither of it:<br>_This is <em>excellent</em>, isn’t it?_</p>
<p>As far as I now, Asciidoctor doesn’t support nested font styles of the same kind.</p>
<p><strong>reStructuredText:</strong></p>
<p>The reStructuredText specification <a target="_blank" href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup">states</a>: “Inline markup cannot be nested.” However, no error is displayed if it <em>is</em> nested, and the result is unspecified.</p>
<p><strong>PML:</strong></p>
<pre><code>{i This is {i excellent}, isn<span class="hljs-string">'t it?}</span>
</code></pre><p>Font styles of the same kind can be nested in PML. The above code results in:<br><em>This is excellent, isn’t it?</em></p>
<h3 id="heading-nested-chapters">Nested Chapters</h3>
<p>Suppose we are writing an article titled “New Awesome Product” that contains four chapters. The structure looks as follows:</p>
<pre><code>New Awesome Product
    Introduction
    More features
    Faster
    Less resources
</code></pre><p>Later on we decide to insert chapter “Advantages” as a parent of the three last chapters. The structure now becomes:</p>
<pre><code>New Awesome Product
    Introduction
    Advantages
        More features
        Faster
        Less resources
</code></pre><p>What are the <em>changes</em> required in the markup code to pass from version 1 to version 2? Can we simply insert the code for a new chapter? Let’s see.</p>
<p><strong>HTML:</strong></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/PoEYqgtazrmE2KEXHHEdSVyBd1XCISQurRxT" alt="Image" width="594" height="253" loading="lazy"></p>
<p>Note: Code <em>changes</em> are displayed in bold.</p>
<p>As shown above, besides inserting the new chapter, we have to change the markup for the three child chapters: <code>h2</code> must be changed to <code>h3</code>.</p>
<p><strong>Asciidoctor:</strong></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/h6RYuEiJ5YHGqr6yjJ7UKEivRxOfhNKbc9Fs" alt="Image" width="474" height="388" loading="lazy"></p>
<p>Again, we have to change the markup for the three child chapters: <code>==</code> must be changed to <code>===</code></p>
<p>Note: The blank lines between the chapters are required, otherwise the document is not rendered correctly.</p>
<p><strong>reStructuredText:</strong></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/iLno1NIDCRQW-AtE7E1R-Bp6lToSFfbQETlj" alt="Image" width="438" height="443" loading="lazy"></p>
<p>The markup for the three child chapters must be changed: All occurrences of <code>=</code> must be changed to <code>-</code></p>
<p>The non-trivial rules for reStructuredText’s sections can be looked up <a target="_blank" href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#sections">here</a>.</p>
<p><strong>PML:</strong></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/-z7E6Sv0f4-ZPQlj9ldRKMTiFLdzBjbjNCTF" alt="Image" width="656" height="307" loading="lazy"></p>
<p>In PML, there is no need to change the code of the three child chapters.</p>
<p><strong>Bottom Line:</strong></p>
<p>In all languages, except PML, the markup code of all child chapters must be adapted if a parent chapter is inserted.</p>
<p>This is not a deal-breaker in case of small articles with few chapters. But image you are writing your next big article or book with lots of chapters and frequent changes. Now, the necessity to manually update child chapters can quickly turn into a daunting, boring, and error-prone task.</p>
<p>Note: Asciidoctor provides a <code>leveloffset</code> variable that can be used to change the level of chapters. This might be useful in some cases, but it also creates additional unneeded complexity, as can be seen <a target="_blank" href="https://github.com/asciidoctor/asciidoctor/issues/530">here</a> and <a target="_blank" href="https://github.com/asciidoctor/asciidoctor/issues/1616">here</a>.</p>
<p>A more serious kind of problem can arise in the following situation: Imagine a set of different documents that share some common chapters. To avoid code duplication, the common chapters are stored in different files, and an <code>insert file</code> directive is used in the main documents. This works fine as long as the levels of all common chapters are the same in all documents. But troubles emerge if this is not the case.</p>
<p>It is also worth to mention that HTML, Asciidoctor and reStructuredText don’t protect us against wrong chapter hierarchies. For example, you don’t get a warning or error if a chapter of level 2 contains a direct child chapter of level 4.</p>
<p>In a language like PML, the above problems simply don’t exist, because the level is not specified in the markup code. All chapters (of any level) are defined with the same, unique syntax. The chapters’ tree structure (i.e. the level of each chapter) is automatically defined by the parser. And wrong hierarchies in the markup code, such as a missing <code>}</code> to close a chapter, are flagged by an error message.</p>
<h3 id="heading-lists">Lists</h3>
<p>In Asciidoctor the kind of problems we have seen with chapter hierarchies can also arise with list hierarchies (e.g. lists that contain lists). The reason is the same as for chapters: <a target="_blank" href="https://asciidoctor.org/docs/user-manual/#nested">Asciidoctor lists</a> use different markup code to explicitly specify the level of list items (<code>*</code> for level 1, <code>**</code> for level 2, etc.). Moreover, there are a number of complications you have to be aware of when working with <a target="_blank" href="https://asciidoctor.org/docs/user-manual/#complex-list-content">complex list content</a>.</p>
<p>In reStructuredText, <a target="_blank" href="https://stackoverflow.com/questions/5550089/how-to-create-a-nested-list-in-restructuredtext">nested lists</a> are created using indentation and blank lines. This works fine for simple nested lists, but creates other problems in more complex cases (not discussed here). Using whitespace (e.g. blank lines and indentation) to define structure in markup code is a bad idea, as we’ll see soon.</p>
<p>In HTML and PML, the above problems don’t exist with lists because the syntax for parent- and child nodes is the same.</p>
<h3 id="heading-whitespace-and-indentation">Whitespace And Indentation</h3>
<p>At first, using whitespace to define structure seams like a good idea. Look at the following example:</p>
<pre><code>parent
    child <span class="hljs-number">1</span>
    child <span class="hljs-number">2</span>
</code></pre><p>The structure is very easy to read <em>and</em> write. No noisy special markup characters are needed.</p>
<p>It is therefore tempting for markup language designers to use whitespace as a simple way to define structure. Unfortunately, this works well only for simple structures, and has other inconveniences we’ll see soon.</p>
<p>Therefore, a simple, but important rule must be applied in markup languages designed to work well with complex content:</p>
<blockquote>
<p>“Whitespace doesn’t change the structure or semantics of the document.”  </p>
<p><em>— whitespace-insignificant-rule</em></p>
</blockquote>
<p>What does this mean?</p>
<p>First, let us define <em>whitespace</em>: Whitespace is any set of one or more consecutive spaces, tabs, new lines, and other Unicode characters that represent space.</p>
<p>In our context, the above rule means that:</p>
<p>Within text, a set of <em>several</em> (i.e. more than one) whitespace characters is treated the same as a <em>single</em> space character.</p>
<p>For example, this code:</p>
<pre><code>a beautiful
    flower
</code></pre><p>… is identical to this one:</p>
<pre><code>a beautiful flower
</code></pre><p>Between structural elements, a set of whitespace characters is insignificant.</p>
<p>For example, this code:</p>
<pre><code>&lt;table&gt;

    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">tr</span>&gt;</span></span>
</code></pre><p>… is identical to this one:</p>
<pre><code>&lt;table&gt;<span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">tr</span>&gt;</span></span>
</code></pre><p>A special case of whitespace is <em>indentation</em> (leading whitespace at the beginning of a line). The above rule implies that indentation is insignificant too. Indentation doesn’t change the result of the final document.</p>
<p>Applying the <em>whitespace-insignificant</em> rule is important, because it leads to significant advantages:</p>
<ul>
<li>There is no need to learn, apply and worry about complex whitespace rules (see examples below).<br>Violating the <em>whitespace-insignificant</em> rule in a markup specification adds unneeded complexity, and can lead to markup code that is ugly, error-prone, and difficult to maintain, especially in the case of nested lists.</li>
<li>Whitespace can freely be used by authors to format the markup code in a more understandable, presentable and attractive way (pretty printing). For example, lists (and lists of lists) can be indented to display their structure in a visually clear and maintainable way, without the risk of changing the underlying structure.</li>
<li>Text blocks can be copy/pasted without the need to adapt whitespace.</li>
<li>If shared text blocks (stored in different files) are imported into several documents with different structures, there is no risk of changing or breaking the structure.</li>
<li>There is no unexpected or obscure behavior if the whitespace is not visible for human readers. Some examples:  </li>
<li>a mixture of whitespace characters, such as spaces and tabs, especially when used to indent code  </li>
<li>whitespace at the end of a line  </li>
<li>whitespace in empty lines  </li>
<li>visually impaired (blind) people who can’t read whitespace<br>Note: To alleviate the pain, some editors provide a <em>display-whitespace</em> mode.</li>
<li>Tools that generate markup code, as well as markup parsers are generally easier to create.</li>
<li>In some situations it is useful to reduce whitespace to a minimum (e.g. no new lines), in order to save storage space and improve performance.</li>
</ul>
<p>If you want a few examples demonstrating the kind of technical problems that arise if whitespace is significant, you can read:</p>
<ul>
<li><a target="_blank" href="https://www.quora.com/What-are-the-downsides-to-whitespace-indentation-rather-than-requiring-curly-braces">What are the downsides to whitespace indentation rather than requiring curly braces?</a></li>
<li><a target="_blank" href="https://fsharpforfunandprofit.com/posts/fsharp-syntax/">F# syntax: indentation and verbosity</a></li>
<li><a target="_blank" href="https://github.com/nodeca/js-yaml/issues/80">Issue in nodeca/js-yaml</a></li>
</ul>
<p>So, how is whitespace handled in the languages we are discussing in this article?</p>
<p><strong>HTML:</strong></p>
<p>HTML applies the <em>whitespace-insignificant</em> rule.</p>
<p>For a thorough explanation, look at this excellent article written by Patrick Brosset: <a target="_blank" href="https://medium.com/@patrickbrosset/when-does-white-space-matter-in-html-b90e8a7cdd33">When does white space matter in HTML?</a>.</p>
<p><strong>Asciidoctor:</strong></p>
<p>In Asciidoctor, whitespace is significant in some cases.</p>
<p>This can lead to surprising behavior and problems with no easy or no satisfying solution. Some examples can be seen <a target="_blank" href="https://github.com/asciidoctor/asciidoctor/issues/686">here</a> and <a target="_blank" href="https://github.com/asciidoctor/asciidoctor/issues/623">here</a>.</p>
<p><strong>reStructuredText:</strong></p>
<p>reStructuredText has whitespace rules that are ‘a bit surprising’.</p>
<p>For example, writing <code>*very*</code> results in <em>very</em> (text in italics, as expected). However, <code>* very*</code> results in <em> very</em> (no italics!), because of the whitespace preceding "very". To understand why, the answer might be found in chapter <a target="_blank" href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#whitespace">Whitespace</a> of the specification.</p>
<p><strong>PML:</strong></p>
<p>Similar to HTML, PML applies the <em>whitespace-insignificant</em> rule.</p>
<p>There is one exception: For practical reasons, a blank line between two text blocks results in a paragraph break. This means that instead of writing:</p>
<pre><code>{p text <span class="hljs-keyword">of</span> paragraph <span class="hljs-number">1</span>}
{p text <span class="hljs-keyword">of</span> paragraph <span class="hljs-number">2</span>}
</code></pre><p>… we can simply write:</p>
<pre><code>text <span class="hljs-keyword">of</span> paragraph <span class="hljs-number">1</span>

text <span class="hljs-keyword">of</span> paragraph <span class="hljs-number">2</span>
</code></pre><p>Note: Sometimes, whitespace <em>is</em> significant in text. For example whitespace must be preserved in source code examples. Or, in verbatim text, several consecutive spaces or new lines must be preserved in the final document. All languages support this. However, in reStructuredText it’s not always obvious how to it, as shown <a target="_blank" href="https://stackoverflow.com/questions/51198270/how-do-i-create-a-new-line-with-restructuredtext">here</a>.</p>
<h3 id="heading-other-inconveniences">Other Inconveniences</h3>
<p>As seen already, some markup languages systematically use opening and closing tags. An example would be <code>&lt;</code>;i&gt;<code>; an</code>d  in HTML. All XML-based languages, as well as PML belong to this class of languages.</p>
<p>Without digging into details, here are some drawbacks that can occur in languages that do <em>not</em> (or not always) use pairs of distinct opening/closing tags (e.g. Markdown, Asciidoctor, and reStructuredText):</p>
<p><strong>Editor support</strong><br>Creating good, reliable editor support is more difficult to develop. Examples of useful editor features are:</p>
<ul>
<li>syntax highlighting for markup code</li>
<li>markup code completion</li>
<li>visualizing pairs of block start/end marks (e.g. <code>{</code> and its corresponding <code>}</code>)</li>
<li>block collapsing/expanding<br>In the case of languages that use distinct opening/closing tags, the two last features work out-of-the-box in some editors. For example, PML uses <code>{</code> and <code>}</code> for node boundaries. This is also used in many programming languages (C, Java, Javascript, etc.) and therefore block features implemented for programming languages will also work for PML.</li>
</ul>
<p><strong>Document validation</strong><br>Fewer syntax and structure errors can be detected automatically. This can lead to more time spent on debugging documents. Or, even worse, there might be silently ignored errors that end up in wrong output (Did I really fail to spot the missing warning block on page 267 of my 310 pages book?).</p>
<p><strong>Parsers</strong><br>It is more difficult to create parsers (i.e. programs that read markup code) that work well in all cases. If different parsers read the same markup code, there is an increased risk of getting different results for corner-cases.</p>
<p><strong>Auto-generated markup code</strong><br>Tools that generate markup code programmatically are more difficult to create. For example, if whitespace is significant, or font styles cannot be nested, then additional state must be updated and tracked, in order to respect these rules.</p>
<h3 id="heading-my-own-experience">My Own Experience</h3>
<p>When I started writing technical documents a few years ago, I used Docbook. It took me some time to learn it, but after that I never stumbled on anything I couldn’t do. Docbook is powerful. However, I disliked typing verbose XML code. I tried some XML editors, but gave up. Finally I just wrote complete text blocks unformatted in Notepad++, and then adorned the text with the necessary markup code. It was frustrating and time-consuming. Moreover, I couldn’t find a stylesheet that produced good-looking web documents, and I didn’t have the patience, motivation, and experience to fiddle around with big, complex CSS files and adapt them.</p>
<p>Later on I discovered Asciidoctor. What a relief. Everything was so much simpler and the web documents were beautiful, out of the box. Asciidoctor’s documentation is great, and I think the community is helpful and active. However, when I started to write more complex and bigger documents, I had to deal with problems similar to those described in the previous sections. At one point, I had to develop a specific pre- and post-processor to solve a problem for which I couldn’t find a solution in Asciidoctor/Gitbook.</p>
<p>An intriguing question emerged: “Why do these problems not exist in Docbook?”.</p>
<p>To make a long story short, I concluded that we need a new markup syntax. The key points to success would be:</p>
<ul>
<li>easy to learn: few, simple, consistent and predictable rules (no exceptions)</li>
<li>easy to write and read</li>
<li>well-structured documents with no ambiguities</li>
<li>powerful enough to create big, complex documents without the need for “special rules, tricks, or workarounds”</li>
</ul>
<p>After a period of investigating, pondering, programming, testing and improving, the <a target="_blank" href="http://www.practical-programming.org/pml/index.html">Practical Markup Language (PML)</a> was born. Since then, I never looked back again. Today I write all my web documents in PML (including this article).</p>
<p>Of course, when I started to create PML, it was to cover my own needs. So, I am probably biased. Hopefully this article contains enough factual examples, but I encourage you to leave a comment if you see anything wrong, unfair, or missing. I appreciate constructive feedback of any kind, and I will update the article if needed.</p>
<h3 id="heading-conclusion">Conclusion</h3>
<p>As demonstrated in this article, a good number of problems encountered with existing document markup languages vanish with the PML syntax.</p>
<p>Now we should come together to improve PML and make it more powerful, so that it covers more use cases and more people can benefit from it.</p>
<p>Please help to spread the word. Or try out PML and send feedback, so that we know what needs to be refined. Your voice counts!</p>
<p>The vision is to create the best possible document markup language and all necessary tools, so that writers can focus on writing and enjoy creating beautiful documents in a minimum of time — without worrying about unneeded complexity.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ The advantages of Document Markup Languages vs WYSIWYG editors ]]>
                </title>
                <description>
                    <![CDATA[ By Christian Neumanns An explanation of why you might want to dump your word processor. Introduction Did you ever wonder what’s the best tool to write an article, user manual, book, or any other kind of text document? There are many options to choose... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/the-advantages-of-document-markup-languages-vs-wysiwyg-editors-829dc8362219/</link>
                <guid isPermaLink="false">66c360a9e4cb1ff6521c826b</guid>
                
                    <category>
                        <![CDATA[ markup ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Productivity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technology ]]>
                    </category>
                
                    <category>
                        <![CDATA[ writing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ wysiwyg ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 26 Mar 2019 21:05:59 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*9M3q_Vsi135nUKWS_0Sibw.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Christian Neumanns</p>
<h4 id="heading-an-explanation-of-why-you-might-want-to-dump-your-word-processor">An explanation of why you might want to dump your word processor.</h4>
<p>Introduction</p>
<p>Did you ever wonder what’s the best tool to write an article, user manual, book, or any other kind of text document?</p>
<p>There are many options to choose from. Most people use a What-You-See-Is-What-You-Get (WYSIWYG) editor (also called a text processor), such as Google Docs, LibreOffice or Word. However, more and more people are writing their documents…</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
