DEV Community

Carla Breden for Feldroy

Posted on


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.


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!

Top comments (0)