Theory without output HTML CSS
Theory without output HTML CSS
H
Department of Computer Science & Engineering
C Skill Lab 2
Practical No. 1
Aim: Introduction to HTML & working with HTML tags
HTML Code:-
<!
<!DOCTYPE
html
>
<
html
lang
="
en
">
<
head
>
<
meta
charset
="
UTF-8
">
<
meta
name
="
viewport
"
content
="
width=device-width,
initial-scale=1.0
">
<
title
>first html code </
title
>
</
head
>
<
body
>
<
h1
>Ayush Satwase</
h1
>
<
h3
>BE Computer Scinece Engineering Second Year
</
h3
>
<
p
>
"Hi, I'm Ayush! I'm pursuing a BE in Computer
Science Engineering,<
br
> and
addicted to coding. Always eager to learn and build cool stuff!"</
p
>
</
body
>
</
html
>
CSS Syntax:-
● A CSS rule consists of a selectorand a d
eclarationblock:
T
● he selector points to the HTML element to style (h1).
● The declaration block (in curly braces) contains one or more declarations separated by
semicolons.
● Each declaration includes a CSS property name and a value, separated by a colon.
Example:-save asmystyle.css
<style >
body
{
background-color :
orange ;
font-family:
verdana
}
h1
{
color:
blue;
font-size :
12px
}
p
{
font-size
:
32px
;
color:
red
;
text-align:
center
;}
<
/style >
<html
>
<
link
rel="stylesheet"
href ="mystyle.css">
<
body
>
<
h1
>
My First CSS Example
<
/
h1 >
<
p
>
T
his is a paragraph. <
/
p>
<
/body
>
<
/html
>
<
header
>
<
h1
>Practical No 2 </
h1
>
</
header
>
<
nav
>
</
nav
>
hey this is the basic html css code which implements basic tags and selection
properties !!
<
section
class
="
intro
">
<
h2
>hey my name is ayush</
h2
>
<
p
>In this practical i have studied about
css selector and their properties</
p
>
</
section
>
<
section
class
="
why
">
<
h3
>WHY CSS ?</
h3
>
<
p
>css is stylesheet that style our html code
whith their properties</
p
>
<
button
>Mat lagao hath :></
button
>
</
section
>
<
section
class
="
example
">
<
h3
>Basic CSS Example</
h3
>
<
p
>This section demonstrates various CSS properties
applied to HTML elements.</
p
>
<
button
>Dont Try Buddy</
button
>
</
section
>
<
aside
>
<
p
>CSS makes web pages more attractive and
user-friendly!</
p
>
<
footer
>
<
p
>&
copy
; C skill Lap 2 Practical No 2</
p
>
</
footer
>
</
body
>
</
html
>
CSS CODE :
*
{
margin:
0
;
padding:
0;
box-sizing:
border-box
;
font-family:
Arial
,
sans-serif
;
}
body
{
background-color: #f4f4f4;
color: #333;
line-height:
1.6
;
padding:
20
px
;
}
header
{
background-color: #3498db;
color:
white
;
padding:
15
px
;
text-align:
center
;
}
nav
ul
{
list-style:
none
;
display:
flex
;
justify-content:
center
;
background-color: #2c3e50;
padding:
10
px
;
}
nav
ul
li
a
{
color:
white
;
text-decoration:
none
;
font-weight:
bold
;
}
.
intro
, .
why
, .
example
{
background:
white
;
padding:
20
px
;
margin:
20
px
0
;
border-radius:
5
px
;
box-shadow:
2px
2px
10
px
rgba
(
0
,
0
,
0
,
0.1
);
}
button
{
background: #e74c3c;
color:
white
;
padding:
10
px
15
px
;
border:
none
;
cursor:
pointer
;
border-radius:
5
px
;
transition:
0.3
s
;
}
button
:
hover
{
background: #c0392b;
}
aside
{
background: #f39c12;
color:
white
;
padding:
10
px
;
text-align:
center
;
margin:
20
px
0
;
font-weight:
bold
;
Aim: Design web pages for your School/College/Store/Business containing at least 2 Pages
using HTML & CSS tags.
Theory:- Description about href & list tags & use it in your code.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Government Secondary And Higher Secondary Ashram School Doma</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="wrapper">
<aside class="sidebar">
<nav>
<ul>
<li><a href="#" onclick="showSection('home')">Home</a></li>
<li><a href="#" onclick="showSection('faculty')">Faculty</a></li>
<li><a href="#" onclick="showSection('info')">Information</a></li>
<li><a href="#" onclick="showSection('admission')">Admission</a></li>
</ul>
</nav>
</aside>
<main class="main-content">
<header class="main-header">
<h1>Government Secondary And Higher Secondary Ashram School Doma</h1>
</header>
<section id="home" class="content-section">
<div class="info-text">
<h3>About School</h3>
<p>Government Secondary and Higher Secondary Ashram School, Doma is located in the Melghat
region of Amravati
district. It is a government institution managed by the Tribal Development Department.
The school offers education from Grades 1 to 12, with streams in both Arts and Science. It was
established
The school also provides hostel facilities for both boys and girls.</p>
</div>
<div class="gallery-section">
<h3>School Gallery</h3>
<div class="gallery">
<img src="G 1.jpg">
<img src="G 2.jpg">
<img src="G 3.jpg">
<img src="G 4.jpg">
<img src="G 5.jpg">
</div>
</div>
</section>
<section id="faculty" class="content-section" style="display: none;">
<h2>Our Staffs</h2>
<div class="faculty-list">
<div class="faculty-card">
<h4>Mr. S.V. Chaudhry</h4>
<p>Principal</p>
</div>
<div class="faculty-card">
<h4>Mr. Sunil Bhilavekar</h4>
<p>Chemistry Teacher</p>
</div>
<div class="faculty-card">
<h4>Mr. P.B. Patil</h4>
<p>English Teacher</p>
</div>
<div class="faculty-card">
<h4>Mr. Rathod Sir</h4>
<p>Mathematics Teacher</p>
</div>
<div class="faculty-card">
<h4>Mr. Anjali Raut Mam</h4>
<p>Physics Teacher</p>
</div>
<div class="faculty-card">
<h4>Mr. Akhare Mam</h4>
<p>Biology Teacher</p>
</div>
<div class="faculty-card">
<h4>Mr. Wadhve Sir</h4>
● CSS Code-
body {
margin: 0;
font-family: 'Segoe UI', sans-serif;
background-color: #f5f7fa;
color: #333;
}
.wrapper {
display: flex;
min-height: 100vh;
}
Aim: Create your class Timetable/Mark sheet Table/Daily Diet Table using table tag.(any one)
<
header
>
<
h1
>Weekly Workout Schedule Body Banayege
Ab </
h1
>
</
header
>
<
section
class
="
table-container
">
<
table
>
<
thead
>
<
tr
>
<
th
>Day</
th
>
<
th
>Workout Type</
th
>
<
th
>Duration</
th
>
<
th
>Focus Area</
th
>
</
tr
>
</
thead
>
<
tbody
>
<
tr
>
<
td
>Monday</
td
>
<
td
>Resistance Sand Flyes,
/
< body
>
</
html
>
body
{
background-color: #f4f4f4;
color: #333;
padding:
20
px
;
text-align:
center
;
}
header
{
background-color: #3498db;
color:
white
;
padding:
15
px
;
font-size:
24
px
;
}
.
table-container
{
margin:
20
px
auto
;
width:
80
%
;
overflow-x:
auto
;
}
table
{
width:
100
%
;
border-collapse:
collapse
;
background:
white
;
box-shadow:
2
px
2
px
10
px
rgba
(
0
,
0
,
0
,
0.1
);
border-radius:
5
px
;
}
Roll No.-12 Ayush . J . Satwase
VPM College of Engineering & Technology
H
Department of Computer Science & Engineering
C Skill Lab 2
thead
{
background-color: #2c3e50;
color:
white
;
}
th
,
td
{
padding:
15
px
;
border:
1
px
solid
#ddd;
text-align:
center
;
}
tbody
tr
:
nth-child
(
even
) {
background-color: #f9f9f9;
}
tbody
tr
:
hover
{
background-color: #ecf0f1;
}
@
media
(max-width:
768
px
) {
.
table-container
{
width:
100
%
;
padding:
10
px
;
}
table
{
font-size:
14
px
;
}
}
im:Create any HTML Information Input form usinglabel, textbox, text area, checkbox, radio
A
button, select box etc. controls using HTML & CSS code
Software used:- Notepad, Web Browser.
T heory:- Description about various table tags of HTML- <input>, <label>, <select>,
ET
<textarea>, <button>, <fieldset>, <legend>, <datalist>, <output>, <option> with syntax.
Program Code:- Code for HTML Information Input form using various HTML tags.
● H
TML Code-
<!DOCTYPE html>
<html lang="en">
O
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
C
<title>Food Order Form</title>
<link rel="stylesheet" href="mystyle.css">
</head>
<body>
M
<div class="container">
<h2>Food Order Form</h2>
<form action="#" method="post">
VP
<input type="checkbox" id="sauce" name="extras" value="Extra Sauce">
ET
<label for="sauce">Extra Sauce</label>
</div>
<label>Payment Method:</label>
<div class="payment-options">
<input type="radio" id="cod" name="payment" value="Cash on Delivery"
required>
O
<label for="cod">Cash on Delivery</label>
<input type="radio" id="card" name="payment" value="Credit/Debit Card">
<label for="card">Credit/Debit Card</label>
</div>
C
<label for="quantity">Quantity:</label>
<input type="number" id="quantity" name="quantity" min="1" value="1"
required>
<button type="submit">Place Order</button>
M
<button type="reset" class="reset">Reset</button>
</form>
</div>
VP
</body>
</html>
CSS Code-
●
* {
margin: 0;
H
padding: 0;
box-sizing: border-box;
}
body {
background-color: #f8f9fa;
display: flex;
Roll No.-12 Ayush . J . Satwase
VPM College of Engineering & Technology
H
Department of Computer Science & Engineering
C Skill Lab 2
justify-content: center;
align-items: center;
height: 100vh;
padding: 20px;
}
.container {
ET
background-color: white;
padding: 20px;
border-radius: 10px;
O
width: 100%;
max-width: 450px;
} C
h2 {
text-align: center;
color: #e74c3c;
margin-bottom: 15px;
M
}
label {
font-weight: bold;
VP
margin-top: 10px;
display: block;
}
width: 100%;
H
padding: 10px;
margin-top: 5px;
border-radius: 5px;
font-size: 16px;
}
border-color: #e74c3c;
outline: none;
}
textarea {
ET
resize: none;
}
.checkbox-group, .payment-options {
display: flex;
O
flex-wrap: wrap;
gap: 10px;
margin-top: 5px; C
}
button {
width: 100%;
padding: 12px;
M
margin-top: 15px;
border: none;
border-radius: 5px;
VP
font-size: 16px;
cursor: pointer;
}
button[type="submit"] {
H
background-color: #e74c3c;
color: white;
}
button[type="submit"]:hover {
background-color: #c0392b;
}
background-color: #7f8c8d;
color: white;
}
button.reset:hover {
background-color: #4d5656;
ET
}
.container {
width: 100%;
O
padding: 15px;
}
}
}
M
VP
H
Aim: Create your resume using HTML tags also experiment with colors, text , link , size
and also other tags you studied.