Updated:

1. Show floating text

/summon text_display ~ ~1.5 ~ {text:{text:"Welcome!",color:"gold",bold:true},billboard:"center",Tags:["holo"]}

Bold gold text appears just above you. With billboard:"center" the text always faces the viewer. The tag lets you edit or remove it later.

In Java 1.21.4 and earlier, the text is a JSON string:

/summon text_display ~ ~1.5 ~ {text:'{"text":"Welcome!","color":"gold"}',billboard:"center",Tags:["holo"]}

2. Change the look

FieldExampleEffect
billboard"center"Always faces you. "fixed" keeps its rotation, "vertical" turns left and right only
background0Background color. 0 means transparent
shadowtrueAdds a text shadow
see_throughtrueVisible through walls
line_width100Line width before text wraps
alignment"left""center", "left" or "right"
/summon text_display ~ ~2 ~ {text:{text:"PvP Arena\nRight-click to join",color:"aqua"},billboard:"center",background:0,shadow:true,Tags:["holo"]}

Use \n inside the text for a second line.

3. Make it bigger

/summon text_display ~ ~2 ~ {text:{text:"Finish"},billboard:"center",Tags:["holo"],transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[3f,3f,3f]}}

The three scale numbers set the size. 3f means three times larger.

4. Edit or remove the text

/data modify entity @e[type=text_display,tag=holo,limit=1,sort=nearest] text set value {text:"Closed",color:"red"}
/kill @e[type=text_display,tag=holo,distance=..3]

The first command rewrites the nearest display. The second removes nearby displays. Without distance=..3 every tagged display is removed. Text displays cannot be punched away because they have no hitbox.

5. Floating items and blocks

/summon item_display ~ ~1.5 ~ {item:{id:"minecraft:diamond_sword",count:1},billboard:"center",Tags:["holo"]}
/summon block_display ~ ~1 ~ {block_state:{Name:"minecraft:gold_block"},Tags:["holo"]}

Use these for prize previews or shop signs. A block display looks like a real block, but you cannot stand on it or break it.

Troubleshooting

Check your command

The Command Error Doctor checks common syntax mistakes in your browser.