U-2 Website Development Using HTML & CSS Class XI 2020-21
U-2 Website Development Using HTML & CSS Class XI 2020-21
USING
HTMLUNIT-2
AND CSS
Web Application
Class XI
Learning Objectives
◦What is HTML?
◦Tags and Attributes
◦Container and Empty tags
◦Basic HTML tags
◦Formatting tags
◦Heading tags
◦Font tag
HTML
◦ HTML stands for Hyper Text Markup Language.
◦ An HTML file is a text file containing small markup tags.
◦ The markup tags tell the Web browser how to display the page.
◦ An HTML file must have an .htm or .html as file extension.
◦ Text editor to be used to write html code. Ex: notepad, notepad+
+ etc.…
HTML
Tags
Attributes
HTML Tags
◦ HTML tags are surrounded by the two characters < and > known
as angular brackets.
◦ HTML tags normally come in pairs like <b> (start tag) and </b>
(end tag) known as container tag.
◦ The text between the start and end tags is the content.
◦ HTML tags are not case sensitive, <b> means the same as <B>.
Attributes
◦ Tags can have attributes that define the behavior of the element.
◦ Attributes provide additional information about the HTML elements on your
page.
◦ The <tag> tells the browser to do something, while the attribute tells the
browser how to do it.
◦ Attributes should always be applied with start tag.
◦ The Attribute should always be applied with its name and value pair.
◦ You can add multiple attributes in one HTML element, but need to give
space between two attributes.
Container and Empty tags
◦ The container tag always comes in a set with an opening and a closing.
◦ The forward slash (/) in the closing tag tells the browser that the tag has ended.
bgcolor: This is used apply background color in the entire HTML document, and may
be specified either by the color name directly or by the six-digit hex code.
Points to remember
• full address of the image should be mentioned along with the extension of
image(.jpg,.jpeg,.png etc).
• It’s a good practice to keep the image in the same folder where your
webpage is saved. (You need not to mention full address.)
• Height and width are mentioned in pixels or % can be used.
Marquee Tag (<marquee> tag)
An HTML marquee is a scrolling piece of text displayed either horizontally across or vertically down your
webpage depending on the settings.
This is created by using HTML <marquees> tag.
Attribute Description
width This specifies the width of the marquee. This can be a value like 10 or 20% etc.
height This specifies the height of the marquee. This can be a value like 10 or 20% etc.
This specifies the direction in which marquee should scroll. This can be a value like up, down,
direction
left or right.
scrolldelay This specifies how long to delay between each jump. This will have a value like 10 etc.
This specifies the type of scrolling of the marquee. This can have a value like scroll, slide and
behavior
alternate.
scrollamount This specifies the speed of marquee text. This can have a value like 10 etc.
This specifies how many times to loop. The default value is INFINITE, which means that the
loop
marquee loops endlessly.
bgcolor This specifies background color in terms of color name or color hex value.
HTML links
A link or hyperlink allow users to move from one page to another.
The link starts at the source and points to the destination, which may be any web
resource, for example, an image, an audio or video clip, a PDF file, an HTML document
or an element within the document itself, and so on.
Links are specified in HTML using the <a> tag.
Anything (text, image) between the opening <a> tag and the closing </a> tag becomes
the part of the link that the user sees and clicks in a browser.
<a href="url">Link text</a>
The href attribute specifies the target of the link.
Link through Text
<a href="https://www.google.com/">Google Search</a>
<a href=contact.html>Tutorial Republic</a>
Link to file
<a href="downloads/test.zip">Download Zip file</a>
<a href="downloads/masters.pdf">Download PDF file</a>
<a href="downloads/sample.jpg">Download Image file</a>
link to mail
<a href = "mailto:abc@example.com”>Send Feedback </a>
THANK YOU
WEBSITE DEVELOPMENT
USING
HTML AND CSS
UNIT-2 (CONT.)
Web Application
Class XI
Learning Objectives
◦Ordered List
◦Unordered List
◦Nested List
◦Table
HTML lists
HTML lists are used to present list of information in well formed and semantic
way. There are different types of list in HTML and each one has a specific
purpose and meaning.
Unordered list
Used to create a list of related items, in no particular order.
Ordered list
Used to create a list of related items, in a specific order.
Note: Inside a list item you can put text, images, links, line breaks, etc. You
can also place an entire list inside a list item to create the nested list.
HTML Unordered Lists
An unordered list created using the <ul> element, and each list item starts with
the <li> element.
You can use type attribute for <ul> tag to specify the type of bullet you like.
By default, it is a disc.
<ul type = "square">
<ul type = "disc">
<ul type = "circle">
<html>
<head>
<title>HTML Unordered List</title>
</head>
<body>
<ul type = "square">
<li>Beetroot</li>
<li>Ginger</li>
<li>Potato</li>
<li>Radish</li>
</ul>
</body>
</html>
HTML Ordered Lists
An unordered list created using the <ol> element, and each list item starts with the <li>
element.
You can use type attribute for <ol> tag to specify the type of numbering you like.
By default, it is a number.
<ol type = "1"> - Default Numerals.
<ol type = "I"> - Upper-Case Numerals.
<ol type = "i"> - Lower-Case Numerals.
<ol type = "A"> - Upper-Case Letters.
<ol type = "a"> - Lower-Case Letters.
<html>
<head>
<title>HTML Ordered List</title>
</head>
<body>
<ol type = "a">
<li>Beetroot</li>
<li>Ginger</li>
<li>Potato</li>
<li>Radish</li>
</ol>
</body>
</html>
HTML Ordered Lists
You can use start attribute for <ol> tag to specify the starting point of
numbering you need.
<ol type = "1" start = "4"> - Numerals starts with 4.
<ol type = "I" start = "4"> - Numerals starts with IV.
<ol type = "i" start = "4"> - Numerals starts with iv.
<ol type = "a" start = "4"> - Letters starts with d.
<ol type = "A" start = "4"> - Letters starts with D.
<html>
<head>
<title>HTML Ordered List</title>
</head>
<body>
<ol type = "i" start = "4">
<li>Beetroot</li>
<li>Ginger</li>
<li>Potato</li>
<li>Radish</li>
</ol>
</body>
</html>
Nested List
HTML Tables
HTML table allows you to arrange data into rows and columns.
They are commonly used to display tabular data like product listings,
customer's details, financial reports, and so on.
You can create a table using the <table> element and it may consist one or
more <tr>, <th>, and <td> elements.
The <tr> element defines a table row.
The <th> element defines a table header.
The <td> element defines a table cell.
<head> <tr>
<title>Creating Tables in HTML</title> <td>2</td>
</head> <td>Clark Kent</td>
<body> <td>34</td>
<h2>HTML Table (Default Style)</h2> </tr>
<table border=1> <tr>
<tr> <td>3</td>
<th>No.</th> <td>Harry Potter</td>
<th>Name</th> <td>11</td>
<th>Age</th> </tr>
</tr> </table>
<tr> </body>
<td>1</td> </html
<td>Peter Parker</td>
<td>16</td>
</tr>
◦ <input type="reset"> defines a reset button that will reset all form values to their
default values.
Ex:
<select id="cars" name="cars" size="3" multiple>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="fiat" selected>Fiat</option>
<option value="audi">Audi</option>
</select>
The <textarea> Element
• The <textarea> element defines a multi-line input field (a text area).
• The rows attribute specifies the visible number of lines in a text area.
• The cols attribute specifies the visible width of a text area.
Ex:
<textarea>
The cat was playing in the garden.
</textarea>
The <fieldset> and <legend> Elements
Internal
Style sheet
Inline Style
sheet
CSS HTML
INLINE STYLESHEET
• You can apply style sheet rules directly to any HTML element using style
attribute of the relevant tag.
• It is done only when you are interested to make a particular change in any
HTML element only.
INTERNAL STYLESHEET
• When you want to apply Style Sheet rules to a single document only then you
can include those rules in header section of the HTML document using
<style> tag.
• Rules defined in internal style sheet override the rules defined in an external
CSS file.
EXTERNAL STYLESHEET
• When you need to use your style sheet to various pages, then it’s always
recommended to define a common style sheet in a separate file.
• A cascading style sheet file has extension as .css
• It will be included in HTML files using <link> tag.
External Style sheet
named as style.css
CSS Selector
CSS Selector: Element Example
h1
{
color : #36CFFF;
font-family : arial;
}
p
{
color : red;
text-align : center;
}
CSS Selector: ID Example
• The id selector is used to specify a style for a single, unique element.
• The id selector uses the id attribute of the HTML element, and is defined with a "#".
• All the elements having that id will be formatted according to the defined rule.
For Example:
<p id=“welcome”>Welcome to the wonderful world of HTML.</p>
#welcome
{
text-align : center;
color : red;
}
CSS Selector: Class Example
• The class selector is used to specify a style for a group of elements. Unlike the id
selector, the class selector is most often used on several elements.
• This allows you to set a particular style for many HTML elements with the same class.
• The class selector uses the HTML class attribute, and is defined with a "."
For Example:
<h2 class=“center”>Summary</h2>
<p class=“center”>Paragraph</p>
.center
{
text-align : center;
color : red;
}
CSS Selector: Universal & Grouping Example
video
CSS PROPERTIES
Some of the common properties used in CSS:
• Background Properties
• Border Properties
• Height and Width Properties
• Text Properties
• Font Properties
• List Properties
• Table Properties
Background Properties
CSS background properties are used to define the background effects of an
element.
background-color:#224576;
background-color color name|hex color|rgb color
Background-color:rgb(23,45,89);
image name along with
background-image background-image: url("paper.gif"); extension
repeat-x (horizontally)|
background-repeat background-repeat: repeat-x; repeat-y (vertically)|
no-repeat
border-width: 5px;
border-width or value in px|thin|mediumthick
border-width: medium;
The height and width properties may have the following values:
• auto - This is default. The browser calculates the height and width
• length - Defines the height/width in px, cm etc.
• % - Defines the height/width in percent of the containing block
normal|bold|bolder|lighter|
font-weight font-weight: bold; number from 100-900
disc|circle|decimal|square|
list-style-type list-style-type: lower-alpha; lower-roman|upper-roman|
lower-alpha|upper-alpha
height
width
as discussed earlier as discussed earlier
background-color
color
THANK YOU
WEBSITE DEVELOPMENT
USING
HTML AND CSS
UNIT-2 (CONT.)
Web Application
Class XI
Learning Objectives
◦Domain Name System
◦Domain Registration Process
◦PUBLISHING THE WEBSITES
Domain Name System
◦ The domain name system (DNS) is a naming database in which internet domain names are
located and translated into internet protocol (IP) addresses. The domain name system maps
the name people use to locate a website to the IP address that a computer uses to locate a
website.
◦ The Domain Name System (DNS) is a central part of the internet, providing a way to match
names (a website you are looking for) to numbers (the address for the website). Anything
connected to the internet - laptops, tablets, mobile phones, websites - has an Internet Protocol
(IP) address made up of numbers.
Types of Name Servers
◦ Name spaces are of two types: Flat name spaces and Hierarchical Names.
◦ The name assigned to machines must be carefully selected from a namespace with complete
control over the binding between the names and IP addresses.
Flat name space: The original set of machines on the Internet used flat namespaces, These
namespaces consisted of sequence of characters with no further structure. A name is assigned to
an address.
Hierarchical names: Hierarchical namespaces provides a simple yet flexible naming
structure. The namespace is partitioned at the top level.
Hierarchy of Name Servers
◦ Computers called name servers are responsible for keeping track of any changes and translating them
between IP address and domain addresses. They make sure that when you type in a Web URL you are
sent to the proper location and to the right person. They are responsible for properly routing all
messages and traffic on the Internet.
THANK YOU