0% found this document useful (0 votes)
34 views

C-7_CH-7

Uploaded by

mehwish.khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

C-7_CH-7

Uploaded by

mehwish.khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

L-7

HTML

Q.1 What is HTML?


● HTML stands for Hyper Text Markup Language
● HTML is the standard markup language for creating Web pages
● HTML describes the structure of a Web page
● HTML consists of a series of elements
● HTML elements tell the browser how to display the content

Q.2 What is the structure of HTML?


Structure is also known as framework of HTML, these tags are must to use in any HTML
program

<HTML>
<HEAD>
<TITLE>MY PROGRAM</TITLE>
</HEAD>
<BODY>

</BODY>
</HTML>

Q.3 What are tags, content, attributes and value?

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.

attribute content closing tag


<P ALIGN=”CENTER”>I AM WRITING CODES</P>
tag value
Q.4 Differentiate between Webpage and Website.
Ans Webpage: is a single document on the internet, typically written in HTML and accessible
through a web browser. It can contain text, images, videos, and hyperlinks.
Website is a group of related web pages that you can visit on the internet.

Q.5 Complete the table


1. Editor/ software used to write codes of HTML Notepad++

2. Extension to save the file with .html/.htm

3. Creator of HTML Tim Berners-Lee

4. In which year HTML was developed 1991

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

Color <font color= “Yellow”> This paragraph is in yellow color </font>


Size <font size = 100 > This is my paragraph </font>
face <font face = “Times New Roman”> This paragraph is in different font style
</font>

7. <P>: Defines a paragraph of text.


ATTRIBUTES

Align <p align="center">This paragraph is centered.</p>


8. <BR>: is used to create a line break within text. It is an empty tag, meaning it does
not have a closing counterpart (like </br>).
9. <HR>: is used to create a horizontal rule or line that visually separates content on
a webpage. It is an empty tag, meaning it does not require a closing tag (like
</hr>).
10. List Tags: The two most common types of lists are unordered lists and ordered
lists.
<OL> : OL stands for ordered list which is used to define order/ sequence of list.
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.

Code: <OL type=”A” start=”5”> Output: E


F
G

<UL> : UL stands for unordered or bulleted list.


ATTRIBUTES

TYPE Describe the type of unordered list Ex: disc(, circle and square.

Code: <OL type=”circle” start=”5”> Output: E


F
G

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

1. What does HTML stand for?


a. HighText MultiLanguage
b. HyperText Markup Language
c. HighText Markup Language
d. HyperText MultiLanguage
Correct answer: B. HyperText Markup Language

2. Why is HTML considered the backbone of web pages?


a. It provides visual design elements.
b. It manages user interactions.
c. It allows for multimedia integration.
d. It provides structure and meaning to the content.
Correct answer: D. It provides structure and meaning to the content.

3. Which of the following is an example of text formatting tags in HTML?


a. <P>Menu</P>
b. <Font color=”red”>Menu</Font>
c. <Hr>
d. <Br>
Correct answer: B. <Font color=”red”>Menu</Font>

4. The editor used to write codes of HTML


a. Notepad
b. Notepad++
c. Both of these
d. None of the above
Correct answer: C. Both of these

5. Which section of an HTML document contains the content displayed on the


webpage?
a. <head>
b. <footer>
c. <body>
d. <title>
Correct answer: C. <body>
6. What is the primary function of the <img> tag in HTML?
a. To define a header
b. To create a hyperlink
c. To insert an image
d. To create a paragraph
Correct answer: B. To create a hyperlink

7. What do attributes in HTML tags provide?


a. Additional information about the element
b. Visual styling
c. Script execution
d. Content organization
Correct answer: A. Additional information about the element

8. What is the purpose of the <head> section in an HTML document?


a. To create hyperlinks
b. To contain meta-information about the webpage
c. To define the footer
d. To display the main content
Correct answer: B. To contain meta-information about the webpage

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.

10. Which of the following statements about HTML tags is true?


a. Tags are always self-closing.
b. Tags usually come in pairs: an opening tag and a closing tag.
c. Tags can only be used in the <head> section.
d. Tags always require attributes.
Correct answer: B. Tags usually come in pairs: an opening tag and a closing tag.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy