Links to webpages in books

You can use clickEvent with open_url:

/give @s minecraft:written_book{pages:["[\"\",{\"text\":\"Arqade\",\"color\":\"gray\",\"underlined\":true,\"clickEvent\":{\"action\":\"open_url\",\"value\":\"https://gaming.stackexchange.com/\"}}]"],title:"foo",author:"bar"}

book

url opened


A good online website for creating books is minecraftjson.com, where you can create books, tellraw commands and other JSON texts for Minecraft.

If you create a book, you can simply add a new piece of text, and then set a clickEvent with open_url, then type in the url, and you're done.