CSS_Frames_Layers_Forms_Lecture
CSS_Frames_Layers_Forms_Lecture
Form Objects
1. Introduction to CSS (Cascading Style Sheets)
CSS Syntax:
A CSS rule consists of a selector and a declaration block:
selector {
property: value;
}
- Selector: Targets the HTML element to be styled (e.g., `p` for paragraphs, `h1` for headings).
- Property: The aspect of the element to style (e.g., `color`, `font-size`).
- Value: The setting applied to the property (e.g., `blue`, `16px`).
Types of CSS:
1. Inline CSS:
Directly within the HTML tag using the `style` attribute.
Example:
<p style="color:blue;">This is a blue paragraph.</p>
2. Internal CSS:
Defined inside the `<style>` tag within the `<head>` section of an HTML document.
<style>
p { color: blue; }
</style>
3. External CSS:
Written in a separate CSS file and linked using the `<link>` tag.
<link rel="stylesheet" href="styles.css">
color: red;
font-size: 24px;
2. Frames
Frames in HTML allow dividing a web page into multiple sections, with each section capable of
loading a different HTML document. This technique was common in the early days of web design for
creating multi-view interfaces.
<frameset cols="30%,70%">
<frame src="menu.html">
<frame src="content.html">
</frameset>
3. No Frames
The `<noframes>` element provides alternative content for browsers that don’t support frames.
4. Layers
Layers were used in early web development to manage multiple overlapping elements on a page. The
`<layer>` tag was part of early Netscape browsers but has since been deprecated.
5. Forms
Forms allow users to send data to a server. They are an essential part of web applications, enabling
functions like registration, login, or data entry.
Form Structure: