Logo

dev-resources.site

for different kinds of informations.

Callout Blocks in a New Way

Published at
12/19/2024
Categories
meta
markdown
beginners
tutorial
Author
ddebajyati
Categories
4 categories in total
meta
open
markdown
open
beginners
open
tutorial
open
Author
10 person written this
ddebajyati
open
Callout Blocks in a New Way

I have discovered a nice way to write Callout Blocks in my posts here on Dev.to.

The Problem

I usually enjoyed using callout blocks in other blogging platforms when writing posts.

Callout Blocks are usually html blocks rendered in the article which as we understand, are not purely markdown.

If you have always been only in here and having problem realising how does a callout block look like, look below. Here is a screenshot.

Callout Block Image Example

But as far as I know, we don't have them in here because dev.to uses purely markdown for writing blog posts. ( It has some extra features like embedding URLs of YouTube videos, twitter posts, stackoverflow questions etc. )

The Solution

use this syntax I've shown below.

|๐Ÿ’กThis is a callout block |
|------------| 
Enter fullscreen mode Exit fullscreen mode

When rendered, it will show up like this -

๐Ÿ’กThis is a callout block

Your Reaction

Wait a minute! Isn't this, hmmmmmm, a markdown table?
Actuallly, it is the first column of the index row of a table.
Interesting....

My Answer

Yes, exactly! Effectively this is like a table which has only 1 row and 1 column. (singleton matrix for the mathematicians ;D)

While with html blocks you also get the power of inline css so you can customise that to your own liking, where the customizability theoretically has no limits, making it more shiny and beautiful. But I think this table hack isn't anyhow bad either.

I love it!

The beauty of this approach is that you do get some options (few different ways to customise it).

Look below. These are the ways I have tried to create a callout block till now. Get some ideas. After that, who knows? You may bring some fresh new cool ideas here too.

Let's see.
1.

|๐Ÿ’กThis is a callout block |
|------------|
Enter fullscreen mode Exit fullscreen mode
๐Ÿ’กThis is a callout block

2.

|๐Ÿ’กCaution! |
|------------|
| This is a callout block |
Enter fullscreen mode Exit fullscreen mode
๐Ÿ’กCaution!
This is a callout block

3.

|๐Ÿ’ก | This is a callout block |
|----| --------|
Enter fullscreen mode Exit fullscreen mode
๐Ÿ’ก This is a callout block

4.

|๐Ÿ’ก |
|------------|
| This is a callout block |
Enter fullscreen mode Exit fullscreen mode
๐Ÿ’ก
This is a callout block

So, these are the four ways I write callouts here in Dev Community Posts.

Callout Blocks with Custom Vibe

Well, you may have already figured out that the emoji and text we place there are totally dependent on what we decide. So, Based on different contexts we can produce different looking callouts. What I mean is shown below. -

For example, using the 2nd method, we will show some tips in a callout.

| ๐Ÿ’ฏ ๐Ÿ˜Ž Pro Tip |
| -------------- |
| Write the tip here |
Enter fullscreen mode Exit fullscreen mode
๐Ÿ’ฏ ๐Ÿ˜Ž Pro Tip
Write the tip here

In The End

So, this is all about it. Let me know which one is your favourite way among the four.
Also if you've got some cool ideas, let me know in the comments.

If you found it useful, please consider to share this article with your other developer friends.

Feel free to connect with me on Twitter, LinkedIn, and GitHub.

Happy Blogging! ๐Ÿฑโ€๐Ÿ’ป

meta Article's
30 articles in total
Favicon
OKRs (Objectives and Key Results) com KPIs (Key Performance Indicators)
Favicon
Deep Dive: Meta's AI Infrastructure and Developer Tools - A Technical Analysis
Favicon
2024 dev.to roast ๐Ÿ”ฅ
Favicon
Callout Blocks in a New Way
Favicon
@Ben any chance dev.to starts to add language tag to each post? There are many languages mixed all together in my rss feed and I'm certain I'm not author's target audience nor I will try to read these, so it would be good I can filter them out somehow...
Favicon
Is this bug also occurring in your posts
Favicon
Meta Box AI: Redefining the Future of Crypto Trading with AI and Robotics
Favicon
Eight New Partner Deals Join DEV++! Early-bird pricing ends this month.
Favicon
Oracle and Meta Team Up: What It Means for Developers Working with AI Models
Favicon
New DEV Feature: Following Tab
Favicon
Dear dev.to, Enshittification is contagious
Favicon
The Curious Case of Dev.to's Ghost Followers: When Your Popularity Is Basically a Digital Flash Mob
Favicon
VYUG - A New era of Digital Existence
Favicon
Dev.to is Gone: SPAM is What Powers It Now
Favicon
We are donating $2k worth of advertising to the Open Source pledge
Favicon
Introducing DEV++
Favicon
The Fight Against Low-Quality Automation
Favicon
DEV Search: 20x Latency Reduction By Layering Algolia On Top of Postgres
Favicon
What do you think we should do about AI generated content?
Favicon
New DEV++ Deal: 25% Off Scrimba Pro
Favicon
Enhancing your deck's longevity and functionality
Favicon
Inquiry About the Value of Content Creation on DEV.to
Favicon
Why do AI articles trend on Dev.to?
Favicon
I got 84 followers and a reader isn't 1
Favicon
Llama Weights: An Ultimate Guideย 2024
Favicon
How I gained 2100 subscribers on dev.to
Favicon
Dashboard down?
Favicon
DEV Team Update
Favicon
Featured Mod of the Month: Anita Olsen
Favicon
Introducing some awful new DEV tags

Featured ones: