LESSON 2: WELCOME TO INTRODUCTION TO HTML




What You Will Need For This Lesson:
  • A computer System
  • A web browser
  • text editor like dreamwaver, notepad, notepad ++ and etc
  • local host server like Xamp or Wamp.
HTML is a markup language and makes use of various use of various tags to format the content. These tags are enclosed within angle braces <tag name> that is for opening and </tag name> for closing.

HTML Tags and there Description:

<!DOCTYPE...> This tag defines the document type and HTML version.

<html> This tag encloses the complete HTML documents and mainly comprises of document header which is represented by <head>...</head>and document body which is represented by <body>...</body>tags.

<head> This tag represents the documents header which can keep other HTML tags like <body>, <link>.

<title> A title tag is used inside <head>tag and keeps document title.

<body> This tag represents the documents body which keeps other HTML tags like <h1>, <div>,<p>.

<h1> This tag represents the heading.

<p> This tag represents a paragraph.


Note: For personal improvement I recommend studying or pratcing the HTML tags in other to understand how and when to use them.

A Simple HTML Page Code:

<html>
<head>
<title> The Title of Your Web Page</title>
</head>
<body>
<h1> This is a heading </h1>
<p>The Body or Content Of the page</p>
</body>
</html>

save it in an HTML file by adding the .html extension to it. For example test.html

Running The Code:

open it with your preferred web browser.


Code To Insert An Image To A Page:

you can insert any image in your web page by using

<img> tag. Example <img src=”image URL ...attribute-list”/>

place this code in the desired place you want to image to appear.

Code To Link Pages:

<a href=”http://donraph.blogspot.com”target=”_self”> Click Here To Visit Donraph Blog</a>

this code will display

Click Here To Visit Donraph Blog

and when clicked it will take you to the web address above.


HTML BACKGROUND

By default, your web page background is white in color. You can change it either by using:
  • html background with colors.
  • html background with images.
Html background with colors:

the bgcolor attribute is used to attribute is used to control the background of an html element, specifically page body and table backgrounds. Folowing is the syntax to use bgcolor attribute with any HTML tag.

<tagnamebgcolor=”color_value”>

this color_value can be given in any of the following formats:

<!-- Format 1 – Use clolor name -->
<tablebgcolor=lime>

<!-- Format 2 – Use hex value -->
<tablebgcolor=#f1f1f1>

<!-- Format 3 – Use clolor value in RGB terms -->
<tablebgcolor=”rgb(0,0,120)”>


Html background with images:


<tagnamebackground=”image URL...”a>



PLACE YOUR QUESTIONS AND COMMENT BEFORE YOU CONTINUE TO THE NEXT CLASS
RaphBlog.Com.NG. Powered by Blogger.