Makerspace at the Fulton School
To make a webpage we must first understand that a web page is a document that can be seen in a web browser, so lets start there assuming you are seeing this on a web browser. Go ahead and download your favorite text editor. I am going to use Visual Studio for this.
Now we need to open our text editor and open a new file ending with the name .html if you don’t end your file name with .html it will not work. Next we need to start off our code with “<!DOCTYPE html> this identifies the mode of html along with this we need to to <html lang=”en”> to set your language to english.
It’s now time to learn about the different languages in your html. There are many different languages you can use which are responsible for different things. The main ones I will be focusing on are css, and javascript. You separate which language you’re using with the tags in your html, there are many different tags but are easy to identify because they look like <example> and come in pairs with the code going in between the tags. Java script is used to make your web page interactive, to use javascript simply put the <script> tag and put what you want to code into here <script> lets start by making a button use <input type=”button” value=”Calculate” id=”Name”>
to select the button you want to make interactive you can use Whatever name you want here = document.getElementById(“name”) and set different values and calculations for the button such as What ever name you want here = .addEventListener(“click”,supermath); doing this allows you set set a value for supermath by saying supermath = 1+1
Next up is css which is primarily used for styling your web page and making it look cool css stands for cascading style sheets. To use css you simply need to use the <style> tag and put a selector which is used to tell the program what you’re trying to style (for example if you want to select all the headers put h1) you then need to put the property you’re trying to change such as the font or the color if you want to change the color of the headers you can put h1 {color: blue ;}
Now that you know the basics of how to make a web page it’s time to make your own, here is access to my first webpage if you want an idea my first web page was made just for solving right angle triangles but you can do anything if you need further help with the language you can go to https://html.com/ this is a great starting place for beginners. Good Luck!!!
Note: My webpage will be included in a link file:///home/student/github/CS-class/CS-class/triangleSideAngle.html
Recent Comments