HTML Basics
University of Gondar
Faculty of Informatics
Computer Science Department
Internet programming
Abebe Alemu
5/18/2019 HTML Basics 1
Outline
•HTML-Link
HTML Basics •HTML-Table
II
5/18/2019 HTML Basics 2
HTML Link
A webpage contain links to other pages or specific
HTML parts of a given page and it is called hyperlinks.
LINK Hyperlinks allow visitors to navigate between Web
sites by clicking on words, phrases, and images.
A link is specified using HTML tag <a>. This tag is
called anchor tag
<a href="Document URL" ... attributes-list>Link
Text</a>
5/18/2019 HTML Basics 3
HTML Link
Target _blank: Opens the linked document in a new window or
tab.
Attribute
_self :Opens the linked document in the same frame.
_parent: Opens the linked document in the parent frame.
_top: Opens the linked document in the full body of the
window.
Targetframe: Opens the linked document in a
named targetframe.
5/18/2019 HTML Basics 4
HTML Link
You can create a link to a particular section of a given webpage by
Linking using nameattribute. This is a two step process.
to a Step 1:<h1>HTML text link <a name=“top”></a></h1> --name a place in
webpage
Page
Step 2: <a href=“#top”>Goto top</a> --link to the place where the top
Section is located
It's simple to use an image as hyperlink
HTML
Image just need to use an image inside hyperlink at the place of text as shown
below
Links
<a href=“page1.html”><img src=“aa.jpg”></a>
5/18/2019 HTML Basics 5
HTML-Table
The HTML tables allow web authors to arrange data like text,
HTML images, links, other tables, etc. into rows and columns of cells.
Tables The HTML tables are created using the <table> tag in which
the <tr> tag is used to create table rows
<td> tag is used to create data cells.
5/18/2019 HTML Basics 6
HTML Table Example
5/18/2019 HTML Basics 7
Table Heading
• Table heading can be defined using <th> tag.
5/18/2019 HTML Basics 8
Cell-padding and cell-spacing attribute
• adjust the white space in your table cells.
• The cellspacing attribute defines the width of the border
• cellpadding represents the distance between cell borders
and the content within a cell.
5/18/2019 HTML Basics 9
Colspan and Rowspan Attribute
• Colspan->merge 2 or more column
• Rowspan->Merge 2 or more row
5/18/2019 HTML Basics 10
Table Backgrounds
• Bgcolor attribute: set background color to all table or a cell
• Background attribute: set image background to table / a cell
• Bordercolor: to set border color of a table
5/18/2019 HTML Basics 11
Thank You
5/18/2019 HTML Basics 12