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

HTML Question Answers

The document discusses various HTML tags and their usage. It provides examples of common text formatting tags like <p>, <b>, <i>, headings tags <h1> to <h6>, and layout structure tags like <body> and <html>. It also demonstrates how to insert images, tables, hyperlinks, and control line breaks. Tags like <a>, <img>, <table> and their attributes are explained along with sample code snippets.

Uploaded by

Abhay Petkar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

HTML Question Answers

The document discusses various HTML tags and their usage. It provides examples of common text formatting tags like <p>, <b>, <i>, headings tags <h1> to <h6>, and layout structure tags like <body> and <html>. It also demonstrates how to insert images, tables, hyperlinks, and control line breaks. Tags like <a>, <img>, <table> and their attributes are explained along with sample code snippets.

Uploaded by

Abhay Petkar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

What are Tags? Explain with html codes.

<tag> content </tag>

How to create Paragraphs in HTML Page? Write the codes


Explanation
How many types of heading does an HTML contain?
<h1> to <h6>
Describe HTML layout structure with sample code.
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>This is a Heading</h1>
<p>This is a paragraph.</p>

</body>
</html>
How to control the line breaks and spaces with the <pre> tag? Explain with examples.
!DOCTYPE html>
<html>
<body>

<p>The pre tag preserves both spaces and line breaks:</p>

<pre>
I love myself
I am masterpiece
</pre>

</body>
</html>
<p> My Bonnie lies over the ocean. My Bonnie lies over the sea. My Bonnie lies over the
ocean.</p>
Consider the above paragraph lines and apply the proper style formatting tag to set the font
size to 100 px, font family to verdana, text alignment to center, text color to blue.

<p style= "font-size:100%; font-family:verdana;text-align:center;color:blue;" >


My Bonnie lies over the ocean. My Bonnie lies over the sea. My Bonnie lies over the
ocean.</p>
Create the navigation tab for the given items using HTML as follows:
About, Advantages and Disadvantages, Types of Cyber security & Quiz and create the
href attribute for all list.
<li><a href="#about">About</a></li>
<li><a href="#Adv">Advantages and Disadvantages</a></li>
<li><a href="#Types">Types of Cyber Security</a></li>
<li><a href="#quiz">Quiz</a></li>
1. <p> Engineering is a discipline dedicated to problem solving. </p>
2. <p> Our built environment and infrastructure, the devices we use to communicate, the
processes that manufacture our medicines, have all been designed, assembled or managed by an
engineer.</p>
3. <p> Find solutions to some of the world's most complex challenges.</p>
4. <p> Find solutions to some of the world's most complex challenges problems </p>

Apply the correct formatting tag to above paragraph


1. Apply proper tag to mark the text to bold given in point 1
2. Apply proper tag to mark the text to italic given in point 2
3. Apply proper tag to highlight the text given in point 3.
4. Apply proper tag to strikeout the given text given in point 4.
<p><b>This text is bold.</b></p>
<p><i>This text is italic.</i></p>
<p> <mark> Find solutions to some of the world's most complex challenges </mark>.</p>
<p>Find solutions to some of the world's most complex <del>challenges</del> problems</p>
How many tags can be used to separate a section of texts? Explain with example.
Explanation: <br> tag , <p> tag , <pre> tag
How to make a picture of a background image of a web page? Explain with codes to resize the
width and height of images.
<!DOCTYPE html>
<html>
<body>

<h2>Background Image</h2>

<p>A background image for a div element : </p>

<div style="background-image: url(‘I:\html.jpg');">

You can specify background images<br>


for any visible HTML element.<br>
</div>

What are the various formatting tags in HTML? Explain with examples
<b>
<i>
<u>
<big>
<small>
<sub>
<sup>
<del>
<strong>
<mark>
<ins>
How to use the figure tag in HTML? Explain with codes.
<p>Taj Mahal </p>
<figure>
<img src="htmlpages/images/tajmahal.jpg" alt="Taj Mahal"/>
</figure>
Difference between link tag <link> and anchor tag <a>? Show with example codes.
Refer class 1 HTML notes
How to create a hyperlink in HTML? Write sample code for inserting hyperlink in HTML page.
<!DOCTYPE html>
<html>
<body>
<h2>The href Attribute</h2>
<p>HTML links are defined with the a tag. The link address is specified in the href
attribute:</p>
<a href="https://www.sanjivanicoe.org.in">Visit My College Website</a>
</body>
</html>

Which HTML tag is used to display the data in the tabular form? Write sample code for
inserting the table in HTML page. (2*3 matrix)
<!DOCTYPE html>
<html>
<style>
table, th, td {border:1px solid blue;}
</style>
<body>
<h2>A basic HTML table</h2>
<table style="width:80%">
<tr>
<th>Company</th>
<th>Country</th>
</tr>
<tr>
<td> TCS</td>
<td>India</td>
</tr>
<tr>
<td> wipro</td>
<td>singapore</td> </tr>
</table>
</body>
</html>

Company Contact Country

TCS RAHUL INDIA

WIPRO TANMAY SINGAPORE

You might also like