====== Website Making ======
This section is dedicated to help making websites!
===== Guide =====
For this guide, you will be making a very simple website that you can view on your PC. Uploading it to the web will be covered later.
You will need:
* A text editor, such as notepad, vim, emacs, or TextEdit.
* A browser
Web pages are written using a markup language called HTML. HTML is text-based, and uses tags to explain how your content should be displayed to the browser. A tag is a word or letter enclosed with "<" and ">".
- In order to start building your webpage, open your text editor, begin a new document, and copy the code below into it:
paragraph text here ...
- In the section where it says, "your title here," erase the text and type "My first webpage."
- In the section where it says, "paragraph text here," erase the text and type "Hello world!"
- Save the text file as "index.html" and store it in a place you'll remember. Make sure to use the ".html" file type, because this is what tells the computer it's a webpage and not a text file.
- Open the index.html file you just created in a browser by double-clicking it.
- Congratulations, you've created your first web page! You can add to the text you've created here and change the title to whatever you like.
Eventually you will want to add more info, multiple paragraphs, images, and introduce some styling, but before you start doing that, you'll need to know a little more about tags.
===== Basic Tags =====
=== HTML tag ===
In the example above, the first tag looks like this: "%%%%." This HTML tag tells the browser and other software that the page it's looking at is an HTML page, and should be interpreted as such. There are other types of tags that you can start your document with, such as "%%
"%% tag. Try it, save your page, and then refresh the page to see what it looks like!
=== Link tag ===
Although not included in the tutorial above, the link tag is probably the most important tag you'll learn. It lets you link to other pages on your site and on the web. An example of a link is below:
How to make your own website
If you add the above link to your page, it will link to this webpage! The **href=** attribute in the tag holds the location of the link. You can include a full link, like I've done above, or you can link to a page on your site. The text in between the tags is what the link will show to the user. If you're linking to a page in the same folder, you can leave off the first part of the address and just include the page, like below:
Read about me
==== Other tags ====
Below are a few other tags that you can experiment to add more things to your site.
=== Image tag ===
The image tag looks like this:
The image tag is unusual in that it doesn't have a closing tag; everything it needs to display an image is located between its brackets. Let's break it down so that you can learn how to use this in your own webpages:
The "src=" bit of the tag is called an **attribute.** It contains more instructions for the browser that won't necessarily be seen by visitors, but are still very important. Src, in this case, stands for "source," and should be the address to your image, so it may look like "myimage.jpg" or "files/img/myimages.jpg" depending on where you've stored it.
The "alt=" attribute is necessary for both screen readers and for when your image can't be rendered on the page. In this event, the browser will display a broken image icon, and then the alt text that you've included here. This is important because if your content is dependent on the image you're showing (such as using images for menu navigation or similar), then users won't know how to interact with your website in the event that the images don't load. Make sure to always include the alt="" attribute to ensure that your site is [[accessible]] for all users.