Professional Documents
Culture Documents
WT-1-offline
WT-1-offline
● What is WWW?
● What is U R L ?
U R L stands for Uniform Resource Locator, and is used to specify
addresses on the World Wide Web. A U R L is the fundamental network
identification for any resource connected to the web
● What is HTML?
HTML stands for Hyper Text Markup Language. This is the language
in which we write web pages for any Website.
</body>
</html>
● The <!DOCTYPE html> declaration defines that this document is an
HTML5 document
● The <html> element is the root element of an HTML page
● The <head> element contains meta information about the HTML
page
● The <title> element specifies a title for the HTML page (which is
shown in the browser's title bar or in the page's tab)
● The <body> element defines the document's body, and is a container
for all the visible contents, such as headings, paragraphs, images,
hyperlinks, tables, lists, etc.
● The <h1> element defines a large heading
● The <p> element defines a paragraph
What is an H TM L Element?
<col> It is used with <colgroup> element to specify column properties for each column.
<tr><th>First_Name</th><th>Last_Name</th><th>Marks</th></tr>
<tr><td>Sona</td><td>Jai</td><td>60</td></tr>
<tr><td>James</td><td>William</td><td>80</td></tr>
<tr><td>Swathi</td><td>Siva</td><td>82</td></tr>
<tr><td>Chathni</td><td>joshi</td><td>72</td></tr>
</table>
H T M L Lists
<head>
<title>HTML Frames</title>
</head>
</frameset>
</html>
HTML Forms
● HTML Form is a document which stores information of a user on a
web server using interactive controls
● The HTML <form> element is used to create an HTML form for user
input:
<form>
form elements
.</form>
HTML Form Elements
Tag Description
enctype Specifies how the form-data should be encoded when submitting it to the server
(only for method="post")
novalidate Specifies that the form should not be validated when submitted
rel Specifies the relationship between a linked resource and the current document
target Specifies where to display the response that is received after submitting the form
SAMPLE
CODE
<Html>
<head>
<title>
Registration Page
</title>
</head>
<body bgcolor="Lightskyblue">
<br>
<br>
<form>
<label> Firstname </label>
<input type="text" name="firstname" size="15"/> <br> <br>
<label> Middlename: </label>
<input type="text" name="middlename" size="15"/> <br> <br>
<label> Lastname: </label>
<input type="text" name="lastname" size="15"/> <br> <br>
<label>
Course :
</label>
<select>
<opti on value="Course">Course</option>
<opti on value="BCA">BCA</opti on>
<opti on value="BBA">BBA</opti on>
<opti on value="B.Tech">B.Tech</option>
<opti on value="MBA">MBA</option>
option value="MCA">MCA</option>
<opti on value="M.Tech">M.Tech</option>
</select>
<br>
<br>
<label>
Gender :
</label><br>
<input type="radio" name="male"/> Male <br>
<input type="radio" name="female"/> Female <br>
<input type="radio" name="other"/> Other
<br>
<br>
<label>
Phone :
</label>
<input type="text" name="country code" value="+91" size="2"/>
<input type="text" name="phone" size="10"/> <br> <br>
Address
<br>
<textarea cols="80" rows="5" value="address">
</textarea>
<br> <br>
Email:
<input type="email" id="email" name="email"/> <br>
<br> <br>
Password:
<input type="Password" id="pass" name="pass"> <br>
<br> <br>
Re-type password:
<input type="Password" id="repass" name="repass"> <br> <br>
<input type="button" value="Submit"/>
</form>
</body>
</html
QUESTIONS
1) How to insert an image in HTML?
Ans:A
3)A HTML form is to be designed to enable purchase of office stationery.
Required items are to be selected (checked). Credit card details are to be
entered and then the submit button is to be pressed. Which one of the
following options would be appropriate for sending the data to the server.
Assume that security is handled in a way that is transparent to the form
design.
Ans: B
4)Which of the following is the correct way to start an ordered list with the
count of numeric value 4?
Ans:D
5 )Consider a HTML table definition given below:
<table border=1>
<tr> <td rowspan=2> ab </td>
<td colspan=2> cd </td>
</tr>
<tr> <td> ef </td>
<td rowspan=2> gh </td>
</tr>
<tr> <td colspan=2> ik </td>
</tr>
</table>
The number of rows in each column and the number of columns in each
row are:
(a) (2,2,3) and (2,3,2) (c) (2,3,2) and (2,3,2)
(b) (2,2,3) and (2,2,3) (d) (2,3,2) and (2,2,3)
Ans: C
OUTLINE
● EMBEDDING MULTIMEDIA
○ HTML Video element
○ HTML Audio element
○ Object element
○ Embed element
○ Playing youtube video in HTML
● CSS
○ Syntax
○ Selectors
○ Form attributes
○ Sample
● QUESTIONS
● HTML VIDEO E L E M E N T
■ To show a video in HTML, use the <video> element:
Example
</video>
● HTML Audio element
○ The HTML <audio> element is used to play an audio file on a
web page
<audio controls>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
● The <object> Element
○ The <object> element defines an embedded object within an
HTML document.
○ It was designed to embed plug-ins (like Java applets, PDF
readers, and Flash Players) in web pages, but can also be used
to include HTML in HTML:
○ Example
Example
<embed src="audi.jpeg">
Playing a YouTube Video in HTML
● Define an <iframe> element in your web page
● Let the src attribute point to the video U R L
● Use the width and height attributes to specify the dimension of the
player
Example
src="https://www.youtube.com/embed/tgbNymZ7vqY">
</iframe>
CSS
● C S S is the language we use to style an HTML document.
● C S S describes how HTML elements should be displayed
● C S S stands for C a s ca di ng Style Sheets
● C S S saves a lot of work. It can control the layout of multiple web pages
all at once
● External stylesheets are stored in C S S files
C S S SYNTAX
A C S S rule consists of a selector and a declaration block.
The selector points to the HTML element you want to style.
The declaration block contains one or more declarations separated by
semicolons.
Each declaration includes a C S S property name and a value, separated
by a colon.
Multiple C S S declarations are separated with semicolons, and declaration
blocks are surrounded by curly braces.
EXAMPLE
p{
color: red;
text-align: center;
}
C S S SELECTORS
C S S selectors are used to "find" (or select) the HTML elements you want
to style.
p{
text-align: center;
color: red;}
The C S S id Selector
● The id selector uses the id attribute of an HTML element to select a
specific element.
● The id of an element is unique within a page, so the id selector is used to
select one unique element!
● To select an element with a specific id, write a hash (#) character,
followed by the id of the element.
#para1 {
text-align: center;
color: red;
}
The C S S class Selector
● The class selector selects HTML elements with a specific class attri
● To select elements with a specific class, write a period (.) character,
class name.
.center {
*{
text-align: center;
color: blue;
}
The C S S Grouping Selector
● The grouping selector selects all the HTML elements with the
same style definitions.
•h1, h2, p {
• Text-align: center;
color: red;
•}
Three Ways to Insert C S S
There are three ways of inserting a style sheet:
● External C S S
● Internal C S S
● Inline C S S
External C S S
● With an external style sheet, you can change the look of an entire
website by changing just one file!
● Each HTML page must include a reference to the external style sheet
file inside the <link> element, inside the head section.
<!DOCTYPE html>
<html>
<head>
h1 {
color: navy;
margin-left: 20px;
}
Internal C S S
● An internal style sheet may be used if one single HTML page has a
unique style.
● The internal style is defined inside the <style> element, inside the
head section.
<!DOCTYPE html>
<html>
<head><style>
body {
background-
color: linen;
}
h1 {
color: maroon;
margin-left: 40px;
}
</style></head>
<body>
<h1>This is a
heading</h1>
<p>This is a
Inline C S S
● An inline style may be used to apply a unique style for a single
element.
● To use inline styles, add the style attribute to the relevant element. The
style attribute can contain any C S S property.
<!DOCTYPE html>
<html><body>
</body></html>
QUESTIONS
1) If we want define style for an unique element, then which c s s selector
will we use ?
A.Id B.text
C.class D.name
Ans: A
2) Which element is used in the <HEAD> section on an HTML / XHTML
page, if we want to use an external style sheet file to decorate the page ?
A.<src> B.<link>
C.<style> D.<css>
Ans:B
3)In C S S , h1 can be called as
a. Selector
b. Attribute
c.Valu
e d.Tag
Ans:A
4)In css, “color:red” can be called as
a.Selector
b.Rule
c.Declarati on
d.Value
Ans:C