reading-notes

My reading notes journal for Code Fellows

View the Project on GitHub

Read: 01 - Introduction to HTML

Clients and servers

Computers connected to the internet are called clients and servers.

Two circles representing client and server. An arrow labelled request is going from client to server, and an arrow labelled responses is going from server to client

Clients are the typical web user’s internet-connected devices (for example, your computer connected to your Wi-Fi, or your phone connected to your mobile network) and web-accessing software available on those devices (usually a web browser like Firefox or Chrome). Servers are computers that store webpages, sites, or apps. When a client device wants to access a webpage, a copy of the webpage is downloaded from the server onto the client machine to be displayed in the user’s web browser.

So what is HTML?

HTML is a markup language that defines the structure of your content. HTML consists of a series of elements, which you use to enclose, or wrap, different parts of the content to make it appear a certain way, or act a certain way. The enclosing tags can make a word or image hyperlink to somewhere else, can italicize words, can make the font bigger or smaller, and so on. For example, take the following line of content:

My cat is very grumpy If we wanted the line to stand by itself, we could specify that it is a paragraph by enclosing it in paragraph tags:

My cat is very grumpy

Copy to Clipboard

Nesting elements

You can put elements inside other elements too — this is called nesting. If we wanted to state that our cat is very grumpy, we could wrap the word “very” in a element, which means that the word is to be strongly emphasized:

My cat is very grumpy.

Copy to Clipboard You do however need to make sure that your elements are properly nested. In the example above, we opened the <p> element first, then the element; therefore, we have to close the element first, then the <p> element. The following is incorrect:

My cat is very grumpy.</p> The elements have to open and close correctly so that they are clearly inside or outside one another. If they overlap as shown above, then your web browser will try to make the best guess at what you were trying to say, which can lead to unexpected results. So don't do it!