web development basics tables part2
-
Upload
kalluri-vinay-reddy -
Category
Education
-
view
116 -
download
2
description
Transcript of web development basics tables part2
![Page 1: web development basics tables part2](https://reader031.fdocuments.us/reader031/viewer/2022012916/54b1932b4a7959752b8b45a3/html5/thumbnails/1.jpg)
WEB DEVELOPMENT BASICS
BY
KALLURI VINAY REDDY
12MSE1013
VIT CHENNAI
![Page 2: web development basics tables part2](https://reader031.fdocuments.us/reader031/viewer/2022012916/54b1932b4a7959752b8b45a3/html5/thumbnails/2.jpg)
TOPICS
Head of tablesNaming your Table Styles in heads Introduction to div tag, span.
![Page 3: web development basics tables part2](https://reader031.fdocuments.us/reader031/viewer/2022012916/54b1932b4a7959752b8b45a3/html5/thumbnails/3.jpg)
HEAD OF THE TABLE
To make our table look a little more like a table, we’ll use the <thead> and <tbody> tags
These go within the <table> tag and stand for table head and table body ,respectively
The <head> HTML tag contains information about a web page
The <body> tag contains the contents of the web page.
The <thead> tag can be thought of as containing information about a table and the <tbody> tag containing the actual tabular data.
![Page 4: web development basics tables part2](https://reader031.fdocuments.us/reader031/viewer/2022012916/54b1932b4a7959752b8b45a3/html5/thumbnails/4.jpg)
SAMPLE CODE
<html>
<head>
<title>Table Time</title>
</head>
<body>
<table border="10px">
<tbody>rich</tbody>
<tr>
<td>King Kong</td>
<td>1933</td>
</tr>
</table>
</body>
</html>
![Page 5: web development basics tables part2](https://reader031.fdocuments.us/reader031/viewer/2022012916/54b1932b4a7959752b8b45a3/html5/thumbnails/5.jpg)
TABLE HEADS
We have just added a <thead> tag above the <tbody>.
It will hold the heading for each column.
![Page 6: web development basics tables part2](https://reader031.fdocuments.us/reader031/viewer/2022012916/54b1932b4a7959752b8b45a3/html5/thumbnails/6.jpg)
SAMPLE CODE FOR TABLE HEAD
<html>
<head>
<title>Table Time</title>
</head>
<body>
<table border="1px">
<thead>VINAY</thead>
<tr>
<th>items</th>
<th>names</th>
</tr>
<td>
famous monster
</td>
<td>monkey</td>
</tbody> </table>
</body></html>
![Page 7: web development basics tables part2](https://reader031.fdocuments.us/reader031/viewer/2022012916/54b1932b4a7959752b8b45a3/html5/thumbnails/7.jpg)
NAMING YOUR TABLE
Our table is missing a little.
We want to add a title row that goes all the way across the top.
To do so, we need to use the colspan attribute for the <th> tag.
By default table cells take up 1 column
If we want a table cell to take up the space of 3 columns instead of 1 ,we can set the colspan attribute to 3
![Page 8: web development basics tables part2](https://reader031.fdocuments.us/reader031/viewer/2022012916/54b1932b4a7959752b8b45a3/html5/thumbnails/8.jpg)
SAMPLE CODE
<html>
<head>
<title>Table Time</title>
</head><body>
<table border="10px">
<thead>
<tr> <th>Famous Monsters by Birth Year</th>
<th colspan="2">what the next</th>
</tr> <tr>
<th>Famous Monster</th>
<th colspan="2">Birth Year</th> </tr>
</thead>
<tbody>
<tr>
<td>King Kong</td> <td>1933</td>
</tr>
</tbody></table></body></html>
![Page 9: web development basics tables part2](https://reader031.fdocuments.us/reader031/viewer/2022012916/54b1932b4a7959752b8b45a3/html5/thumbnails/9.jpg)
STYLE THE TABLE
Your table is starting to look great, but it's still a little bland.
We've gone ahead and added some styling to the table to make it a bit easier to read.
It's your job to add the finishing touches!
Note:
Code cannot be give because of the number of lines if needed can be requested through mail.
![Page 10: web development basics tables part2](https://reader031.fdocuments.us/reader031/viewer/2022012916/54b1932b4a7959752b8b45a3/html5/thumbnails/10.jpg)
INTRODUCTION TO DIV TAG, SPAN.
‘DIV’ide and conquer
One of the most versatile structure tags available to you is the <div></div> tag
Short for “division “ ,<div> allows your page into containers (that is, different pieces).
This will come in handy when you begin learning CSS in the next coming classes where you’ll be able to style
different parts of your website individually
![Page 11: web development basics tables part2](https://reader031.fdocuments.us/reader031/viewer/2022012916/54b1932b4a7959752b8b45a3/html5/thumbnails/11.jpg)
SAMPLE CODE<!DOCTYPE html>
<html>
<head>
<title>Result</title>
</head>
<body>
<div style="width:50px; height:50px; background-color:red"></div>
<div style="width:50px; height:50px; background-color:blue"></div>
<div style="width:50px; height:50px; background-color:green"></div>
<div style="width:50px;height:50px;background-color:yellow"></div>
</body></html>
![Page 12: web development basics tables part2](https://reader031.fdocuments.us/reader031/viewer/2022012916/54b1932b4a7959752b8b45a3/html5/thumbnails/12.jpg)
HOW TO LINK THEM ?
<!DOCTYPE html>
<html>
<head>
<title>Result</title>
</head>
<body>
<div style="width:50px; height:50px; background-color:red"></div>
<div style="width:50px; height:50px; background-color:blue"></div>
<div style="width:50px; height:50px; background-color:green"></div>
<a href="www.google.co.in"><div style="width:50px; height:50px; background-color:yellow"></div></a>
</body></html>
![Page 13: web development basics tables part2](https://reader031.fdocuments.us/reader031/viewer/2022012916/54b1932b4a7959752b8b45a3/html5/thumbnails/13.jpg)
The code in the above slide divides the web page into four parts
Each part has its own colour and size.
But the yellow colour in the web page when you click it goes to the google website
That is linking is done through the <a></a> tags very important tags in the webpage design.
![Page 14: web development basics tables part2](https://reader031.fdocuments.us/reader031/viewer/2022012916/54b1932b4a7959752b8b45a3/html5/thumbnails/14.jpg)
SPAN
• <span> allows you to control styling for smaller parts of your page, such as text
• For example , if you always want the first word of your paragraphs to be red
• You can do it by wrapping each first word in <span></span> tags .
![Page 15: web development basics tables part2](https://reader031.fdocuments.us/reader031/viewer/2022012916/54b1932b4a7959752b8b45a3/html5/thumbnails/15.jpg)
SAMPLE CODE FOR SPAN
<!DOCTYPE html>
<html>
<head>
<title></title> </head>
<body>
<p>This text is black, except for the word <span style="color:red">red</span>!</p>
</body>
</html>
![Page 16: web development basics tables part2](https://reader031.fdocuments.us/reader031/viewer/2022012916/54b1932b4a7959752b8b45a3/html5/thumbnails/16.jpg)
With this we have completed major elements in web designing without adding any decoration or animation we can say effects in later slides I will discuss about them clearly relating to the HTML concepts
![Page 17: web development basics tables part2](https://reader031.fdocuments.us/reader031/viewer/2022012916/54b1932b4a7959752b8b45a3/html5/thumbnails/17.jpg)
REFERENCES
www.codecademy.com
Head first web design .
Learning web design-Jennifer Niederst Robbins
www.w3schools.com