How to Indent the Second Line of a Paragraph in HTML and Markdown

Learn how to indent the second line of a paragraph using CSS in HTML and non-breaking spaces in Markdown for proper formatting.

Published

Video transcript

To indent the second line in a paragraph, you can use the CSS property in HTML or Markdown. In HTML: `<p style='text-indent: 2em;'>Your text here</p>`. In Markdown: add a non-breaking space ` ` before your second line.

Questions and answers

  1. What is the CSS property to indent the second line of a paragraph?

    The CSS property 'text-indent' can be used to indent the second line of a paragraph, for example: 'text-indent: 2em;'.

  2. How do you create an indent in Markdown?

    In Markdown, you can simulate a second line indent by adding a non-breaking space (\u00a0) before the start of the second line.

  3. Can I use CSS to indent text in Markdown documents?

    While Markdown itself doesn't support CSS directly, when converting Markdown to HTML, you can use CSS styling such as 'text-indent' in the resulting HTML.