Web Ass1
Web Ass1
The full form of HTTP is the The full form of HTTPS is Hypertext Transfer
Hypertext Transfer Protocol. Protocol Secure.
The HTTP transmits the data over The HTTPS transmits the data over port number
port number 80. 443.
It is unsecured as the plain text is It is secure as it sends the encrypted data which
sent, which can be accessible by hackers cannot understand.
the hackers.
It does not use SSL. It uses SSL that provides the encryption of the
data.
Google does not give the Google gives preferences to the HTTPS as
preference to the HTTP websites. HTTPS websites are secure websites.
The page loading speed is fast. The page loading speed is slow as compared to
HTTP because of the additional feature that it
supports, i.e., security.
HTML Lists
HTML Lists are used to specify lists of information. All lists may contain one or more list
elements. There are three different types of HTML lists:
1. Ordered List or Numbered List (ol)
2. Unordered List or Bulleted List (ul)
3. Description List or Definition List (dl)
HTML Ordered List
In the ordered HTML lists, all the list items are marked with numbers by default. It is known
as numbered list also. The ordered list starts with <ol> tag and the list items start with <li>
tag.
<ol>
<li>Aries</li>
<li>Bingo</li>
<li>Leo</li>
<li>Oracle</li>
</ol>
Output:
1. Aries
2. Bingo
3. Leo
4. Oracle
The type Attribute.
You can use type attribute for <ul> tag to specify the type of bullet you like. By default, it
is a disc. Following are the possible options.
<ul type = "square">
<ul type = "disc">
<ul type = "circle">
Example:
<ul type = "square">
<li>Beetroot</li>
<li>Ginger</li>
<li>Potato</li>
<li>Radish</li>
</ul>
Output:
Beetroot
Ginger
Potato
Radish
HTML Unordered List
In HTML Unordered list, all the list items are marked with bullets. It is also known as
bulleted list also. The Unordered list starts with <ul> tag and list items start with the <li> tag.
<ul>
<li>Aries</li>
<li>Bingo</li>
<li>Leo</li>
<li>Oracle</li>
</ul>
Output:
o Aries
o Bingo
o Leo
o Oracle
HTML Text Formatting Elements
Tag Description
<table>
<tr>
<th colspan="2" rowspan="2">merged cell</th>
<th>Column 3</th>
</tr>
<tr>
<td>Column 3</td>
</tr>
<tr>
<td>Column 1</td>
<td>Column 2</td>
<td>column 3</td>
</tr>
</table>
</body>
</html>
<body>
<h1>numbers</h1>
<ol>
<li>Ice Cream</li>
<li>Chocoba</li>
<li>Cold Coffee</li>
</ol>
<h1>ALPHABET</h1>
<ol type="A">
<li> Sugar</li>
<li>Salt</li>
<li>Sour</li>
</ol>
<h1>alphabet</h1>
<ol type="a">
<li>car</li>
<li>card</li>
<li>cash</li>
</ol>
<h1>Roman Numerals</h1>
<ol type="I">
<li>Aeroplane</li>
<li>Bus</li>
<li>Ship</li>
</ol>
<ol type="i">
<li>Air</li>
<li>Water</li>
<li>Fire</li>
</ol>
Image description
<
<html lang="en">
<body>
<p>
This is Marianne.
</p>
</body>
</html>
Selector Forms:
The selector can have variety of forms:
1. Simple selector form
2. Class selector
3. Id selector
4. Contexual Selectors
5. Universal selector
6. Pseudo classes
1.Simple selector forms
• The selector is a tag name or a list of tag names, separated by commas
• Consider the following examples, in which the property is font-size and the property value
is a number of points :
• h1, h3 { font-size: 24pt ;}
• h2 { font-size: 20pt ;}
2.Class Selector
• Used to allow different occurrences of the same tag to use different style specifications
• A style class has a name, which is attached to a tag name
p.normal {property/value list}
p.warning{property/value list}
• The class you want on a particular occurrence of a tag is specified with the class attribute of
the tag
• For example,
<p class = "normal">
A paragraph of text that we want to be presented in ‘normal’
presentation style</p>
<p class = "warning">
A paragraph of text that is a warning to the reader ,which should be
presented in an especially noticeable style.
</p>
CLASSES
• HTML and XHTML require each id be unique– therefore an id
value can only be used once in a document.
• You can mark a group of elements with a common identifier
using the class attribute.
3.id Selectors
• An id selector allow the application of a style to one specific element.
• General form:
#specific-id {property-value list}
Example:
#section14 {font-size: 20}
Specifies a font size of 20 points to the element
<h2 id = “section14”>Hello</h2>
4.Contexual selectors
• Selectors can also specify that the style should apply only to elements in certain positions in
the
document .This is done by listing the element hierarchy in the selector.
Eg: body b em {font-size: 24pt ;}
• In the eg, selector applies its style to the content of emphasis elements that are descendants
of bold elements in the body of the document.
It is also called as descendant selectors. It will not apply to emphasis element not descendant
of bold face element.
5.Universal Selectors
• The universal selector denoted by an asterisk(*). It applies its style to all elements in the
document
For Eg:
* {color : red}
Makes all elements in the document red.
6.Pseudo Classes
• Pseudo classes are styles that apply when something happens, rather than because the target
element(tag) simply exists. Names begin with colons
The style of hover pseudo classes apply when the mouse cursor is over the element.The style
of focus pseudo classes apply when an element has focus (mouse cursor over the element and
click the left mouse button)
Example:
• Input:hover {color: red;}
Pseudo Class Example
<!-- pseudo.html -->
<!DOCYPE html>
<html lang=”en”>
<head>
<title>Pseudoclasses</title>
<meta charset=”utf-8” />
<style type = "text/css">
input:hover {color: red;}
input:focus {color: green;}
</style>
</head>
<body>
<form action = "">
<p>
Your name:
<input type = "text" />
</p>
</form>
</body>
</html>
form
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<label for="name">Name:</label>
<label for="password">Password:</label>
<label for="email">Email:</label>
<label>Gender:</label>
<label for="male">Male</label>
<label for="female">Female</label><br><br>
<label for="contact">Contact:</label>
<option value="none">Select</option>
<option value="engineering">Engineering</option>
<option value="science">Science</option>
<option value="arts">Arts</option>
</select><br><br>
<label for="branches">Branch:</label>
<option value="none">Select</option>
</select><br><br>
<label>Hobbies:</label><br>
<label for="address">Address:</label>
</form>
<script>
document.getElementById("qualifications").addEventListener("change", function () {
branches[i].style.display = "none";
branchesSelect.style.display = "block";
branchesSelect.style.display = "block";
branchesSelect.style.display = "block";
} else {
});
</script>
</body>
</html>