YouTip LogoYouTip

Md Title

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; line-height: 1.6; color: #333; max-width: 900px; margin: 0 auto; padding: 20px; } h1, h2, h3, h4, h5, h6 { margin-top: 1.5em; margin-bottom: 0.5em; font-weight: 600; } h1 { font-size: 2em; border-bottom: 1px solid #eee; padding-bottom: 0.3em; } h2 { font-size: 1.5em; border-bottom: 1px solid #eee; padding-bottom: 0.3em; } h3 { font-size: 1.25em; } p { margin: 1em 0; } code { background-color: #f5f5f5; padding: 0.2em 0.4em; border-radius: 3px; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 85%; } pre { background-color: #f5f5f5; padding: 16px; overflow-x: auto; border-radius: 6px; margin: 1em 0; } pre code { background-color: transparent; padding: 0; font-size: 100%; } img { max-width: 100%; height: auto; display: block; margin: 1em 0; } a { color: #0366d6; text-decoration: none; } a:hover { text-decoration: underline; } ul, ol { padding-left: 2em; margin: 1em 0; } li { margin: 0.5em 0; } strong { font-weight: 600; } em { font-style: italic; } .note { background-color: #fff8e1; border-left: 4px solid #ffc107; padding: 12px 16px; margin: 1em 0; } .note strong { color: #d35400; } .example { background-color: #f0f7ff; border-left: 4px solid #2196f3; padding: 12px 16px; margin: 1em 0; } .example strong { color: #1565c0; } .avoid { background-color: #ffebee; border-left: 4px solid #f44336; padding: 12px 16px; margin: 1em 0; } .avoid strong { color: #c62828; } .tip { background-color: #e8f5e9; border-left: 4px solid #4caf50; padding: 12px 16px; margin: 1em 0; } .tip strong { color: #2e7d32; } .nav-links { display: flex; justify-content: space-between; margin-top: 2em; padding-top: 1em; border-top: 1px solid #eee; } .nav-links a { display: inline-block; padding: 8px 16px; background-color: #f5f5f5; border-radius: 4px; transition: background-color 0.2s; } .nav-links a:hover { background-color: #e0e0e0; text-decoration: none; } .ad-banner { background-color: #f0f7ff; border: 1px solid #b3d4fc; border-radius: 4px; padding: 16px; margin: 2em 0; text-align: center; } .ad-banner a { display: inline-block; margin: 0 10px; padding: 8px 16px; background-color: #2196f3; color: white; border-radius: 4px; text-decoration: none; } .ad-banner a:hover { background-color: #1976d2; }

Markdown Headings | Tutorial

Tutorial -- Learning More Than Just Technology, But Dreams!

Markdown Tutorial

Markdown Tutorial Markdown Editor Markdown First File Markdown Headings Markdown Text Formatting Markdown Lists Markdown Blockquotes Markdown Code Markdown Links Markdown Images Markdown Tables Markdown Advanced Markdown Dividing Line Markdown Math Formulas Markdown Diagrams Markdown Practices Markdown Quiz Obsidian Usage Tutorial

Markdown Headings

There are two formats for Markdown headings.

1. Using = and - to Mark Level 1 and Level 2 Headings

The syntax for = and - is as follows:

I am showing a level 1 heading=================I am showing a level 2 heading-----------------

The display effect is shown in the image below:

Image 3

Using # to Mark Headings

Markdown uses the # symbol to create headings, which evolved from the concept of HTML's <h1> to <h6> tags.

Using # can represent levels 1-6 headings. A level 1 heading corresponds to one #, a level 2 heading corresponds to two #s, and so on.

# Level 1 Heading
## Level 2 Heading
### Level 3 Heading
#### Level 4 Heading
##### Level 5 Heading
###### Level 6 Heading

The display effect is shown in the image below:

Image 4
Important Notes:
  • Space between symbol and text: There must be a space between the # symbol and the heading text. This is a standard Markdown syntax requirement.
# Correct
# Incorrect
  • Position at the beginning of the line: The # symbol must be at the beginning of the line, with no other characters (spaces or tabs) before it.
  • Single Level 1 Heading: In a document, typically only one level 1 heading is used as the main title, which conforms to good document structure practices.

Nested Structure of Headings

The hierarchy of headings should follow a logical order and should not skip levels. A good heading structure is like a book's table of contents:

Recommended Structure:
# Topic: Introduction to Artificial Intelligence
## Part 1: Basic Concepts
### What is Artificial Intelligence
### History of Development
#### Early Development (1950-1980)
#### Modern Development (1980-Present)
## Part 2: Application Areas
### Natural Language Processing
### Computer Vision
### Machine Learning
#### Supervised Learning
#### Unsupervised Learning
#### Reinforcement Learning
Structure to Avoid:
# Main Title
### Skipping directly to Level 3 Heading (Not Recommended)
## Then Level 2 Heading

Best Practices for Heading Numbering

Automatic Numbering vs. Manual Numbering:

Many Markdown processors and editors support automatic generation of heading numbers, so manual numbering is usually not needed in the source code:

# Introduction
## Background
## Objectives
# Methodology
## Data Collection
## Analysis Methods

Heading Anchors:

Most Markdown processors automatically create anchors for headings, facilitating in-page navigation:

(#methodology)

Heading Length Recommendations:

  • Keep headings concise and clear, generally no more than 10 Chinese characters or 20 English characters.
  • Use descriptive words, avoid vague headings like "Other" or "Miscellaneous".
  • Colons can be used to separate main topics from subtopics.
← Md ListsC Function Strstr β†’