Task 8 HTML
Task 8 HTML
homepage
HTML Introduction :
HTML stands for HyperText Markup Language. It is used to design web pages using a markup
language. HTML is the combination of Hypertext and Markup language. Hypertext defines the
link between the web pages. A markup language is used to define the text document within tag
which defines the structure of web pages. This language is used to annotate (make notes for
the computer) text so that a machine can understand it and manipulate text accordingly. Most
markup languages (e.g. HTML) are human-readable. The language uses tags to define what
manipulation has to be done on the text.
HTML is a markup language used by the browser to manipulate text, images, and other
content, in order to display it in the required format. HTML was created by Tim Berners-Lee in
1991. The first-ever version of HTML was HTML 1.0, but the first standard version was HTML
2.0, published in 1999.
Elements and Tags: HTML uses predefined tags and elements which tell the browser how to
properly display the content. Remember to include closing tags. If omitted, the browser applies
the effect of the opening tag until the end of the page.
HTML page structure: The basic structure of an HTML page is laid out below. It contains the
essential building-block elements (i.e. doctype declaration, HTML, head, title, and body
elements) upon which all web pages are created.
Features of HTML:
It is easy to learn and easy to use.
It is platform-independent.
Images, videos, and audio can be added to a web page.
Hypertext can be added to text.
It is a markup language.
Why learn HTML?
It is a simple markup language. Its implementation is easy.
It is used to create a website.
Helps in developing fundamentals about web programming.
Boost professional career.
Advantages:
HTML is used to build websites.
It is supported by all browsers.
It can be integrated with other languages like CSS, JavaScript, etc.
Disadvantages:
HTML can only create static webpages. For dynamic webpages, other languages have
to be used.
A large amount of code has to be written to create a simple web page.
The security feature is not good.
Tags contains Elements, attribute and value:
• Body
• Display your HTML document in Web browser (File -> Open or double click on File)
• <br> tag is a break tag. Used to break up the current line and cursor goes to next line.
• <hr> tag is used to display the horizontal line. Attributes of <hr> tag is
– Align = left/right/center
– Width – horizontal width of the line
– Size – vertical size of the line
– Noshade – displayed in two-dimensional
• Used to sets the font properties to the text on the webpage.
• Attributes:
– Face : sets the font type like Arial,tahoma.
– Size : Sets the size of the text. possible values are 1 through 7.
– Color : Sets the color of the text.
– Example :
<font face=“Arial” size=7 color=“red”> This is font tag </font>
• Formats the text into a paragraph and adds space before the paragraph.
• Attributes:
– Align : sets the alignment of the text in the paragraph. Possible values are LEFT,
RIGHT,CENTER,JUSTIFY
• Displays scrolling text in a marquee style.
• Attributes
– Align: Sets the alignment of the text relative to marquee box. Possible values
are TOP(default),MIDDLE,BOTTOM.
– Behavior : Sets how the text in the marquee should move. Can be
SCROLL,SLIDE,ALTERNATE.
– Bgcolor : Sets the background color for the marquee box.
– Direction : Sets the direction of the text should scroll.
Can be LEFT(default),RIGHT,DOWN,UP.
• Tells the browser that the enclosed text is preformatted and display it as it is on the
browser.
<pre>
preformatted text
</pre>
• Used for putting the text in terms of blocks so we can apply the styles to individual
blocks.
• Attributes
– Align : Sets the horizontal alignment of the element in the page. Possible values are
LEFT(default),RIGHT,CENTER,JUSTIFY.
– Refer to other sources such as HTML documents and images. Both text and images can
act as hyperlinks.
– Attributes :
• Href : Holds the target URL of the hyperlink. Either this attribute or NAME
attribute must be used.
• Name : Specifies an anchor name, the name we want to use is as the target of a
hyperlink.
• Accesskey : Assigns a keyboard shortcut to the hyperlink. Set to a single
alphanumeric value.
• Tabindex : Sets the tab sequence of hyperlinks in the page (pressing the tab key
moves from one to the next hyperlink).
• Title: Holds the text that will be displayed in tool tips when the mouse moves
over the hyperlink.
List Tags:
Lists may be used for a piece of information and for providing a straightforward index
to the site.
• HTML provides three types of lists.
– Unordered Lists - <ul>
– Ordered Lists - <ol>
Definition Lists - <dl>
• The ordered and unordered lists are each made up of sets of list items. Elements of a list
may be formatted with <li> tag.
<li>Win98</li>
<li>Win XP</li>
<li>Windows Millennium</li>
<li>Windows Vista </li>
<li> Windows 7 </li>
<ul> tag is used to create an unordered list. This list has a bullet in front of each list item.
Every list item in <ul> tag must be encapsulated within
<li>..</li> tag.
Attributes
Type : Specifies the type of list item. For unordered list sets to DISC(solid bullet),
SQUARE(solid square),CIRCLE(hollow bullet).
Compact : stand alone attribute specifying that compact rendering be used.
eg : <ul compact>
• <ol> tag is used to Create an ordered list. This list has a sequence of numbers in front of
each list item. Every list item in <ol> tag must be encapsulated within <li>..</li> tag.
• Attributes
– Type : Specifies the type of list item. For ordered list sets to A, a, I, i ,1.
– Compact : stand alone attribute specifying that compact rendering be used.
eg : <ol compact>
<b>This is an Ordered List:</b> <br>
<OL>
</OL>
<UL>
• BORDER : To display a table with borders, we will have to use the border attribute.
• CELLSPACING : This attribute allows control over the space used between cells in a table.
The value should be a pixel value.
• CELLPADDING : This attribute allows control over the space inserted between the cell data
and cell wall in a table.The value should be a pixel value.
• WIDTH : This attribute is used to describe the desired width of this table, either as an
absolute width in pixels, or a percentage of document width.
• HEIGHT : This attribute describes the height of the table, either as a particular pixel value,
or as a percentage of the display window.
• ALIGN : It allows a table to be aligned to the left or right of the page, allowing text to flow
around the table.
• BGCOLOR : It allows the background color of the table to be specified, using either the
specified color names, or a rrggbb hex triplet.
• BORDERCOLOR : This attribute used to set the border color of the table.
• Creates a row in a table. Contains multiple <TD> or
<TH> elements.
• Attributes
– Align : Specifies the horizontal alignment of the text in this table row. Set to LEFT,
CENTER,RIGHT.
– Bgcolor : Sets the background color of the table cells.
– Bordercolor : Sets the external border color for the row.
– Valign :Sets the vertical alignment of the data in this row.
Sets to TOP, MIDDLE, BOTTOM.
• Creates a table headings; just like table data but usually bold and centered vertically and
horizontally.
• Attributes
– Align : Specifies the horizontal alignment of the text in this table row. Set to LEFT,
CENTER, RIGHT.
– Bgcolor : Sets the background color of the table cells.
– Bordercolor : Sets the external border color for the row.
– Valign :Sets the vertical alignment of the data in this row. Sets to
TOP,MIDDLE,BOTTOM.
– Width : Specifies the width of the cell. Set to either pixel value or percentage of the
display area.
– Height : Specifies the height of the cell. Set to either pixel value or percentage of the
display area.
– Colspan : Indicates how many cell columns of the table this cell should span. Set to
a positive integer.
– Rowspan : Indicates how many rows of the table this cell should span. Set to a
positive integer.
– Nowrap : Specifies that data in the cell should not be wrapped by the browser ,
meaning the table cell will be made long enough to fit the contents without line
breaks.
• Specifies the data for a table cell. Used inside the <TABLE> tag.
• Attributes
– Align
-- VAlign
Syntax
The basic syntax of the <menu> tag is given with:
HTML / XHTML: <menu> ... </menu>
The following table shows the attributes that are specific to the <menu> tag.
Aim: Develop your home page using HTML Consisting of your photo, name, address and
education details as a table and your skill set as a list.
HTML CODE:
<html>
<head>
<title> Home Page</title>
</head>
<center>
<body>
<body style="background-color:ORANGE;">
<img src="photo.jpg" height=100 width=100>
<h1> NAME : NAME</h1>
<h1><pre>
Address:Dr No,
Village,
Mandal,State,
PINCODE-xxxxx.
</pre></h1>
<h1> Educational Details</h1>
<table border=1>
<tr>
<th>Course </th>
<th>Name of the Institutation</th>
<th>Year of Pass</th>
<th>Percentage</th>
</tr>
<tr>
<td>B.TEch(IT) </td>
<td>College Name</td>
<td>Pursuing</td>
<td>Percentage</td>
</tr>
<<tr>
<<td>Intermediate </td>
<td>College Name</td>
<td>Year</td>
<td>Percentage</td>
</tr>
<td>SSC</td>
<td>SChool Nmae</td>
<td>Year</td>
<td>Percentage</td>
</tr>
</table>
<h1>Technical Skills:</h1>
<ultype=disc>
<li>Programming Languages : C, JAVA</li>
<li>Operating Systems : Windows </li>
<li>Database Systems : Oracle</li>
<li>Web Technologies</li>
</ul>
</body>
</center>
</html>