Page 32 - DCAP202_Fundamentals of Web Programming
P. 32
Unit 3: HTML Command and Structure
Notes
3.5.4 Moving Text
3.6 Summary
3.7 Keywords
3.8 Review Questions
3.9 Further Readings
Objectives
After studying this unit, you will be able to:
Understand the uses of HTML commands
Explain the structure of HTML program
Describe the text formatting tags
Define text styles
Explain the effect of text
Introduction
Hypertext Markup Language (HTML) is the main markup language for creating web pages and
other information that can be displayed in a web browser.
HTML is written in the form of HTML elements consisting of tags enclosed in angle brackets
(like <html>), within the web page content. HTML tags most commonly come in pairs like <h1>
and </h1>, although some tags, known as empty elements, are unpaired, for example <img>. The
first tag in a pair is the start tag, the second tag is the end tag (they are also called opening tags and
closing tags). In between these tags web designers can add text, tags, comments and other types of
text-based content.
The purpose of a web browser is to read HTML documents and compose them into visible or
audible web pages. The browser does not display the HTML tags, but uses the tags to interpret
the content of the page.
HTML elements form the building blocks of all websites. HTML allows images and objects to be
embedded and can be used to create interactive forms. It provides a means to create structured
documents by denoting structural semantics for text such as headings, paragraphs, lists, links,
quotes and other items. It can embed scripts written in languages such as JavaScript which affect
the behavior of HTML web pages.
3.1 Html Commands
Tags typically occur in begin-end pairs. These pairs are in the form tag> ... </tag> Where the
<tag> indicates the beginning of a tag-pair, and the </tag> indicates the end. (The three dots
indicate an arbitrary amount of content between the tags.). These pairs define containers. Any
content within a container has the rules of that container applied to it.
Example: The text within a “boldface container” would be boldfaced.
Similarly, paragraphs are defined using a “paragraph container.”
Some commands do not consist of a begin and end tag, but just of a single tag. In HTML, this is
just a begin tag:<tag>
LOVELY PROFESSIONAL UNIVERSITY 25