17 Nov 2023
Beginner
Markdown uses fenced code blocks for syntax highlighting. You can specify the programming language after the opening backticks to enable syntax highlighting. Here are some common language identifiers used for code highlighting in Markdown:
-
Bash/Shell
```bash -
C
```c -
C++
```cpp -
C#
```csharp -
CSS
```css -
Dart
```dart -
Docker
```docker -
Go
```go -
HTML
```html -
Java
```java -
JavaScript
```javascript -
JSON
```json -
Kotlin
```kotlin -
Markdown
```markdown -
Objective-C
```objective-c -
PHP
```php -
Python
```python -
Ruby
```ruby -
Rust
```rust -
Shell
```shell -
SQL
```sql -
Swift
```swift -
TypeScript
```typescript -
YAML
```yaml
These are just a few examples, and there are many more languages that Markdown supports for syntax highlighting. You can use the appropriate language identifier after the opening backticks to specify the language for your code block. If the specific language is not recognized, Markdown will often default to a generic code block without syntax highlighting.
markdown
code-highlighting