Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


  <link rel="stylesheet" href="" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
  <div class="jumbotron inverse">
    <h2 class="display-4">Fantasy Title Generator</h2> 
    <h3>by Para (<a href="">@paracactus</a>)</h3>
  <select id="options" class="custom-select">
    <option value="random">Random</option>
    <option value="nounsOnly">The [x] of [y]</option>
    <option value="adjNoun">The [x][y]</option>
    <option value="threeNouns">The [x] of [y] and [z]</option>
    <option value="twoNouns">The [x] and the [y]</option>
    <option value="leftAdj">The [x][y] of the [z]</option>
    <option value="rightAdj">The [x] of [y][z]</option>
    <option value="bothAdj">The [w][x] of the [y][z]</option>
  <br /><br />
  <h2 id="title">-</h2>
  <br />
  <button type="button" onclick="generate()" class="btn btn-dark" id="button">Generate</button>
  <br /><br />
  <p>Feel free to use any titles you find helpful!</p>




  background: black !important;
  color: white;

  margin-left: 20px;

  width: 200px;
  margin-left: 20px;

  margin-left: 20px;

  margin-left: 20px;

  margin-left: 20px;


                var nouns = ["Wheel", "Chronicle", "Archive", "Wine", "Patrol", "Nights", "Gods", "Orb", "Dreams", "Coven", "Glen", "Fallen", "Dragons", "Fire", "Witch", "Shipwreck", "Cave", "Hold", "Sand", "Raven", "Death", "Road", "Honour", "Water", "Isle", "Mind", "Orchard", "Candor", "Heir", "God", "Gang", "Sea", "One", "Child", "Truth", "Prophecy", "Whisperer", "Stars", "Hourglass", "Ocean", "Maker", "Hunters", "Oath", "Season", "Darkness", "Game", "Wind", "Vale", "Curse", "Hunter", "Spectre", "Rogue", "Path", "Dance", "Lion", "Swords", "Sword", "Roses", "Takeover", "Shadow", "Magic", "Symphony", "Winter", "Boy", "Girl", "Casting", "Father", "Faun", "Hero", "Wizard", "Hog", "Song", "Silver", "Merchant", "Empire", "Necromancer", "Thieves", "Heart", "Souls", "Face", "King", "Rise", "Quarter", "Blood", "Crown", "Sentinel", "Hall", "Angel", "Bastard", "Devil", "Soul", "Wolf", "Life", "Murder", "Pledge", "City", "Legacy", "Paradise",  "Light", "Night", "Sky", "Daughter", "Shield", "Clock", "Nectar", "Falls", "Dragon", "Act", "Hell", "Dawn", "Servant", "Defender", "Rights", "Chaos", "Voice", "Storm",  "Blade", "Dark", "Kingdom", "Queen", "Night", "Bone", "Flame", "Glass", "Ghost", "Gold", "Demon", "Iron", "Steel", "Time", "Spring", "Summer", "Autumn", "Twilight", "Order", "Horse", "Mother", "Son", "Assassin", "Emperor", "Empress", "Prince", "Princess"];

var adjectives = ["Lost", "Royal", "Fallen", "Raven", "Forged", "Rogue", "Foolish", "Blue", "Red", "Last", "Bound", "Strange", "Easy", "Hostile", "Silver", "Hero", "Boy", "Girl", "Thousand", "Hundred", "Chosen", "Great", "Hidden",  "First", "Careful", "Blood", "Angel", "Bastard", "Devil", "Legacy", "Light", "Night", "Dragon", "Hell", "Dawn", "Chaos", "Spinning", "Sworn", "Dark", "Brutal", "Glass", "Black", "White", "Gold", "Endless", "Demon", "Iron", "Steel", "Winter", "Spring", "Summer", "Autumn", "Twilight", "Broken"];

function nounsOnlyGen(noun1, noun2){
  return "The " + noun1 + " of (the) " + noun2;
function threeNounsGen(noun1, noun2, noun3){
  if((!noun2.endsWith("s") && !noun2.endsWith("y")) || noun2 == "Boy")
    noun2 += "(s)"
  if(noun2.endsWith("y") && noun2 != "Boy"){
    noun2 = noun2.slice(0, -1)
    noun2 += "ies"
  if((!noun3.endsWith("s") && !noun3.endsWith("y")) || noun3 == "Boy")
    noun3 += "(s)"
  if(noun3.endsWith("y") && noun3 != "Boy"){
    noun3 = noun3.slice(0, -1)
    noun3 += "ies"
  return "The " + noun1 + " of " + noun2 + " and " + noun3;
function adjNounGen(adj, noun){
  return "The " + adj + " " + noun;
function leftAdjGen(adj, noun1, noun2){
  return "The " + adj+ " " + noun1 + " of (the) " + noun2;
function rightAdjGen(adj, noun1, noun2){
  return "The " + noun1 + " of (the) " + adj + " " + noun2;
function bothAdjGen(adj1, adj2, noun1, noun2){
  return "The " + adj1 + " " + noun1 + " of (the) " + adj2 + " " + noun2;
function twoNounsGen(noun1, noun2){
  return "The " + noun1 + " and the " + noun2;

function generate(){
  var nounsLen = nouns.length;
  var adjsLen = adjectives.length;
  var noun1 = Math.floor(Math.random() * nounsLen);
  var noun2 = Math.floor(Math.random() * nounsLen);
  var noun3 = Math.floor(Math.random() * nounsLen);
  var adj1 = Math.floor(Math.random() * adjsLen);
  var adj2 = Math.floor(Math.random() * adjsLen);
  var val = document.getElementById("options").value;
  var title;
  var rndfunc = Math.floor(Math.random() * 7); 
  if(val == "nounsOnly" || (val == "random" && rndfunc == 0)){
    title = nounsOnlyGen(nouns[noun1], nouns[noun2]);
  else if(val == "threeNouns" || (val == "random" && rndfunc == 1)){
    title = threeNounsGen(nouns[noun1], nouns[noun2], nouns[noun3]);
  else if(val == "adjNoun" || (val == "random" && rndfunc == 2)){
    title = adjNounGen(adjectives[adj1], nouns[noun1]);

  else if(val == "leftAdj" || (val == "random" && rndfunc == 3)){
    title = leftAdjGen(adjectives[adj1], nouns[noun1], nouns[noun2]);
  else if(val == "rightAdj" || (val == "random" && rndfunc == 4)){
    title = rightAdjGen(adjectives[adj1], nouns[noun1], nouns[noun2]);
  else if(val == "bothAdj" || (val == "random" && rndfunc == 5)){
    title = bothAdjGen(adjectives[adj1], adjectives[adj2], nouns[noun1], nouns[noun2]);
  else if(val == "twoNouns" || (val == "random" && rndfunc == 6)){
    title = twoNounsGen(nouns[noun1], nouns[noun2]);
  document.getElementById("title").innerHTML = title;