C-7_CH-7
C-7_CH-7
HTML
<HTML>
<HEAD>
<TITLE>MY PROGRAM</TITLE>
</HEAD>
<BODY>
…
</BODY>
</HTML>
Tag: a tag is a fundamental building block that defines elements within a web page. Tags
are used to create and structure content, such as headings, paragraphs, links, images, and
more.
A tag having opening and closing tag is known as container tag
Example <body>, <html>, <h1> etc
A tag having only opening tag is known as empty tag
Example <Img>, <br>,<hr> etc
Content: refers to the text, images, multimedia, and other elements that are displayed on a
web page.
Attributes: provide additional information about HTML elements.
Attribute value: is information that you give to an HTML element to control its behavior or
appearance. It comes after the attribute name and is usually enclosed in quotes.
TAGS OF HTML
1. <HTML>: The root element that wraps all the content on the webpage.
2. <HEAD>: Contains meta-information about the document, like the title.
3. <TITLE>: Sets the title of the webpage, displayed in the browser tab.
4. <BODY>: Contains the main content of the webpage that is displayed to users.
5. Heading Tags: In HTML there are six levels of heading where <H1> is the largest
heading and <H6> is the smallest in terms of font.
Example: <H1>, <H2>, <H3>, <H4> <H5> and<H6>
6. <FONT> Tag : this tag is used to change the appearance of the text.
ATTRIBUTES
TYPE Describe the type of ordered list Ex: ABC… , 123… , abc… , I,II,III… , i,ii,iii…
START Defines the starting number in an ordered list.
TYPE Describe the type of unordered list Ex: disc(, circle and square.
11. Image Tag: Image <IMG> tag is used to add image in the HTML document.
ATTRIBUTES
Src The location of image where we can retrieve the image source
Height Its define the height of the image in % or pixels
Width It defines the width of the image in % or pixels
Align It defines the alignment of the image.
Border It gives the border/outline to the image
Alt It give the alternate text if the browser fails to load the image
MCQs
9. Which of the following best describes the role of HTML in web development?
a. It is used for server-side scripting.
b. It is used for database management.
c. It is the foundation of all web content.
d. It is primarily for styling web pages.
Correct answer: C. It is the foundation of all web content.