Computer Application Practical file
Session 2023-24
PRACTICAL FILS PROGRAMS FOR COMPUTER APPLICATIONS (165)
SESSION 2023-24
BREAKUP OF MARKS FOR THE PRACTICALS
TOTAL MARKS 50
1. LAB TEST (20 MARKS) : HTML coding based on the screenshot of the web page.
2. Report file (15 MARKS) : At least 15 HTML programs in the practical file.
3. Viva (5 MARKS) : Based on the practical exam and questions.
4. Project (10 Marks) : Website with linked pages it in.
PROGRAM 1:
Write a html program code to show demo of heading tags
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Heading Tags Demo</title>
</head>
<body>
<h1>This is Heading 1</h1>
<h2>This is Heading 2</h2>
<h3>This is Heading 3</h3>
<h4>This is Heading 4</h4>
<h5>This is Heading 5</h5>
<h6>This is Heading 6</h6>
</body>
</html>
This is Heading 1
This is Heading 2
This is Heading 3
This is Heading 4
This is Heading 5
This is Heading 6
Program 2:
Write a html program code to show demo of Paragraph tag and its attributes
<!DOCTYPE html>
<html>
<head>
<title>Paragraph Tag Demo</title>
</head>
<body>
<p>This is a simple paragraph.</p>
<p align=”center”>This paragraph is centered using the align attribute.</p>
<p style=”color: blue; font-size: 18px;”>This paragraph has custom styles applied using the style attribute.</p>
<p title=”Tooltip text on hover”>Hover over this paragraph to see the title attribute in action.</p>
<p id=”special”>This paragraph has an ID attribute assigned for targeting with CSS or JavaScript.</p>
</body>
</html>
output:
This is a simple paragraph.
This paragraph is centered using the align attribute.
This paragraph has custom styles applied using the style attribute.
Hover over this paragraph to see the title attribute in action.
This paragraph has an ID attribute assigned for targeting with CSS or JavaScript.
Program 3 :
Write a html program code to show demo of B, I, U tag.
<!DOCTYPE html>
<html>
<head>
<title>Text Formatting Demo</title>
</head>
<body>
<p>This is <b>bold</b> text using the <b> tag.</p>
<p>This is <i>italic</i> text using the <i> tag.</p>
<p>This is <u>underlined</u> text using the <u> tag.</p>
<p>This is <b><i><u>combined</u></i></b> formatting using nested tags.</p>
</body>
</html>
Text Formatting Demo
This is bold text using the <b> tag.
This is italic text using the <i> tag.
This is underlined text using the <u> tag.
This is combined formatting using nested tags.
Write a html program code to show demo of character entities
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Character Entities Demo</title>
</head>
<body>
<p><p> This is an example of using &lt; and &amp; in HTML.</p>
<p>© Copyright symbol: &copy;</p>
<p>😄 Smiley face emoji: &#128516;</p>
<p>💻 Personal computer emoji: &#x1F4BB;</p>
</body>
</html>
output:
<p> This is an example of using < and & in HTML.
© Copyright symbol: ©
😄 Smiley face emoji: 😄
💻 Personal computer emoji: 💻
.
program 5:
Write a html program code to show demo of sub script and super script.
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<title>Subscript and Superscript Demo</title>
</head>
<body>
<p>This is a normal text with <sub>subscript</sub> and <sup>superscript</sup> text.</p>
<p>Chemical formula: H<sub>2</sub>O (water)</p>
<p>10<sup>2</sup> = 100 (Ten squared)</p>
</body>
</html>
OUTPUT:
This is a normal text with subscript and superscript text.
Chemical formula: H2O (water)
102 = 100 (Ten squared)
program 6 :
write a html program code to show demo of font tag and its attributes
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<title>Font Tag Demo</title>
</head>
<body>
<font face=”Arial”>This text uses the Arial font face.</font><br>
<font color=”blue”>This text is blue in color.</font><br>
<font size=”5″>This text is size 5.</font><br>
<font face=”Verdana” color=”green” size=”3″>This text uses Verdana font, green color, and size 3.</font>
</body>
</html>
OUTPUT:
This text is blue in color.
This text is size 5.
This text uses Verdana font, green color, and size 3.
program 7 :
write a html program code to show demo of order and unorder list with its attributes
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<title>List Demo</title>
</head>
<body>
<h2>Ordered List (ol) with Attributes</h2>
<ol type=”1″>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>
<h2>Unordered List (ul) with Attributes</h2>
<ul type=”square”>
<li>Apple</li>
<li>Orange</li>
<li>Banana</li>
</ul>
<h2>Ordered List (ol) with Start Attribute</h2>
<ol start=”5″>
<li>Fifth item</li>
<li>Sixth item</li>
<li>Seventh item</li>
</ol>
<h2>Unordered List (ul) with Disc Type</h2>
<ul type=”disc”>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
</body>
</html>
OUTPUT:
Ordered List (ol) with Attributes
- First item
- Second item
- Third item
Unordered List (ul) with Attributes
- Apple
- Orange
- Banana
Ordered List (ol) with Start Attribute
- Fifth item
- Sixth item
- Seventh item
Unordered List (ul) with Disc Type
- Item 1
- Item 2
- Item 3
program 8 :
Write a html program code to show demo of definition list with its attributes
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<title>Definition List Demo</title>
</head>
<body>
<h2>Definition List (dl) with Attributes</h2>
<dl>
<dt>HTML</dt>
<dd>HyperText Markup Language</dd>
<dt>CSS</dt>
<dd>Cascading Style Sheets</dd>
<dt>JS</dt>
<dd>JavaScript</dd>
</dl>
<h2>Definition List (dl) with Compact Attribute</h2>
<dl compact>
<dt>AI</dt>
<dd>Artificial Intelligence</dd>
<dt>ML</dt>
<dd>Machine Learning</dd>
<dt>DL</dt>
<dd>Deep Learning</dd>
</dl>
</body>
</html>
OUTPUT:
Definition List (dl) with Attributes
- HTML
- HyperText Markup Language
- CSS
- Cascading Style Sheets
- JS
- JavaScript
Definition List (dl) with Compact Attribute
- AI
- Artificial Intelligence
- ML
- Machine Learning
- DL
- Deep Learning
program 9 :
write a html program code to show demo of nested list with its attributes
OUTPUT:
Nested List Example
- Fruits
- Apple
- Orange
- Banana
- Vehicles
- Car
- Bicycle
- Motorcycle
program 10 :
write a html program code to show demo of image tag
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<title>Image Tag Demo</title>
</head>
<body>
<h2>Displaying an Image</h2>
<img src=”https://th.bing.com/th/id/OIP.vd_FvHaRHaL8KFGBSIT5rwAAAA?w=120&h=120&c=7&r=0&o=5&pid=1.7″ alt=”Placeholder Image” width=”300″ height=”200″>
</body>
</html>
OUTPUT:
Displaying an Image
program 11 :
write a html program code to show demo of anchor tag and its attributes
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Anchor Tag Demo</title>
</head>
<body>
<h2>Anchor Tag Example</h2>
<p><a href=”https://www.example.com”>Visit Example.com</a></p>
<p><a href=”#section2″>Jump to Section 2</a></p>
<h2 id=”section2″>Section 2</h2>
<p><a href=”mailto:info@example.com”>Email us</a></p>
<p><a href=”tel:+1234567890″>Call us</a></p>
</body>
</html>
OUTPUT:
program 12 :
write a html program code to show demo of table tag and its attributes.
OUTPUT:
Table Example
ID | Name | Department | Salary |
---|---|---|---|
001 | John Doe | IT | $60,000 |
002 | Jane Smith | HR | $55,000 |
program 13 :
Write a html program code to show demo of table tag and rowspan and colspan attributes
<head>
<title>Table with Rowspan and Colspan</title>
</head>
<body>
<h2>Table with Rowspan and Colspan</h2>
<table border=”1″ cellpadding=”5″ cellspacing=”0″>
<caption>Task Assignment</caption>
<tr>
<th>Task</th>
<th>Assigned To</th>
<th>Status</th>
</tr>
<tr>
<td rowspan=”2″>Project A</td>
<td>John</td>
<td>Completed</td>
</tr>
<tr>
<td>Jane</td>
<td>In Progress</td>
</tr>
<tr>
<td colspan=”3″>Project B – Team Task</td>
</tr>
</table>
</body>
</html>
OUTPUT:
Table with Rowspan and Colspan
Task | Assigned To | Status |
---|---|---|
Project A | John | Completed |
Jane | In Progress | |
Project B - Team Task |
program 14 :
write a html program code to show demo of form tag, input(text, password, radio, checkbox), select , area tag
OUTPUT
Form Elements Example
program 15 :
Write a html program code to show demo of internal CSS
OUTPUT
Welcome to Internal CSS
This is a paragraph with some text. This part is important.
Another paragraph here.
program 16 :
Write a html program code to show demo of External CSS
styles.css
):OUTPUT
Welcome to External CSS
This is a paragraph with some text. This part is important.
Another paragraph here.
program 17 :
Write a html program code to show demo of inline CSS
OUTPUT
Welcome to Inline CSS
This is a paragraph with some text. This part is important.
Another paragraph here.