Learn to Code with Siobhan: HTML basics

I’m starting with HTML because even though a lot of people say its too easy to bother with and that you don’t need it I found that learning the concepts behind how it works, not just that typing in x will get you y, will help you to understand the way that the more complicated languages like clojurebridge work when you come to them later (and of course if you want to build your own websites you are going to need html).

This is something I learned using code academy. Before this I knew what some tags did but not how the language was structured or how it actually worked, so if you want to go through the course or practice using it I recommend you go here sign up for free and log into the html course. Alternatively you can open a word press post window and type into the text tab rather than the visual tab.

Now, on to the tags:

Every html document needs to start with <!doctype html> so that the browser recognises the language. It doesn’t matter if you use caps or not as html is case insensitive.

Immediately below <!doctype html> you need to enter this tag <html> as this allows you to start writing the document proper. <html> needs to be the last tag in a document so as to close it properly.

Next comes <head> which you close with</head> Everything between these tags is information about the page rather than text that appears on it, including the title that appears in the browser tab which you enter between these tags here <title></title>

Below </head> you enter the tag <body> which closes with </body> Between these tags are the contents of the webpage that you view in the browser. To create a paragraph of text inside the body open with a <p> tag and close it with a </p> and type whatever you want to say between them.

So far your tags should look like this:

 

<!doctype html>
<html>
<head>
<title>

This is a Title! You can type anything you want here!

</title>
<body>
<p>

This is where your text goes, you can type anything.

</p>
</p>
</body>
</html>
Next lesson, headings, lists, links and pictures! Let me know how you’re doing or any questions you have in the comments.

About

I'm an archivist living in Edinburgh. I have an undergraduate degree in medieval history and a special interest in early Christian and pre-Christian religion so I'll be talking about that quite a bit. I also cook, so I'll be posting recipes on here when I think of them.

Tagged with: , , ,
Posted in Learn to Code

Leave a comment

Hours & Info
07736364859
ball.information.management@gmail.com
9am-7pm