0% found this document useful (0 votes)
2 views5 pages

Web Answers

The document explains key concepts of web development, including the differences between web servers and browsers, HTML tags and elements, and how to embed multimedia content. It also covers various HTML list types, heading tags, hyperlinks, forms, and CSS integration, including selectors and the box model. Additionally, it discusses conflict resolution in CSS and different link states.
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)
2 views5 pages

Web Answers

The document explains key concepts of web development, including the differences between web servers and browsers, HTML tags and elements, and how to embed multimedia content. It also covers various HTML list types, heading tags, hyperlinks, forms, and CSS integration, including selectors and the box model. Additionally, it discusses conflict resolution in CSS and different link states.
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/ 5

Web answers

1)Explain the following with examples:


a. Webserver Vs Web browser
 Webserver: A web server is software or hardware that stores, processes, and delivers
web pages to clients (browsers). Example: Apache, Nginx.
 Web browser: A web browser is an application that retrieves and displays web
content. Example: Google Chrome, Mozilla Firefox.
b. HTML Tag Vs Element
 HTML Tag: A tag is a keyword enclosed in angle brackets (<>). Example: <p>,
<h1>.
 HTML Element: An element consists of a start tag, content, and an end tag.
Example: <p>This is a paragraph</p>.
----------------------------------------------------------------------------------------------------------------
2) Do all HTML tags have an end tag?
No, not all HTML tags require an end tag. Examples of tags without an end tag:
1. <br> (Line break)
2. <img> (Image)
3. <meta> (Metadata)
----------------------------------------------------------------------------------------------------------------
3) How can you embed audio, video, and images into a webpage?
 Audio: <audio controls><source src="audio.mp3" type="audio/mpeg"></audio>
 Video: <video controls><source src="video.mp4" type="video/mp4"></video>
 Image: <img src="image.jpg" alt="Sample Image">
4)

5) Describe the following with examples:


a. Types of lists
1. Ordered List (<ol>):

<ol>
<li>Item 1</li>
<li>Item 2</li>
</ol>
2. Unordered List (<ul>):
<ul>
<li>Item A</li>
<li>Item B</li>
</ul>
b. Various heading tags
HTML supports six heading tags: <h1> to <h6>. Example:
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
------------------------------------------------------------------------------------------------------------

6) Does a hyperlink only apply to text?


No, hyperlinks can apply to images, buttons, and other elements. Example:
<a href="https://example.com"><img src="image.jpg" alt="Clickable Image"></a>

7) <form>
Name: <input type="text" name="name"><br><br>
<p>HTML stands for:</p>
<input type="radio" name="html" value="1"> HighText Machine Language <br>
<input type="radio" name="html" value="2"> HyperText Markup Language <br>
<input type="radio" name="html" value="3"> None of these <br><br>

<p>Your Education Details:</p>


<input type="checkbox" name="education" value="CBSE"> CBSE/ICSE/SSC <br>
<input type="checkbox" name="education" value="Intermediate"> Intermediate/10+2 <br>
<input type="checkbox" name="education" value="Diploma"> Diploma <br><br>

<input type="submit" value="Submit">


</form>
---------------------------------------------------------------------------------------------------------------

8) a. Without <!DOCTYPE html> will HTML5 work?


Yes, but the browser will switch to quirks mode, leading to inconsistent rendering.
b. How can you use comments in HTML?
 Single-line comment: <!-- This is a comment -->
 Multi-line comment:
<!--
This is a
multi-line comment
-->

9) Can you scroll something using HTML code?


Yes, using the <marquee> tag (deprecated) or CSS. Example:
<marquee>Scrolling Text</marquee>

10) How to include CSS in a webpage?


 Inline CSS: <p style="color: red;">Text</p>
 Internal CSS:
<style>
p { color: blue; }
</style>
 External CSS:
<link rel="stylesheet" href="style.css">

11) What are the different types of Selectors in CSS?


1. Element Selector: p { color: red; }
2. Class Selector: .myClass { font-size: 16px; }
3. ID Selector: #myId { background-color: yellow; }
4. Attribute Selector: [type="text"] { border: 1px solid; }
5. Pseudo-class Selector: a:hover { color: green; }

12) (a) What is the Box Model in CSS? Which CSS properties are a part of it?
The CSS Box Model is a fundamental concept that describes how elements are
structured and spaced in a webpage. It consists of four main parts:
 Content
 Padding
 Border
 Margin

(b) What is z-index, and how does it function?The z-index property in CSS
determines the stack order of elements on a webpage. Elements with a higher z-index
value will appear in front of elements with a lower z-index value.
13) Explain in brief about conflict resolution in CSS
When multiple CSS rules apply to the same element, the browser follows a conflict
resolution process to determine which rule takes effect. This process is based on the
following factors:
 Specificity
 Source order
 Inheritance
 Important (!important) declaration

14) Sample CSS code including padding and effects


.box {
padding: 20px;
border: 2px solid black;
box-shadow: 5px 5px 10px gray;
}

15) What are the different CSS link states?


1. a:link - Normal state
2. a:visited - After clicking
3. a:hover - When mouse hovers
4. a:active - When clicked

You might also like