0% found this document useful (0 votes)
24 views6 pages

CS202 Mid Term Subjective File by Tanveer Online Academy (1)

CS202 Mid Term Subjective File by Tanveer Online Academy (1)

Uploaded by

bc230402749has
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)
24 views6 pages

CS202 Mid Term Subjective File by Tanveer Online Academy (1)

CS202 Mid Term Subjective File by Tanveer Online Academy (1)

Uploaded by

bc230402749has
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/ 6

CS202 – Fundamentals of Front End Development

Mid Term Subjective File by Tanveer Online Academy

Join

Us

WhatsApp:
https://wa.me/923455828811

YouTube Channel:
https://www.youtube.com/c/TanveerOnlineAcademy

Facebook Page:
https://web.facebook.com/TanveerOnlineAcademyOfficial

Facebook Group:
https://web.facebook.com/groups/1111267279027720

Website:
https://tanveeronlineacademy.blogspot.com/

Email:
[email protected]
CS202 Mid Term Subjective File by Tanveer Online Academy

Write the code in CSS for table with border 1px and background color should be green.

(3𝗆𝖺𝗋𝗄𝗌)

Answer:

table

border: 1px solid black; /* 1px solid black border */

background-color: green; /* Green background color */

H2O is given as text and you have to write 2 is subscript.

Answer:

To write H2O with the "2" as a subscript, you can use HTML formatting as follows:

H<sub>2</sub>O

This will display "H₂O" with the "2" subscripted.

Write output of the following code:

<html>

<body>

<h2> HTML List</h2>

<ul>

<li>Coffee</li>

<li>Tea</li>

<li>Milk</li>

</ul>

</body>

1
</html>

Answer:

HTML List

 Coffee

 Tea

 Milk

How to convert HTML code to XHTML? Write 4 points

Answer:

To convert HTML code to XHTML:

 Add an XML declaration (<?xml version="1.0" encoding="UTF-8"?>).

 Replace the HTML doctype with an XHTML doctype.

 Ensure all elements have proper closing tags.

 Quote all attribute values using double quotes.

Write the syntax of comments in java script?


Answer:
Single-line Comments:

// This is a single-line comment

Multi-line Comments:

/*

This is a multi-line comment

*/

Create a form in html of student name and roll number?


Answer:
<! DOCTYPE html>
<html lang="en">
<head>
2
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Student Information Form</title>
</head>
<body>
<h2>Student Information Form</h2>
<form action="#" method="POST">
<label for="studentName">Student Name:</label><br>
<input type="text" id="studentName" name="studentName"><br><br>
<label for="rollNumber">Roll Number:</label><br>
<input type="text" id="rollNumber" name="rollNumber"><br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
Output of the above code:

Define URL?

Answer:

A URL (Uniform Resource Locator) is a reference to a web resource that specifies its location

and, optionally, a protocol for accessing it. It serves as a standardized way to identify resources

on the internet.

Types of Lists in HTML?

3
Answer:

In HTML, there are three main types of lists:


 Ordered List (<ol>)

 Description List (<dl>)

 Unordered List (<ul>)

Why we use comments?

Answer:

Comments Markup languages like HTML serve to enhance code readability and understanding.

They act as documentation, clarify complex sections, aid debugging, facilitate communication

within teams, and enable temporary code adjustments without deletion. Overall, they are

essential for code maintenance and collaboration.

Differentiate between Div and Span?

Answer:

<div> (Division):

The <div> element is a block-level element, meaning it typically starts on a new line and takes

up the full width available.

It is used to group together HTML elements and create divisions or sections within a web page.

<div> elements are often used to structure the layout of a webpage, such as defining sections,

sidebars, headers, footers, etc.

It is commonly styled with CSS to control its appearance, layout, and positioning.

Examples: <div id="header">, <div class="sidebar">, <div class="container">.

<span> (Inline Span):

4
The <span> element is an inline-level element, meaning it does not start on a new line and only

takes up as much width as its content requires.

It is used to apply styles to a specific portion of text or content within a larger block of text.

<span> elements are often used to apply CSS styles, such as color, font size, font weight, etc.,

to individual words or phrases within a paragraph.

It does not affect the layout of the document and is typically used for small-scale styling or

scripting purposes.

Examples: <span class="highlight">, <span style="color: red;">.

You might also like