DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 968,547 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Cover image for Beautiful mark tag style in CSS
Chris Texe
Chris Texe

Posted on

Beautiful mark tag style in CSS

I am sure you many times used a mark tag in your HTML document. Without any styling it can be a little bit boring:

Standard mark tag style

With few lines of CSS code we can make it a little nicer, like this:

Styled mark tag

The whole secret is in these lines of CSS code:

mark.one {
  background: linear-gradient(
  -100deg,
  hsla(48,92%,75%,.3),
  hsla(48,92%,75%,.7) 95%,
  hsla(48,92%,75%,.1)
  );
  border-radius: 1em 0;
  padding: .3em;
  }
Enter fullscreen mode Exit fullscreen mode

It would be great if you will comment or follow me on social media:

Chris Texe Twitter

Chris Texe LinkedIn

Also you can visit my websites:

Latest comments (0)

What image format should you use in your next project? πŸ€”