Home About Content Others
HTML5 & CSS3
HTML5 & CSS3
HTML5 & CSS3
Home About Content Others
FORMS
Common Attributes:
placeholder : hint inside input
required : must fill in to submit
pattern : regex check (e.g. phone numbers)
min, max : for number, date, range
step : control how values change
autocomplete="on/off" : browser auto-fill
Home About Content Others
FORM VALIDATION
Form Validation is the process of checking if the user has entered valid data before submitting
the form.
✅ In HTML5, we can do basic validation without JavaScript using attributes like:
required
type
pattern
maxlength
Attribute Purpose
Field must be filled before form
required
submission
Validates input format (e.g. email,
type
number, url)
Custom validation using a regular
pattern
expression
Limits maximum number of
maxlength
characters
Home About Content Others
EMBEDDED CONTENT
How to embed other web content like videos, maps, and documents inside your webpage.
Tag Use Case Notes
Embed external web Most used for YouTube,
<iframe>
pages Google Maps
Embed media files (PDF,
<embed> Lightweight, self-closing
audio, SWF)
Embed multimedia or Older, used for PDF,
<object>
plugins Flash, etc.
Home About Content Others
Media Queries
What is Responsive Design?
Responsive Design means your website adapts to different
screen sizes (mobile, tablet, desktop) using flexible layouts
and media queries.
One website — many screen sizes!
2. What is a Media Query?
A media query applies CSS rules only when a condition is
true, like when screen width is smaller or
Syntax:
@media (condition) {
/* CSS rules here */
}
Home About Content Others
Transitions & Animations in CSS
1. Transitions (Smooth Change)
Allows smooth animation from one state to another,
like on hover or focus
Keyframe Animations
What is @keyframes?
Defines custom animation steps for elements
animation: name duration timing-function delay
iteration direction fill-mode;
Home About Content Others
CSS position Property
The position property tells the browser
how an element should be placed in the
documen
Value Description
static Default value (elements flow normally)
relative Moves relative to its normal position
Moves relative to the nearest
absolute
positioned parent
Fixed to the viewport (doesn’t move
fixed
on scroll)
Acts like relative but sticks when you
sticky
scroll (e.g., sticky header)
Home About Content Others
z-index
Controls which element appears on top
(higher value = in front)
⚠️ z-index only works on positioned
elements (relative, absolute, fixed,
sticky)
Home About Content Others
THANK YOU
THANK YOU
THANK YOU