HTML For Beginners The Easy Way Start Learning HTML & CSS Today »
HTML For Beginners The Easy Way Start Learning HTML & CSS Today »
MENU !
Contents [hide]
The aim is to show you ‘how’ to create your first web page
without spending the entire tutorial focusing too much on the
“why.”
What is HTML?
<h1> </h1>
Most tags must be opened and closed in
order to function.
In this instance, the image source (src) and the alt text (alt)
<img>
are attributes of the tag.
<tag>
1. The vast majority of tags must be opened ( ) and
</tag>
closed ( ) with the element information such as a
title or text resting between the tags.
2. When using multiple tags, the tags must be closed in the
order in which they were opened. For example:
HTML Editors
Now that we’ve gotten the basic theory out of the way. It’s
time to learn how to build our first website.
First off, we must ensure that we have the right tools. Most
important, we need an HTML editor.
Sublime Text 3
Pros
Easily customizable
Beginner-friendly
Pleasant color schemes to choose from.
Cons
Notepad ++
This is Notepad ++. Far from glamorous but does the job.
Pros
Distraction-free interface
Auto-completion feature
Plugin options for extended functionalities.
Cons
Komodo Edit
It is free to download.
Komodo isn’t one for a flash interface either but is simple to use.
Pros
Cons
No autocompletion by default
Visual settings are difficult to find and change.
What To Avoid
First off, you need to open your HTML editor, where you will
find a clean white page on which to write your code.
From there you need to layout your page with the following
tags.
<!DOCTYPE html>
— This tag specifies the language
you will write on the page. In this case, the language is
HTML 5.
<html>
— This tag signals that from here on we are
going to write in HTML code.
<head>
— This is where all the metadata for the page
goes — stuff mostly meant for search engines and other
computer programs.
<body>
— This is where the content of the page goes.
Further Tags
<head>
Inside the tag, there is one tag that is always
<title>
included: , but there are others that are just as
important:
<title>
This is where we insert the page name as it will appear
at the top of the browser window or tab.
<meta>
This is where information about the document is
stored: character encoding, name (page context),
description.
<head>
Let’s try out a basic section:
<head>
<title>My First Webpage</title>
<meta charset="UTF-8">
<meta name="description" content="This
field contains information about your
page. It is usually around two sentenc
es long.">.
<meta name="author" content="Conor She
ils">
</header>
Adding Content
<body>
Next, we will make tag.
<body>
The HTML is where we add the content which is
designed for viewing by human eyes.
<h1>
<h2>
<h3>
<h4>
<h5>
<h6>
<h1> <h2>
As you might have guessed and should be used
for the most important titles, while the remaining tags should
be used for sub-headings and less important text.
<h1>Welcome to My Page</h1>
Well let’s not get carried away; we’ve still got loads of great
features that we can add to your page.
Let’s try it out. On a new line in the HTML editor, type the
following HTML code:
Don’t forget to hit save and then refresh the page in your
browser to see the results.
<a href="https://blogging.com/how-to-
start-a-blog/">Your Link Text Here </a>
The first part of the attribute points to the page that will
open once the link is clicked.
If you are building your own website then you will most likely
host all of your pages on professional web hosting. In this
case, internal links on your website will <a href=”
mylinkedpage.html”>Linktle Here</a>.
<a
href="http://www.google.com">Google</a>
This will create a link to Google on page 2. Hit save and return
to your index.html page.
<a
href="*folder(s)*/page2.html">Page2</a>
You can check the file type of an image by right-clicking the item
and selecting ‘Properties’.
You can also define borders and other styles around the
image using the class attribute. However, we shall cover this
in a later tutorial.
The file types generally used for image files online are: .jpg,
.png, and (less and less) .gif.
Ordered List
1. An item
2. Another item
3. Another goes here.
Inside the <ol> tag we list each item on the list inside <li>
</li> tags.
For example:
<ol>
<li>An item </li>
<li>Another item </li>
<li>Another goes here </li>
</ol>
Unordered List
The second type of list that you may wish to include is an <ul>
unordered list. This is better known as a bullet point list and
contains no numbers.
<ul>
<li>This is </li>
<li>An Unordered </li>
<li>List </li>
</ul>
Definition List
HTML
Hypertext markup language is a programming
language used to create web pages and is rendered by
a web browser.
<dl>
<dt>Item</dt>
<dd>The definition goes here</dd>
</dl>
Let’s try it out. Open index.html and on a new line, enter the
following HTML: