DEV Community

Carla Breden for Feldroy

Posted on

9 2

The difference between block and inline elements

I work for Feldroy, which is a cool little tech company. My job is Director of Customer Success and while I don't code yet, I want to learn. This is the beginning of my journey to become a programmer. I am learning HTML since it might be useful in my job. This is something I learned from my first lesson in Mozilla's HTML class.

So, in my job, I use Slack a lot. What I realized was that when I want to highlight part of a single line, I use single backticks. This would be an inline element as the lesson described. To highlight a number of sentences, I use three backticks and it puts a block around the text.

Examples:

In this example, the word "example" is decorated with an inline element.

In this example, the entire sentence is in a block element.

What I realized after I completed the lesson, was that I had already been using a version of block and inline elements! How cool!

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay