HTML_CSS_BOOTSTRAP
HTML_CSS_BOOTSTRAP
UNIT 1
5 Submit Button
Description: Submits the form data to the server.
Example:
<input type="submit" value="Submit">
6 Reset Button
Description: Resets the form’s controls to their initial
values.
Example:
7 <input type="reset" value="Reset">
File Input
Description: Allows users to select files for upload.
Example:
<input t y p e = " fi l e " name="fi le" i d = " fi l e " >
8 Hidden Input
Description: Provides a way to store data without displaying
it in the form.
Example:
<input type="hidden" name="user i d " value="123">
9 Image Input
Description: Displays an image that represents a submit
button.
Example:
1 <input type="image" src="submit.png" alt="Submit">
0
Button
Description: Defines a clickable button.
Example:
<butt on type="butt on">Click Me</button>
1 < i n p u t t y p e = " d a t e " i d = " dob " name = " dob "
9
2 ><br><br>
0
2 < l a be l f or = " g e nde r " > Ge nde r : < / l a be l > < br >
1
2 < i nput t y pe = " r a di o " i d = " ma l e " na me = " g e nde r " v a l ue
2
ma l e " > ="
2 < l f or = " ma l e " > Ma l e < / l a be l >
3
2 a be l t y pe = " r a di o " i d = " f e ma l e " na me = " g e nde r " v a l ue
4
< i nput =
2 " f e ma l e " > f o r = " fe m a l e " > Fe m a l e < / l a b e l > < b r > < b r >
5
2 < f or = " t e r ms " > Ag r e e t o T e r ms : < / l a be l >
6
2 l a be l t y pe = " c he c k box " i d = " t e r ms " na me = "
7
c he c k e d > < <br >t<ebr r ms
> "
2 <l ai nbe
pul t type =" submit" value =" Submit"
8
2 > <
9
30 < / f ori nmp >u t
< / body
>
31 < / ht ml
>
Dr. Dheeraj HTML4, CSS3 & March 4, 11 /
Web Technologies (8EC07) -
UNIT 1
Attributes:
name: Specifies the name of the select element, which is
submitted along with the form data.
id: Specifies a unique identifier for the select element,
which can be used for scripting or styling purposes.
multi ple: If present, allows the user to select multiple
options from the list.
size : Specifies the number of visible options in a
dropdown list. Example: < s e l e c t name="countries"
size ="5 ">
disabled: Disables the dropdown list, making it
unselectable. Example: < s e l e c t name="colors"
disabled>
autofocus:Automatically focuses on the dropdown list
when
Dr. Dheeraj the page loads. Example:
HTML4, CSS3 & < s e l e c t name="fruit"
March 4, 16 /
Web Technologies (8EC07) -
UNIT 1
1 < ! DOCT Y PE ht ml
>
2 < ht ml >
3
4 < he a<dt>i t l e > Compl e t e HT ML Pr og r a m : s el ec t , opt i on , opt g r oup
, t e x t a r e a , f i e l ds e t , butt on t a g s < / t i t l e >
5 < / he a d
>
6
7 < body > > S e l e c t y our f a v or i t e f r ui t : < / h2 >
< h2
8 < s e l e c t i d = " f r u i t " name = " f r u i t " >
9 < opt g r oup l a be l = " S umme r F r ui t s " >
1 < opt i on v a l ue = " wa t e r me l on " > Wa t e r me l on < /
0
1 opt i on >
1
1 < opt i on v a l ue = " s t r a wbe r r y " > S t r a wbe r r y < / opt i on
2
1 >
3
1 < / opt g r oup >
4
1 < opt g r oup l a be l = " Wi nt e r F r ui t s " >
5
1 < opt i on v a l ue = " a ppl e " > Appl e < / opt i on >
6
1 < opt i on v a l ue = " or a ng e " > Or a ng e < / opt i on >
7
< / opt g r oup >
< /Dheeraj
Dr. s e l e c t > < br > HTML4, CSS3 & March 4, 18 /
Web Technologies (8EC07) -
UNIT 1
1
8
1 < t e x t a r e a r o w s = " 4 " c o l s = " 50 " p l a c e h o l d e r = " E n t e r y our
9
feedback " ></ t e x t a r e a >
2 < f i e l ds e t >
0
2 < l e g e nd > Cont a c t I nf or ma t i on < / l e g e nd >
1
2 < l a be l f or = " na me " > Na me : < / l a be l >
2
2 < i nput t y p e = " t e x t " i d = " name " name = " name "
3
2 < l a be l > < b r > f or = " e ma i l " > E ma i l : < / l a be l >
4
2 < i nput t y pe = " e ma i l " i d = " e ma i l " na me = " e ma i l "
5
2 < / f i e l ds e t > >< <brbr> >
6
2
7
2 < butt on t y pe = " s ubmi t " > S ubmi t < / butt on
8
2 < butt on > t y pe = " r e s e t " > Re s e t < / butt on >
9
3 < butt on t y p e = " b u tt o n " o n c l i c k = "
0
a l e on
Cus t om Butt r t (<’/ Custom
butt on a c ti o n ’ ) " >
>
31 < / body >
32 < / ht ml >
</body>
</html>
Web Technologies (8EC07) -
UNIT 1
CSS Introduction
CSS Structure:
Inline CSS
</body>
</html>
Web Technologies (8EC07) -
UNIT 1
Internal CSS
Internal CSS is defined within the < st y l e > element in the <head>
section of an HTML document.
Example:
1 < style >
2 p \{
3 color : red ;
4 font - size : 18 px ;
5 \}
6 </ style >
7
p { color:red;font-size:30px}
</style>
</head>
<body>
</body>
</html>
Web Technologies (8EC07) -
UNIT 1
External CSS
"mystyle.css"
<html>
<head> body {
background-
<link rel="stylesheet" color: lightblue;
href="mystyle.css"> }
</head>
<body> h1 {
color: navy;
margin-left: 20px;
<h1>This is a heading</h1> }
<p>This is a paragraph.</p>
</body>
</html>
Web Technologies (8EC07) -
UNIT 1
Output
:
CSS Selectors
</body>
The CSS id Selector
</body>
</html>
The CSS class Selector
</body>
</html>
Example-2
p.large {
font-size: 300%;
}
</style>
</head>
<body>
</body>
The CSS Universal Selector
The universal selector (*) selects all HTML elements on the page.
<html>
<head>
<style>
*{
text-align: center;
color: blue;
}
</style>
</head>
<body>
<h1>Hello world!</h1>
</body>
</html>
The CSS Grouping Selector
The grouping selector selects all the HTML elements with the same style definitions.
Look at the following CSS code (the h1, h2, and p elements have the same style
definitions):
<html>
<head>
<style>
h1, h2, p {
text-align: center;
color: red;}
</style>
</head>
<body>
<h1>Hello World!</h1>
<h2>Smaller heading!</h2>
<p>This is a paragraph.</p>
</body>
CSS Combinators
The descendant selector matches all elements that are descendants of a specified element. The
following example selects all <p> elements inside <div> elements:
<html>
<head>
<style>
div p {
background-color: yellow;
}
</style>
</head>
<body>
<h2>Descendant Selector</h2>
<p>The descendant selector matches all elements that are descendants of
a specified element.</p>
<div>
<p>Paragraph 1 in the div.</p>
<p>Paragraph 2 in the div.</p>
<p>Paragraph 3 in the div.</p>
</div>
<p>Paragraph 4. Not in a div.</p>
<p>Paragraph 5. Not in a div.</p>
</body>
Child Selector (>)
<div> </body>
<p>Paragraph 1 in the div.</p>
</html>
<p>Paragraph 2 in the div.</p>
</div>
General Sibling Selector (~)
The general sibling selector selects all elements that are next siblings
of a specified element.
The following example selects all <p> elements that are next siblings
of <div> elements:
Example
<!DOCTYPE html>
<html> <p>Paragraph 1.</p>
<head>
<style> <div>
div ~ p { <p>Paragraph 2.</p>
background-color: yellow; </div>
}
</style> <p>Paragraph 3.</p>
</head> <code>Some code.</code>
<body> <p>Paragraph 4.</p>
12. <p>You can use the ::first-line pseudo-element to add a special effect to the first
line of a text. Some more text. And even more, and more, and more, and more, and
more, and more, and more, and more, and more, and more, and more, and
more.</p>
13. </body>
14. </html>
CSS Attribute Selectors
<a href="https://www.w3schools.com">w3schools.com</a>
<a href="http://www.disney.com"
target="_blank">disney.com</a>
<a href="http://www.wikipedia.org"
target="_top">wikipedia.org</a>
</body>
</html>
Web Technologies (8EC07) -
UNIT 1
What is Bootstrap?