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

HTML_Important_Questions

The document provides a comprehensive overview of HTML, including its definition, structure, and various elements such as lists, tables, multimedia incorporation, and CSS integration. It outlines key HTML tags and attributes, along with examples for better understanding. Additionally, it discusses CSS selectors and the creation of navigation bars, both text-based and graphical.

Uploaded by

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

HTML_Important_Questions

The document provides a comprehensive overview of HTML, including its definition, structure, and various elements such as lists, tables, multimedia incorporation, and CSS integration. It outlines key HTML tags and attributes, along with examples for better understanding. Additionally, it discusses CSS selectors and the creation of navigation bars, both text-based and graphical.

Uploaded by

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

HTML Important Questions & Answers

1. What is HTML? Describe a structure of an HTML document as well as text formatting tags.
HTML (HyperText Markup Language) is the standard language for creating web pages. It provides
the structure of web pages using elements and tags.

Basic Structure of an HTML Document:


<!DOCTYPE html>
<html>
<head>
<title>My Page</title>
</head>
<body>
<h1>Welcome</h1>
</body>
</html>

Text Formatting Tags: <b>, <i>, <u>, <sup>, <sub>, <mark>

2. Explain in detail HTML list element.


HTML provides three types of lists:
1. Ordered List (<ol>)
2. Unordered List (<ul>)
3. Definition List (<dl>).

3. How to create a CSS file & elaborate on constructing style?


A CSS file (.css) defines styles for an HTML page.
Example:
body { background-color: lightgray; }

4. Explain various attributes to create a table along with examples & output.
The <table> tag is used to create tables. Key attributes: border, cellpadding, cellspacing, rowspan,
colspan.
Example:
<table border='1'><tr><th>Name</th><th>Age</th></tr><tr><td>John</td><td>25</td></tr></table>

5. How are multimedia objects incorporated in HTML?


Use <audio> and <video> tags.
Example:
<audio controls><source src='audio.mp3'></audio>
<video controls><source src='video.mp4'></video>

6. Write a program to format different text using a style sheet.


Create styles.css and link it in HTML.
Example:
.heading { color: blue; }
<p class='heading'>Styled Text</p>

7. Elaborate on the link tag with an example.


The <a> tag is used to create hyperlinks.
Example:
<a href='https://google.com' target='_blank'>Google</a>

8. Explain CSS selectors in detail.


CSS selectors:
1. Element: p {color: red;}
2. Class: .myClass {font-size: 20px;}
3. ID: #myID {background-color: yellow;}

9. Elaborate on preparing graphics for web use.


Use optimized formats (PNG, JPEG, SVG). Use CSS for simple graphics.
Example:
.box { width: 100px; height: 100px; background: red; }

10. Outline to create a text-based & graphical navigation bar.


Use <nav> for text-based navigation.
Example:
<nav><a href='home.html'>Home</a></nav>
For graphical, use CSS styles and hover effects.

You might also like