Skip to main content

HTML BASICS : CLASS 109 part I

Hello and welcome back to this tutorial series for beginners in web development.
This class introduces the html 'div' tag and form elements.

Let's begin by learning about the html 'div' tag.
"div" stands for division.
It allows you to group and separate content into different sections.
Consider the image below.


The image above shows a common layout (way of arranging elements)  for many web pages.
It consists of;
  1.  a top area called the header, where most sites place a logo and site name as well as navigation links (links to other parts of the website) 
  2. a bottom area called the footer, where most sites place contact information and social media links.
  3. a side bar, which can be on the right side or left side. Some sites have two side bars, one on each side.
  4. and a main content area, where the main content of the page is displayed.
For example.
This blog site has a header at the top. It contains the name of the site 'In Relatable Terms' and a 'SEARCH' option.
It has a single side bar, on the right side (scroll to the top of site to see it). It consists of a SHARE link (which you are encouraged to use) and some labels below it.
The main section consists of the main blog content i.e. this particular text you are reading  , a comment section and a few popular posts on this blog (scroll down to see).
The footer area has the 'Powered by Blogger' link.

The html 'div' tag is used to divide webpage content into sections like these.
It has an opening <div> and a closing tag </div>.

Now, let's learn a bit about forms.
Forms allow website users/visitors to provide some kind of information, such as username and password in order to sign in, comments, words to search in the website e.t.c.

A form is made up of several elements, each of which is used to obtain specific kind of information.
A form has an opening tag <form> and a closing tag </form>
Inside the tags, the form elements are specified.
We shall learn three common form elements, for now;
  1. Input element. This is used to obtain small text input from a user, such as name, password, telephone number, email etc.
  2. Textarea element. This allows users to provide a lot more text compared to the input element above. It is commonly used to create a comment section, such as the one below.
  3. Button. This is a clickable form element that is used to trigger (cause) a certain action to occur. For example, a sign in button is clicked when a user is done filling in the login form in order to sign/log the user in.

In the next part, we shall practically see how the above elements function.






Comments

Popular posts from this blog

CSS BASICS : CLASS 107

Hello and welcome back to this series of tutorials for beginners in web development. So far we have a simple html page and a css file linked to it. We begin this tutorial by creating new html and css files, in the same folder as where my_site.html is located. We shall call them index.html and index.css respectively. Done? Great! Link the two files together , by opening up index.html in your text editor (e.g. Sublime Text) and typing the following code below the closing title tag  </title>  and before the closing head tag </head> :               <link rel="stylesheet" type="text/css" href="index.css"> Inside the body of your html (i.e after <body> and before </body>),  type the following html code :              <p> This is a paragraph </p>              <p> This is a second paragraph </p>              <p> This is a third paragraph </p> Save your index.html file. Then open the

HTML BASICS : TEST YOURSELF

Hello and welcome back. Test your knowledge of the concepts we have learnt so far, by creating a website that looks as seen in images the below, before continuing with the next part.   Click on each image to zoom in (or better yet, save them in your pc). You can get the image used by clicking here . As always, if you have any questions / comments, leave them in the comment section below.

CSS BASICS : CLASS 109 part III

Hello and welcome back to this tutorial series  for beginners in web development with HTML & CSS. We have been discussing form and div elements in the previous sections of this class (see class 109 part I and II ). You should have 2 files, one sections.html file and another sections.css file linked to it. Next, we will discuss the css code we used in the sections.css, particularly 2 new attributes ' display ' and ' float ' .  This is the CSS code that we used to style our sections.html page. #header{     background-color: grey;     padding-top: 5px;     padding-bottom: 5px;     padding-left: 15px; } h2{     margin: 0px;     color: white; } #content{     padding-left: 15px; } p{     display: inline-block;     float: left;     margin-right: 50px; } form{     display: inline-block;     border-left: 2px solid grey;     padding: 12px; } input{     display: block;     margin-bottom: 24px;     width: 200px;     padding: 8px; } textarea{     display: block;     margi