Ask coding questions

← Back to all posts
How can I make a custom embed for my website?
Stickpuppet (0)

Hello, I am making a website right now for my ROBLOX group. I wanted it so when you post the link to the website somewhere, an embed thing appears and displays the website's name, icon, and a description. How can I do this?

Answered by CodingCactus (4367) [earned 5 cycles]
View Answer
Comments
hotnewtop
CodingCactus (4367)

@ch1ck3n well i have these normally

CodingCactus (4367)

you can ignore the templating stuff

CodingCactus (4367)

basically just

<meta name="theme-color" content="#00cc00"><!-- embed colour -->

<meta property="og:title" content="Cactus Bot" /><!-- embed title -->
<meta property="og:type" content="website" />
<meta property="og:description" content="A fun discord bot where you live the life of a cactus and try to become the tallest!"/><!-- embed description -->
<meta property="og:image" content="/favicon.ico" /><!-- embed image -->
ch1ck3n (2082)

@CodingCactus i dont see which meta tag adds the iframe thing he's talking about

CodingCactus (4367)

@ch1ck3n mainly because they aren't asking for an iframe

Stickpuppet (0)

@CodingCactus Thank you, this works a lot better for me and the website I am making

Stickpuppet (0)

@Coder100 How can I also add the icon of the website to it?

Coder100 (18221)

I use this: http://faviconit.com/en
Just upload an image and magic happens :) @Stickpuppet

Stickpuppet (0)

I know how to do that, but how do I write the code to add it to the embed? @Coder100

Stickpuppet (0)

Could I just do this?

<meta name="icon" property="spg.ico">
FeixuRuins (22)

@Coder100 Don't use w3schools. Use the mozilla docs.

FeixuRuins (22)

@Coder100 this is what they're looking for: https://ogp.me/

Coder100 (18221)

why not

they both work lol @FeixuRuins

FeixuRuins (22)

@Coder100
1. W3schools is sometimes deprecated and has poor practice. Mozilla is infinitely better.
2. ogp.me is the official OpenGraph meta tag documentation.

Coder100 (18221)

yeah, but it doesn't mean it isn't a valid resource to point to @FeixuRuins

[deleted]

WOAH I PLAY ROBLOX FREIND ME ITS: hi1noobs bubby has 2 bobux

[deleted]

eeeeeeeeeeeeeeeeeeeeeee

big boy is commin to town

ch1ck3n (2082)
<iframe name="iframe1" src="target.html"></iframe>

<a href="link.html" target="iframe1">link</a>