Unit 1: Web Page Designing




Web Page Designing

Web Page Designing refers to the process of creating and formatting web pages that are displayed on the internet using web browsers such as Chrome, Edge, or Firefox.

Objectives of Web Page Designing

  • To present information clearly on the internet
  • To create user-friendly interfaces
  • To support business, education, and communication needs
  • To ensure accessibility and responsiveness

Key Components

ComponentDescription
StructureHTML
PresentationCSS
BehaviorJavaScript
Backend (optional)PHP, Python, Java

Web Development Strategies

Web development strategies define how a website is planned, developed, and maintained.

Common Strategies

  1. Requirement Analysis – Identify user and business needs
  2. Content Planning – Decide text, images, videos
  3. Design Strategy – Layout, color scheme, navigation
  4. Development – Coding using HTML, CSS, JS
  5. Testing – Check browser compatibility, errors
  6. Deployment – Uploading website to server
  7. Maintenance – Regular updates and security checks

Types of Websites

TypeExample
Static WebsitePortfolio
Dynamic WebsiteE-commerce
Responsive WebsiteMobile-friendly sites

History of Web and Internet

History of Internet

  • 1969 – ARPANET introduced
  • 1980s – Email and file transfer developed
  • 1990 – Internet expanded globally

History of Web

  • 1991 – Tim Berners-Lee introduced the World Wide Web
  • HTML, HTTP, and URL were introduced
  • Websites became graphical after 1995

TermInvented By
InternetUS Department of Defense
WWWTim Berners-Lee

Protocols Governing the Web

A protocol is a set of rules for communication between computers.

Important Web Protocols

ProtocolFull FormUse
HTTPHyperText Transfer ProtocolWeb pages transfer
HTTPSSecure HTTPSecure websites
FTPFile Transfer ProtocolFile sharing
TCP/IPTransmission Control Protocol / Internet ProtocolInternet communication
SMTPSimple Mail Transfer ProtocolEmail sending

HTML 

HTML (HyperText Markup Language) is used to create the structure of web pages.

Features of HTML

  • Easy to learn
  • Platform independent
  • Tag-based language
  • Supported by all browsers

HTML Tags

HTML uses tags to define elements.

Types of Tags

TypeExample
Paired Tags<p></p>
Unpaired Tags<br>

Common HTML Tags

TagPurpose
<html>Root element
<head>Meta information
<title>Page title
<body>Visible content
<h1><h6>Headings
<p>Paragraph

HTML Grouping Using <div> and <span>

<div> Tag

  • Block-level element
  • Used to group large sections

<span> Tag

  • Inline element
  • Used to style small text

TagTypeUsage
<div>BlockLayout
<span>InlineText styling

HTML Lists

Lists are used to display data in ordered or unordered form.

Types of Lists

  1. Ordered List (<ol>)
  2. Unordered List (<ul>)
  3. Definition List (<dl>)

List TypeTag
Ordered<ol>
Unordered<ul>
Definition<dl>

HTML Images

Images make web pages attractive.

<img> Tag Attributes

AttributePurpose
srcImage path
altAlternative text
widthImage width
heightImage height

HTML Hyperlink

Hyperlinks connect web pages.

<a> Tag

Used to link one page to another.

AttributeUse
hrefLink destination
targetOpen link in new tab

Types of Links:

  • Internal links
  • External links
  • Email links

HTML Table

Tables are used to display data in rows and columns.

Table Tags

TagPurpose
<table>Create table
<tr>Table row
<th>Table heading
<td>Table data

HTML Iframe

An iframe is used to embed another webpage inside a webpage.

Uses

  • Embed YouTube videos
  • Display maps
  • Show external pages

AttributeDescription
srcPage URL
widthWidth
heightHeight

HTML Form

Forms are used to collect user input.

Form Elements

ElementPurpose
<form>Form container
<input>User input
<textarea>Large text
<select>Dropdown
<button>Submit button

Common Input Types

TypeUse
textName
passwordPassword
radioSingle choice
checkboxMultiple choice
submitSubmit form

Summary Table

TopicPurpose
HTMLStructure
Div & SpanGrouping
ListsOrganized data
FormsUser input
TablesData display

Introduction of CSS

CSS (Cascading Style Sheets) is a stylesheet language used to control the presentation and layout of HTML elements. While HTML defines the structure of a web page, CSS defines how it looks.

Why CSS is Required

  • Separates content from design
  • Makes websites attractive
  • Reduces repetition of HTML code
  • Improves page loading speed
  • Enables responsive design

Types of CSS

TypeDescription
Inline CSSApplied directly to an HTML element
Internal CSSWritten inside <style> tag
External CSSWritten in a separate .css file

CSS Syntax

CSS follows a simple rule-based syntax.

Basic CSS Structure

selector { property: value; }

Example

p { color: blue; font-size: 16px; }
PartDescription
SelectorHTML element to be styled
PropertyAttribute to change
ValueAssigned setting

External Style Sheet using <link>

An external stylesheet is a separate CSS file linked to an HTML document.

Advantages

  • One CSS file can style multiple pages
  • Easy maintenance
  • Cleaner HTML code

Syntax

<link rel="stylesheet" href="style.css">
AttributePurpose
relRelationship (stylesheet)
hrefCSS file path

Multiple Style Sheets

Web pages can use more than one CSS file.

Example

<link rel="stylesheet" href="layout.css"> <link rel="stylesheet" href="theme.css">

CSS Priority (Cascading Order)

  1. Inline CSS
  2. Internal CSS
  3. External CSS
  4. Browser default

If two rules conflict, the last loaded file takes priority.

Value Lengths and Percentages

CSS uses different units to define size, spacing, and layout.

Absolute Units

UnitMeaning
pxPixels
cmCentimeters
inInches

Relative Units

UnitMeaning
%Relative to parent element
emRelative to font size
remRelative to root font size
vwViewport width
vhViewport height

Example

div { width: 50%; font-size: 1.2em; }

CSS Selectors

Selectors are used to target HTML elements.

Types of Selectors

SelectorSymbolExample
Elementnonep
ID##header
Class..menu
Group,h1, h2
Universal**

Attribute Selector Example

input[type="text"] { border: 1px solid black; }

CSS Box Model

The CSS Box Model defines how space and layout are calculated.

Components

ComponentDescription
ContentActual content
PaddingSpace inside border
BorderEdge around padding
MarginSpace outside border

Diagram Order

MarginBorderPaddingContent

Example

div { margin: 10px; padding: 15px; border: 2px solid black; }

Floats

The float property positions elements left or right.

Syntax

img { float: left; }

Float Values

ValueMeaning
leftElement floats left
rightElement floats right
noneDefault

Used mainly in layout design and image alignment.

Clear

The clear property controls elements after floating elements.

Syntax

div { clear: both; }

Clear Values

ValueDescription
leftClears left float
rightClears right float
bothClears both

Introduction to Bootstrap

Bootstrap is a popular CSS framework used to create responsive and mobile-friendly websites quickly.

Developed By

  • Twitter developers (2011)

Features

  • Pre-designed CSS classes
  • Responsive grid system
  • Mobile-first approach
  • JavaScript components

Key Components

ComponentPurpose
Grid SystemLayout design
ButtonsStyled buttons
FormsResponsive forms
NavbarNavigation menus
CardsContent display

Example Bootstrap Class

<button class="btn btn-primary">Submit</button>

Difference Between CSS and Bootstrap

CSSBootstrap
Custom stylingPre-built styling
Time-consumingFaster development
Manual responsivenessAutomatic responsiveness

Summary Table

TopicKey Use
CSSStyling
SelectorsTarget elements
Box ModelLayout spacing
Float & ClearPositioning
BootstrapResponsive design