0% found this document useful (0 votes)
3 views3 pages

HTML 1

This document provides an introduction to HTML, the foundational language for creating web pages. It covers the basic structure of an HTML document, essential tags, and how to create and display a simple webpage using a text editor and web browser. Additionally, it explains the purpose of various HTML elements and attributes, including the use of the <body> tag and its attributes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

HTML 1

This document provides an introduction to HTML, the foundational language for creating web pages. It covers the basic structure of an HTML document, essential tags, and how to create and display a simple webpage using a text editor and web browser. Additionally, it explains the purpose of various HTML elements and attributes, including the use of the <body> tag and its attributes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

The First course 2024-2025

First Lecture
HTML
The Lectures leads you through the basics of Hyper Text Markup Language (HTML).
HTML is the building block for web pages. You will learn to use HTML to author an

HTML page to display in a web browser.

You will need a text editor, such as Notepad and an Internet browser, such as Internet
Explorer or Netscape.

What is Notepad and where do I get it?

A Notepad is the default Windows text editor. On most Windows systems, click your
Start button and choose Programs then Accessories. It should be a little blue notebook.

What is an html File?

HTML is a format that tells a computer how to display a web page. The documents themselves
are plain text files with special "tags" or codes that a web browser uses to interpret and
display information on your computer screen.

 HTML stands for Hyper Text Markup Language


 An HTML file must have an htm or html file extension
 Tags are enclosed in brackets (< >) and consist of an opening tag and a closing tag.

HTML structure
<HTML>
<HEAD>
<TITLE> Title of your web page </TITLE>
(enter here what document is about)
</head>
<BODY>
(here is the content) and ends with
</BODY>
</HTML>
The <TITLE> of your document appears in the very top line of the user’s browser. If the user
chooses to “Bookmark” your page or save as a “Favorite”; it is the TITLE that is added to
the list.

<BODY>...</BODY> Contains the viewed portion of the document.

Try It?
Open your text editor and type the following text:
<html>
<head>
<title>My First Webpage</title>
</head>
<body>
This is my first homepage.
</body>
</html>

Save the file as mypage.html. Start your Internet browser. Select Open (or Open Page) in
the File menu of your browser. A dialog box will appear. Select Browse (or Choose File)
and locate the html file you just created - mypage.html - select it and click Open. Now you
should see an address in the dialog box, for example C:\MyDocuments\mypage.html.
Click OK, and the browser will display the page.

Example Explained

The first tag in your html document is <html>. This tag tells your browser that this is
the start of an html document. The last tag in your document is </html>. This tag tells your
browser that this is the end of the html document.

The text between the <head> tag and the </head> tag is header information. Header
information is not displayed in the browser window.

The text between the <title> tags is the title of your document. The <title> tag is used to
uniquely identify each document and is also displayed in the title bar of the browser
window.

The text between the <body> tags is the text that will be displayed in your browser.

Basic HTML Tags HTML Elements

This is an HTML element:


Tag Description
<html> Defines an HTML document
<body> Defines the document's body
<h1> to <h6> Defines header 1 to header 6
<p> Defines a paragraph
<br> Inserts a single line break
<hr> Defines a horizontal rule
<!--> Defines a comment
Tag Description
<b> Defines bold text
<big> Defines big text
<i> Defines italic text
<small> Defines small text
<sup> Defines superscripted text
<sub> Defines subscripted text
<u> Deprecated. Use styles instead

The text between the <b> and </b> tags will be displayed in a bold font.

Note: - HTML tags are not case sensitive


<b> means the same as </B>

<b>this text is bold</b>

The HTML element begins with a start tag: <b>


The content of the HTML element is: This text is bold

The HTML element ends with an end tag: </b>


The most important tags in HTML are tags that define headings, paragraphs and line breaks

Body tag and attributes

Tags can have attributes. Attributes can provide additional information about the
HTML elements on your page. The <tag> tells the browser to do something, while the
attribute tells the browser how to do it. For instance, if we add the bgcolor attribute, we can
tell the browser that the background color of your page should be blue, like this:
<body bgcolor="blue">.

You might also like