Chapter 1
Chapter 1
• Web designing is the process of planning, conceptualizing, and arranging the visual
and interactive elements of a website to create a user-friendly and aesthetically
pleasing online experience. It encompasses the visual layout, user interface, and user
experience, including elements like color, typography, images, and navigation. Essentially,
web design is about making websites both functional and visually appealing, while also
considering user experience and branding.
• We’ve learned basic terms for creating web pages. HTML, the core language for web
development, has evolved over time.
• The latest version, HTML5, is widely used today because it supports mobile-friendly
features and modern web technologies. Most major browsers like Chrome, Firefox, Edge,
Safari, and Opera fully support HTML5.
Forms
• In Std XI, we have studied different controls related to form like text, radio, checkbox,
submit, reset, select and textarea.
• These controls are used to collect different kinds of user inputs, such as contact details like
name, address, single or multiple options from group of options, as well as clearing and
submitting data etc.
• HTML5 has introduced additional form controls which can also be used for validation
purpose.
Input Type Description
<input type="color"> Defines a color picker.
<input type="number"> Defines a field for entering a number.
<input type="url"> Defines a field for entering a URL.
<input type="image"> Defines an image as a submit button.
HTML5 advanced
<input type="date"> Defines a date picker with the year, month, and day.
elements
<input type="email"> Defines a field for an email address.
• HTML5 added new form controls such as Defines a month and year control in format “YYYY-
<input type="month">
email, date, number, range, URL, etc., MM”.
which help collect specific types of data <input type="range"> Defines a range control. Default range is 0 to 100.
and also support built-in validation, <input type="datetime- Defines a date picker that includes year, month, day,
making forms more user-friendly and local"> and time.
reliable. <input type="time"> Defines a control for entering a time.
<input type="week"> Defines a week and year control.
Defines a text field for entering a search string like a
<input type="search">
site search.
Defines a file-select field and a “Browse” button for
<input type="file">
file uploads.
Used to define input fields that should contain a
<input type="tel">
telephone number.
Input Restrictions
🎨 What is CSS?
• CSS stands for Cascading Style Sheets.
It is a styling language used to control the appearance and layout of web pages.
• ✅ Purpose of CSS
• CSS is used to style HTML content, such as:
• Adding colors, fonts, and backgrounds
• Controlling spacing, margins, and alignment
• Designing layouts, grids, and responsive designs
• Making web pages look attractive and professional
CSS
• CSS Syntax :
A CSS rule set contains
a selector and a declaration block.
📂 Types of CSS
<head><style> <style>
✅ Advantages: </style></head><body>
color Changes the text color Any color name (red, blue, maroon) h1 { color: maroon; }
background-color Sets background color for element Any color name body { background-color: yellow; }
font-weight Makes text bold bold or numeric: 100, 300, … 900 p { font-weight: 300; }
font-style Italicizes text italic, oblique, normal p { font-style: italic; }
underline, line-through, overline,
text-decoration Adds or removes decoration from text p { text-decoration: underline; }
none
text-align Aligns text horizontally left, right, center, justify h1 { text-align: center; }
font-family Sets the font for the text Font names (e.g. Arial, Verdana) p { font-family: arial; }
font-size Sets font size px, pt, cm, em, %, etc. p { font-size: 10px; }
letter-spacing Sets space between letters px, pt, em, etc. h1 { letter-spacing: 5pt; }
padding Adds space inside the border (inside element) In pixels or units h1 { padding: 30px; }
border Adds a border around element solid, dotted, double, ridge, etc. h1 { border: double; }
body { background-image:
background-image Sets an image as background url('[Link]')
url('[Link]'); }
background-repeat Controls if background image repeats repeat, no-repeat background-repeat: no-repeat;
margin-left Sets left margin (space outside element) px, cm, pt, %, etc. h1 { margin-left: 10px; }
🆔 CSS ID Selector
📘 Definition:
• The ID Selector in CSS is used to apply styles to a single, unique HTML element by
referencing its id attribute
🔑 Key Points:
• An id is a unique identifier for one HTML element per page.
• It helps apply a specific style to just that one element.
• In CSS, the ID selector is written with a hash # followed by the ID name.
• Cannot be reused on multiple elements in the same HTML document.
🧾 Syntax:
#idname {
property: value;
}
👉 HTML:
• <h1 id="main-heading">Welcome Students!</h1>
🎨 CSS:
#main-heading {
color: blue;
text-align: center;
font-size: 30px;
}
🧪 Output: The heading will appear blue, centered, and larger in size.
📘 CSS Class Selector
✅ Definition:
• The Class Selector in CSS is used to style multiple HTML elements that share the same
class name.
🔑 Key Points:
• The class attribute is reusable across many HTML elements.
• In CSS, a class selector is written using a dot . followed by the class name.
• Class names should not start with numbers and must avoid spaces or special characters
(except hyphen _ and dash -).
🧾 Syntax:
.classname {
property: value;
}
🧪 Example:
👉 HTML:
<p class="highlight">This is the first paragraph.</p>
<p class="highlight">This is the second paragraph.</p>
🎨 CSS:.highlight {
background-color: yellow;
font-weight: bold;
}
Class Selector for specific element
• ✅ Definition:
• The Group Selector is used to apply the same CSS rules to multiple different selectors
(elements) at once.
You separate each selector with a comma (,).
• 📘 Syntax:
h1, p, ul {
text-align: center;
color: navy;
}
✅ CSS Selectors Summary Table
Positioned relative to
Sticky headers, floating
fixed the browser window; ✅
buttons
does not move on scroll
Types of Positioning
- Static(default) - Relative
Normal flow (no special positioning). Positioned relative to its normal position.
element { element {
position: static; position: relative;
} top: 20px;
left: 10px;
}
Types of Positioning
- Absolute - Fixed
Positioned relative to the nearest Positioned relative to the browser window,
positioned ancestor (not static). does not move on scroll.
element { element {
position: absolute; position: fixed;
top: 50px; bottom: 0;
left: 30px; right: 0;
} }
🌊 Float Property in CSS
• ✅ What is the Float Property?
• The float property in CSS is used to place elements to the left or right of their container,
allowing text or other elements to wrap around it.
• It’s commonly used in:
• Image placement
• Layout designs
• Columns or grids
📘 Syntax:
selector {
float: left | right | none | inherit;
}
🎯 Values of Float:
Value Effect
Value Description
Displays the element as a block-level element
block
(starts on a new line)
✅ Definition: <ol>
• An Ordered List is used in HTML to display a <li>HTML</li>
list of items in a specific sequence, usually
<li>CSS</li>
numbered or lettered. Each item in the list is
marked with a number, letter, or Roman <li>JavaScript</li>
numeral depending on the type specified. </ol>
📘 HTML Tag Used:
<ol> … </ol> ✅ Output:
• Each item in the list is written using: 1. HTML
<li> … </li> 2. CSS
3. JavaScript
🧪 Attributes of <ol>:
Attribute Purpose Example
Defines numbering style (1, A, a,
type <ol type="A"> → A. B. C.
I, i)
start Starts list from a specific number <ol start="5"> → 5. 6. 7.
Reverses order of numbers
reversed <ol reversed> → 3. 2. 1.
(HTML5 only)
• ✅ Definition: <dl>
• A Definition List is used to represent terms <dt>HTML</dt>
and their corresponding definitions —
<dd>HyperText Markup Language</dd>
similar to how a dictionary or glossary works.
<dt>CSS</dt>
• Unlike ordered & unordered lists, a definition
list uses 3 special tags – <dd>Cascading Style Sheets</dd>
• <dl> - Definition List Container </dl>
• <dt> - Definition term ✅ Output:
• <dd> - Definition Description HTML
HyperText Markup Language
CSS
Cascading Style Sheets
🧪 Nested List in HTML
• ✅ Definition:
• A nested list means placing one list inside another list item (<li>) — to show hierarchy.
1. Single-Level Nested List
📘 Definition:
• A list nested only one level deep — useful for basic subcategories.
🎥 2. Inserting Video
✅ HTML5 Video Tag:
<video width="320" height="240" controls>
<source src="video.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
Element/Attribute Purpose
🎯 Explanation:
<video> Main container to embed video
width & height Set the size of video player
controls Adds play, pause, volume, fullscreen
<source> Specifies the video file and format
Fallback Text For browsers that don't support video
📌 Common Attributes for Both <audio> &
<video> tag
Attribute Description
Specifies the path to the media file (used if
src
<source> tag is not used)
Displays default media controls (play, pause,
controls
volume, etc.)
Starts playing automatically when page loads
autoplay
(may be blocked without muted)
loop Repeats the media file after it finishes
muted Starts playing with volume turned off
Tells browser how much of the file to load in
preload
advance
(For <video> only) Displays an image before
poster
video starts
width/height Sets the size of the video player (video only)
Specifies the MIME type of media in <source>
type
(e.g., audio/mp3, video/mp4)
🧪 Image Map in HTML5
✅ Definition:
• An image map is an image that contains multiple hyperlinks embedded within different areas of the
image. These clickable zones are known as hotspots
📌 It allows users to click on different parts of a single image to navigate to different web pages or
sections.
🔎 Purpose:
• Image maps are used to:
• Create interactive diagrams (e.g., maps, product layouts)
• Link multiple destinations through one image
• Visually segment an image into functional parts
🔥 Hotspots:
• Hotspots are the specific clickable areas on an image.
• Each hotspot is defined using the <area> tag inside a <map> tag.
🧪 Types of Image Maps:
Type Description
Processed by the browser. Defined using HTML
Client-Side
tags like <map> and <area>.
Processed by the server using coordinates sent
Server-Side
from the client. (Not commonly used now)
Tag Description
Contains one or more <area> elements. name attribute must match the
<map>
usemap value (without #).
Defines a clickable hotspot area. A singular tag that uses attributes like shape,
<area>
coords, and href.
🧪 Example:
<img src="india_map.jpg" usemap="#india">
<map name="india">
<area shape="rect" coords="34,44,270,350" href="[Link]" alt="Maharashtra">
<area shape="circle" coords="337,300,44" href="[Link]" alt="Gujarat">
</map>
Attribute Description
shape Shape of hotspot: rect, circle, or poly
coords Coordinates for the shape (based on pixels)
href URL to go to when hotspot is clicked
alt Alternate text (accessibility)
target Open link in same or new tab (_blank, _self)
🧪 Inline Frame (<iframe>) in HTML5
• The <iframe> tag is used to embed another webpage or document within the current
HTML page.
It creates a "window within a window" on your web page.
🧾 Purpose of <iframe>:
Embed content from another HTML page.
Include videos, maps, advertisements, or other documents.
Useful for integrating third-party services without redirecting the user.
📘 Basic Syntax:
<iframe src="[Link]" width="300" height="200"></iframe>
🧪 Important Attributes of <iframe>
• Just building a website isn’t enough—it needs to be hosted to make it accessible on the
internet.
Requirement Purpose
🧾 [Link] Home page of the website
💻 Internet connection To upload and configure hosting
📧 Gmail ID & Password Required for signing up on hosting services
🌐 Websites used 000webhost & Freenom
🌐 Hosting Service Get free web space from 000webhost
🌐 Domain Name Provider Get free domain name from Freenom
🔧 Steps to Host Website using 000webhost
🔹 1. Create Hosting Account on • Open the file manager Click upload
000webhost • Upload all your webfiles including:
• Go to: [Link] • [Link]
• Click Free Sign Up • Images, audio, CSS/JS