Ca Re

Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

SOURCE CODE

1) Inserting Image in HTML


<html>
<head>
<title>Sun Image</title>
</head>
<body>
<img src="sun.png" alt="Sun">
</body>
</html>

2)Internal CSS
<html>
<head>
< tle>Internal CSS Example</ tle>
<style>
body {font-family: Arial, sans-serif;}h1 {color: blue;}
p {font-size: 18px;}
.important-text {font-weight: bold;}
</style>
</head>
<body>
<h1>Welcome to My Website</h1>

<p>This is a paragraph of text. It will be styled according to the rules


specified in the internal CSS.</p>

<p class="important-text">This is an important paragraph with a different


style.</p>
</body>
</html>

3)Inline CSS
<html>
<head>
< tle>Inline CSS Example</ tle>
</head>
<body style="font-family: Arial, sans-serif; background-color: #f4f4f4; text-
align: center;">
<h1 style="color: #333333;">Inline CSS Example</h1>
<p style="font-size: 18px; line-height: 1.6; color: #555555;">
Inline CSS is a way of applying styles directly to HTML elements using the
'style' a ribute. This allows you to control the appearance of individual
elements. In this example, the body has a background color of light grey, and
the text is centered. The heading has a color of dark grey, and the paragraph
has a font size of 18 pixels with a line height of 1.6.
</p>
<p style="font-style: italic; color: #777777;">
Inline styles are useful for making quick, specific changes to elements, but
they can become hard to manage in larger projects. It's o en be er to use
external CSS files for consistent styling across a website.
</p>
</body>
</html>

4)External CSS
HTML code :
<html>
<head>
< tle>External CSS Example</ tle>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<h1>External CSS Example</h1>
<p>External CSS allows you to separate the style of your website from its
content. It improves code organiza on, reusability, and maintenance.</p>
<p>By linking an external CSS file using the &lt;link&gt; element, you can
apply consistent styles across mul ple pages.</p>
</body>
</html>

CSS code:
body {font-family: Arial, sans-serif; background-color: #f0f0f0; margin:
0;padding: 20px;}
h1 {color: #333333;text-align: center;}
p {font-size: 18px;line-height: 1.6;color: #555555;margin-bo om: 15px;}

5)Use of Paragraph tag with a ributes


<html>
<head>
< tle>Security Overview</ tle>
</head>
<body>
<h1>Security Overview</h1>
<p style="border: 2px solid red; background-color: lightyellow; padding:
10px;">
Viruses, Malware, and Spam have long been concerns in the digital realm.
Viruses are malicious so ware designed to replicate and spread. Malware
encompasses a range of harmful so ware, including spyware and ransomware.
Spam refers to unsolicited emails. An viruses have a history of evolving to
counter these threats.
</p>
<p style="border: 3px dashed green; background-color: lightblue; padding:
15px;">
In the early days, viruses were rela vely simple, but as technology
advanced, so did the sophis ca on of malware. Spam emails inundated
inboxes, leading to the development of filters. An viruses emerged to detect
and remove malicious so ware. Today, cybersecurity is a cri cal aspect of the
digital landscape.
</p>
</body>
</html>

6)Ordered List
<html>
<head>
< tle>Ordered List Example</ tle>
</head>
<body>
<h2>Types of Fruits</h2>
<ol type="1">
<li>Apple</li>
<li>Banana</li>
<li>Cherry</li>
</ol>
<h2>Types of Animals</h2>
<ol type="A" start="4">
<li>Lion</li>
<li>Tiger</li>
<li>Bear</li>
</ol>
<h2>Planets in the Solar System</h2>
<ol type="I">
<li>Mercury</li>
<li>Venus</li>
<li>Earth</li>
<li>Mars</li>
</ol>
</body>
</html>

7) Unordered List
<html>
<head>
< tle>Unordered List Example</ tle>
</head>
<body>
<h2>Types of Sports</h2>
<ul style="list-style-type: disc;">
<li>Soccer</li>
<li>Basketball</li>
<li>Tennis</li>
</ul>
<h2>Types of Trees</h2>
<ul style="list-style-type: square;">
<li>Oak</li>
<li>Maple</li>
<li>Pine</li>
</ul>
<h2>Types of Birds</h2>
<ul style="list-style-type: circle;">
<li>Eagle</li>
<li>Robin</li>
<li>Parrot</li>
</ul>
<h2>Types of Flowers</h2>
<ul style="list-style-type: none;">
<li>Rose</li>
<li>Tulip</li>
<li>Daisy</li>
</ul>
</body>
</html>

8)Nested List
<html>
<head>
< tle>Advantages and Disadvantages of AI</ tle>
</head>
<body>
<h2>Advantages of AI</h2>
<ul>
<li>Increased Efficiency</li>
<li>Be er Decision Making</li>
<li>24/7 Availability</li>
<li>Task Automa on
<ol type="A">
<li>Repe ve Tasks</li>
<li>Complex Calcula ons</li>
</ol>
</li>
<li>Improved Healthcare
<ol type="I">
<li>Medical Diagnos cs</li>
<li>Treatment Personaliza on</li>
</ol>
</li>
</ul>
<h2>Disadvantages of AI</h2>
<ol type="i">
<li>Lack of Human Understanding</li>
<li>Job Displacement</li>
<li>Privacy Concerns</li>
<li>High Ini al Costs</li>
<li>Dependence on Technology
<ul style="list-style-type: square;">
<li>System Failures</li>
<li>Security Risks</li>
</ul>
</li>
</ol>
</body>
</html>

9)Inser ng Audio in HTML


<html>
<head>
< tle>Audio Example</ tle>
</head>
<body>
<h2>Audio Example</h2>
<p>Click the play bu on to listen to the audio:</p>

<audio controls autoplay loop>


<source src="your-audio-file.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
</body>
</html>

10)Inser ng Video in HTML


<html>
<head>
< tle>Video Example</ tle>
</head>
<body>
<h2>Video Example</h2>
<p>Click the play bu on to watch the video:</p>

<video controls autoplay loop width="400" height="300">


<source src="your-video-file.mp4" type="video/mp4">
Your browser does not support the video element.
</video>
</body>
</html>

11)Tables in HTML
<html>
<head>
< tle>Simple Table Example</ tle>
</head>
<body>
<h2>Simple Table Example</h2>
<table border="1">
<tr>
<th>Header 1</th>
<th>Header 2</th>
<th>Header 3</th>
</tr>
<tr>
<td>Row 1, Cell 1</td>
<td>Row 1, Cell 2</td>
<td>Row 1, Cell 3</td>
</tr>
<tr>
<td>Row 2, Cell 1</td>
<td>Row 2, Cell 2</td>
<td>Row 2, Cell 3</td>
</tr>
</table>
</body>
</html>

12)Rowspan and Colspan


<html>
<head>
< tle>Table with rowspan and colspan</ tle>
</head>
<body>
<h2>Table with Rowspan and Colspan</h2>
<p>The <strong>rowspan</strong> a ribute allows a cell to span mul ple
rows, while <strong>colspan</strong> allows a cell to span mul ple
columns.</p>
<table border="1">
<tr>
<th>Header 1</th>
<th>Header 2</th>
<th>Header 3</th>
</tr>
<tr>
<td rowspan="2">Row 1, Cell 1<br>(spanning 2 rows)</td>
<td>Row 1, Cell 2</td>
<td colspan="2">Row 1, Cell 3 and 4<br>(spanning 2 columns)</td>
</tr>
<tr>
<td>Row 2, Cell 2</td>
<td>Row 2, Cell 3</td>
<td>Row 2, Cell 4</td>
</tr>
</table>
</body>
</html>
13)Forms in HTML
<html>
<head>
< tle>Simple Form Example</ tle>
</head>
<body>
<h2>Simple Form Example</h2>
<form ac on="/submit" method="post" enctype="mul part/form-data">
Name:
<input type="text" id="name" name="name" required autofocus><br>
Email:
<input type="email" id="email" name="email"
placeholder="[email protected]"><br>
Password:
<input type="password" id="password" name="password" minlength="6"
required><br>
Gender:
<input type="radio" id="male" name="gender" value="male">
Male
<input type="radio" id="female" name="gender" value="female">
Female<br>
Age:
<input type="number" id="age" name="age" min="18" max="99"><br>
Upload File:
<input type="file" id="file" name="file"><br>
Favorite Color:
<input type="color" id="color" name="color"><br>
Comments:<br>
<textarea id="comments" name="comments" rows="4"
cols="50"></textarea><br>
<input type="checkbox" id="subscribe" name="subscribe" checked>
Subscribe to Newsle er<br>
<input type="submit" value="Submit">
</form>
</body>
</html>

14)Website on Plagiarism using CSS


<html>
<head>
< tle>Plagiarism and Its Consequences</ tle>
<style>
body { font-family: Arial, sans-serif;
margin: 20px;}
h1 {text-align: center;}
h2 {color: #333;}
p {color: #666;}
.case {margin-bo om: 20px;}
.country {font-weight: bold;}
</style>
</head>
<body>
<h1>Plagiarism and Its Consequences</h1>
<p>Plagiarism is a serious academic and intellectual property viola on. It
involves the act of copying someone else's work, ideas, or content without
proper a ribu on. Plagiarism can have severe consequences in different
countries as per their intellectual property laws. Here are some reported cases
of plagiarism and the subsequent punishments:</p>
<h2>Case 1: United States</h2>
<p>In the United States, plagiarism can lead to legal ac on, including fines
and imprisonment, especially in cases of copyright infringement. Universi es
also take academic misconduct seriously and may impose penal es ranging
from failing a course to expulsion.</p>
<h2>Case 2: United Kingdom</h2>
<p>In the UK, plagiarism is considered a breach of academic integrity.
Universi es may issue penal es, such as failing an assignment or module, and
in severe cases, expulsion. Legal ac ons may follow in copyright infringement
cases.</p>
<h2>Case 3: Germany</h2>
<p>In Germany, plagiarism in academic contexts can lead to the
revoca on of academic degrees, as famously seen in the case of a former
Defense Minister. Copyright infringement may result in legal penal es and
fines.</p>
</body>
</html>
OUTPUT
3&4
5&6
7&8
9&10
11&12
13
14
BIBLIOGRAPHY /
WEBLIOGRAPHY
-Book used : Computer Applications
Class X by Sumita Arora

- https://bard.google.com/ and
https://chat.openai.com/ was used to
collect information

You might also like