

Repeat this step two more times, but create a file named “javascript.js” and “style.css” (without the quotation marks). Now you have created the index.html file. An input bar will pop up on the bottom to name the file. In Sublime Text, right click the “quote generator” folder on the sidebar and click on create new file. Let’s create these files within the “quote generator” folder.

Most web project consist of at least one HTML, JavaScript, and a CSS file. Create a blank folder on your desktop Drag the folder into Sublime Text. Now we should have the folder accessible through the sidebar. Open up Sublime Text and drag the file into sublime. Create an empty folder on your desktop and name it “quote generator”. The first thing we’ll do is create the folder that will contain all of our files that make up the project. You can use whatever tools you feel comfortable with. To get started, you’ll need three essential things that are almost always used for every web project:įor this tutorial I will be using the Google Chrome web browser, the Sublime Text 3 Editor, and of course, my own desire to build and teach. In this project, we’ll build a random quote generator that displays a random quote to the user every time they press a button. By the time you reach the end of this lesson, you should have a much better understanding of how JavaScript works with with HTML to make web pages interactive. I will walk you through every single line of code, and explain everything in detail. If you have absolutely zero experience in HTML and JavaScript, no worries. It will help you understand the interaction between JavaScript and an HTML document, and how they work together to display things on the web browser for people to see.
#Random selector. how to#
This tutorial is intended for beginners who want to learn how to create a simple web application using JavaScript. By Sophanarith Sok How to build a random quote generator with JavaScript and HTML, for absolute beginners
