Chapter:10 Hyper Text Markup Language
1. Fill in the blanks:
(a) HTML was developed by Tim Berners Lee in 1990. (b) The full form of HTML is Hyper Text Mark up Language. (c) Paired tag contains Opening tag and closing tag. (d) Examples of singular tags are <BR> and <IMG>. (e) There are six levels of the heading tag. (f) An image can be inserted into the HTML document using <img> tag. (g) Pictures or images are added to the HTML document to make it more attractive. (h) <marquee> tag provides scrolling text. (i) Examples of pair tags are <body> and <head> tag.2. State whether the following statements are true or false:
(a) HTML is a programming language. False (b) HTML tags are not case sensitive. True (c) Tim Berners Lee developed HTML. True (d) Pair tags must not have a closing tag. False (e) </line> tag is used to insert a vertical line. False (f) If the specified font is not available then the browser used the default font. True (g) An image can be inserted in the web page using <img> tag. True (h) A table is a collection of data with rows and columns. True (i) A table header row is defined with <TD> tag. False3. Write down the syntax and purpose of the following HTML tags:
HTML Tags: Syntax and Purpose
i. <body>
Syntax:
<body>
<!-- Content of the webpage -->
</body>
Purpose:
Defines the main content area of the webpage that is visible to the user.
ii. <p>
Syntax:
<p>This is a paragraph.</p>
Purpose:
Defines a paragraph in the text content. It is used to group sentences or phrases.
iii. <tr>
Syntax:
<tr>
<td>Row data 1</td>
<td>Row data 2</td>
</tr>
Purpose:
Defines a row in an HTML table.
iv. <font>
Syntax:
<font color="red" size="4" face="Arial">This is styled text.</font>
Purpose:
Specifies the font, size, and color of the text. (Deprecated in modern HTML; use CSS instead.)
v. <a>
Syntax:
<a href="https://example.com">Click here</a>
Purpose:
Defines a hyperlink, allowing users to navigate to other pages or resources.
vi. <marquee>
Syntax:
<marquee>Scrolling text goes here.</marquee>
Purpose:
Creates scrolling text or images. (Deprecated; not recommended in modern HTML.)
vii. <img>
Syntax:
<img src="image.jpg" alt="Description of the image">
Purpose:
Inserts an image into the webpage.
viii. <body>
(Duplicate with i)
ix. <b>
Syntax:
<b>This text is bold.</b>
Purpose:
Makes the enclosed text bold. (For semantic emphasis, use <strong>
instead.)
x. <u>
Syntax:
<u>This text is underlined.</u>
Purpose:
Underlines the text. (Deprecated; use CSS for styling instead.)
xi. <title>
Syntax:
<title>Page Title</title>
Purpose:
Defines the title of the webpage, displayed on the browser tab.
xii. <table>
Syntax:
<table border="1">
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
</tr>
</table>
Purpose:
Creates a table for displaying data in rows and columns.
4. Answer the following questions in short:
Answers
a. Who had developed HTML?
HTML (HyperText Markup Language) was developed by Tim Berners-Lee in 1991.
b. In which language, HTML was based?
HTML was based on SGML (Standard Generalized Markup Language).
c. What are tags?
Tags are the building blocks of HTML, used to define elements and structure content on a webpage. They are enclosed in angle brackets (e.g., <tag>
).
d. Which tag is used to start HTML codes?
The <html>
tag is used to start HTML codes.
e. Inside which tags table-related tags are written?
Table-related tags are written inside the <table>
tag.
f. Which tag is used to break the line?
The <br>
tag is used to insert a line break.
5. Answer the following questions:
(a) What is HTML? Explain it in brief.
HTML (HyperText Markup Language) is the standard language used to create and structure content on the web. It uses a system of tags to format text, images, links, and multimedia elements for browsers.
(b) What are Pair Tags? Give examples.
Pair tags have an opening tag and a closing tag. The content is enclosed between these tags.
Example:
<b>Bold Text</b>
<p>Paragraph</p>
(c) What are Singular Tags? Give examples.
Singular tags do not have a closing tag and stand alone. They are self-closing in HTML5.
Example:
<br> (Line break)
<img src="image.jpg" alt="Image">
(d) Explain the Basic Tags of HTML.
<html>
: Root element, defines the HTML document.<head>
: Contains metadata like title and links to stylesheets.<title>
: Sets the title of the web page.<body>
: Contains the visible content of the web page.<p>
: Defines a paragraph.<a>
: Creates a hyperlink.<img>
: Embeds images.
(e) What are Attributes of Tags? Explain the Attributes of <body>
Tag.
Attributes are properties added to HTML tags to modify their behavior or appearance.
Attributes of <body>
tag:
background
: Sets the background image.bgcolor
: Sets the background color.text
: Defines the text color.link
: Defines the color of hyperlinks.vlink
: Defines the color of visited links.margin
: Sets the page margins.
(f) What is a Table? Explain the Different Tags Supported by a Table.
A table organizes data into rows and columns.
Table Tags:
<table>
: Defines a table.<tr>
: Defines a table row.<th>
: Defines a header cell.<td>
: Defines a data cell.<caption>
: Adds a title to the table.<thead>
and<tbody>
: Organize table sections.
(g) What are Lists? Explain the Different Types of List Supported by HTML.
Lists are used to display content in a structured format.
Types of Lists:
- Ordered List (
<ol>
): Displays items in a numbered format.<ol> <li>Item 1</li> <li>Item 2</li> </ol>
- Unordered List (
<ul>
): Displays items with bullet points.<ul> <li>Item A</li> <li>Item B</li> </ul>
- Definition List (
<dl>
): Defines terms and their descriptions.<dl> <dt>Term</dt> <dd>Description</dd> </dl>
(h) What Do You Mean by Formatting a Page? Explain Different Character Formatting Tags.
Formatting a page refers to structuring and styling text or elements for better presentation.
Character Formatting Tags:
<b>
: Bold text.<i>
: Italic text.<u>
: Underlined text.<mark>
: Highlighted text.<sup>
and<sub>
: Superscript and subscript text.<small>
: Displays smaller text.
(i) What is a Link? Explain Different Types of Links Supported by HTML.
A link (hyperlink) connects a web page to another page, document, or resource.
Types of Links:
- Internal Link: Links to another section of the same page.
<a href="#section1">Go to Section 1</a>
- External Link: Links to an external website.
<a href="https://example.com">Visit Example</a>
- Email Link: Opens an email client.
<a href="mailto:someone@example.com">Send Email</a>
- Anchor Link: Links to a specific part of a page using an ID.
<a href="#footer">Go to Footer</a>
(j) What Are the Two Different Components of a Link? Explain with an Example.
- Anchor Text: The clickable text of the link.
- Href (Hypertext Reference): The URL or location the link points to.
Example:
<a href="https://example.com">Click Here</a>
- Anchor Text:
Click Here
- Href:
https://example.com
(k) Define Hyperlink. Why Is It Necessary to Use Hyperlink in a Document?
A hyperlink is a clickable element that connects to another document, webpage, or resource.
Necessity:
- Enhances navigation between web pages.
- Links to external resources.
- Improves user experience.
- Provides quick access to information.
No comments:
Post a Comment