HTML-5 Tags
HTML-5 Tags
HTML-5 Tags
Head tags:
<title>,<style>,<script>,<link>,<meta> and <base>.
Text-formatting tags:
<h>,<b>,<strong>,<small>,<pre>,<i>,<em>,<sub>,<sup>,<ins>,<dfn>,<
del>,<div> and <span>.
Link tags:
<a>, <base>.
List tags:
<ul>, <ol>, <li>, <dl>, <dd>
Table tags:
<table> ,<tr> , <td>, <th>, <thead>, <tbody>, <tfoot>.
Form tags:
<form>, <input>, <select>, <option>, <button>, <label>, <fieldset>,
<textarea>.
Scripting tags:
**<script>, <noscript>
Image and Object tags:
<img>, <figure>, <figcaption>, <area>, <map>, <object>.
HEAD TAGS:
<head>
<meta charset="UTF-8">
<meta name="author" content="GOMATHI CHARLEY">
<meta name="description" content="MERN-STACK-HTML-FILE">
<meta name="keywords" content="MERN STACK, HTML, CSS, JavaScript">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
</head>
VIEW PORT:
----------
<base>
Two attributes
So lets say we give relative url for an image, it will search for it in the url website what u give in base
Ex:
Relaive - ./tamil
Pre ----- content given here will be stand alone text will take its required space wont get wrapped
h<sub>2</sub>o
a<sup>2</sup>+b<sup>2</sup>
del … ins
<div style="background-color:#FFF4A3;">
<h2>DIV BLOCK 1</h2>
<p></p>
</div>
<div style="background-color:#FFC0C7;">
<h2>DIV BLOCK 2</h2>
<p></p>
</div>
<div style="background-color:#D9EEE1;">
<h2>DIV BLOCK 3</h2>
<p></p>
</div>
</body>
<style>
div {
width:30%;
display:inline-block;
}
</style>
Float:
<style>
div.mycontainer {
width:100%;
overflow:auto;
div.mycontainer div {
width:33%;
float:left;
</style>
SPAN:
Same as div
Div is block
<a href=https://en.wikipedia.org/wiki/MS_Dhoni>doni</a>
<ol>
<lh>flowers</lh>
<li>rose</li>
<li>lilly</li>
</ol>
<ul>
<lh>flowers</lh>
<li>rose</li>
<li>lilly</li>
</ul>
TABLE:
<table>
<th>NAME</th>
<th>FAV-COMEDIAN</th>
<tr>
<td>sylvia</td>
<td>vadivelu</td>
</tr>
<tr>
<td>sam</td>
<td>Mr Bean</td>
</tr>
</table>
TABLE BORDER:
<table border="5">
<style>
table, th, td {
border: 5px solid red;
border-collapse: collapse;
}
</style>
th, td {
background-color: yellow;
}
Designs
<style>
table, th, td {
border: 1px solid black;
border-radius: 10px;
}
th, td {
background-color: yellow;
}
</style>
font-size: 20px;
<table style="width:100%">
<tr>
<th style="width:70%">Firstname</th>
VERTICAL TABLE:
<table border="1">
<tr>
<th>SPORT</th>
<td>FOOT BALL</td>
<td>CRICKET</td>
</tr>
<tr>
<th>PLAYER</th>
<td>MESSI</td>
<td>DHONI</td>
</tr>
<tr>
<th>COUNTRY</th>
<td>BRAZIL</td>
<td>INDIA</td>
</tr>
</table>
PADDING SPACING
th, td {
padding-top: 10px;
padding-bottom: 20px;
padding-left: 30px;
padding-right: 40px;
MERGING CELLS:
Rowspan / colspan
<table style="width:20%">
<tr>
<th colspan="2">ANIMAL</th>
<th>BREED</th>
</tr>
<tr>
<td>DOG</td>
<td>FOX</td>
<td>BIRD</td>
</tr>
<tr>
<td>LAB</td>
<td>Jack</td>
<td>COCKTAIL</td>
</tr>
</table>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="refresh" content="10">
<title>CHECK THIS OUT</title>
<script></script>
<base href="https://unsplash.com/" target="_blank">
<style>
div {
width:30%;
display:inline-block;
}
</style>
</head>
<body>
<h1>be happy yaaaaar</h1>
<p><small>SMALL</small>dgdgdgdg <pre >65656565656565656 45454545454
77676767676 787878787 878787
888888888888888888888888888888888888888888888888888888888888888888888888888888
888888888888888888888888888888888888888888888888888888888888888888888888888888
88888888888888888888888888888888888888888888888888888888888888888</pre> gfg
fgf g fg fg fg f gf g fg f gf g
<em>emphasize</em>
h<sub>2</sub>o
a<sup>2</sup>+b<sup>2</sup>
<div style="background-color:#FFC0C7;">
<h2>DIV BLOCK 2</h2>
<p></p>
</div>
<div style="background-color:#D9EEE1;">
<h2>DIV BLOCK 3</h2>
<p></p>
</div>
<p>
<a href="https://en.wikipedia.org/wiki/MS_Dhoni">dhoni</a>
<ol>
<lh>flowers</lh>
<li>rose</li>
<li>lilly</li>
</ol>
<ul>
<lh>flowers</lh>
<li>rose</li>
<li>lilly</li>
</ul>
<table border="5">
<th>NAME</th>
<th>FAV-COMEDIAN</th>
<tr>
<td>sylvia</td>
<td>vadivelu</td>
</tr>
<tr>
<td>sam</td>
<td>Mr Bean</td>
</tr>
</table>
<table border="1">
<tr>
<th>SPORT</th>
<td>FOOT BALL</td>
<td>CRICKET</td>
</tr>
<tr>
<th>PLAYER</th>
<td>MESSI</td>
<td>DHONI</td>
</tr>
<tr>
<th>COUNTRY</th>
<td>BRAZIL</td>
<td>INDIA</td>
</tr>
</table>
<table style="width:20%">
<tr>
<th rowspan="2">ANIMAL</th>
<th>BREED</th>
</tr>
<tr>
<td>DOG</td>
<td>FOX</td>
<td>BIRD</td>
</tr>
<tr>
<td>LAB</td>
<td>Jack</td>
<td>COCKTAIL</td>
</tr>
</table>
</body>
</html>
ZEBRA STRIPES – NTH CHILD
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
th:nth-child(even),td:nth-child(even) {
background-color: purple;
}
</style>
</head>
<body>
<table style="width:100%">
<tr>
<th>ONE</th>
<th>TWO</th>
<th>THREE</th>
<th>FOUR</th>
<th>FIVE</th>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</body>
</html>
HOW CAN I GET THE BELOW TABLE AND 3RD AND 4TH COLUMN SHOULD BE COLOURED
MO TU WE TH FR SA SU
N E D U I T N
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
Use colgroup
<head>
<style>
table, th, td {
border: 5px solid black;
border-collapse: collapse;
}
</style>
</head>
<body>
<table style="width: 20%;">
<colgroup>
<col span="2">
<col span="2" style="background-color: pink">
</colgroup>
<tr>
<th>MON</th>
<th>TUE</th>
<th>WED</th>
<th>THU</th>
<th>FRI</th>
<th>SAT</th>
<th>SUN</th>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
<tr>
<td>8</td>
<td>9</td>
<td>10</td>
<td>11</td>
<td>12</td>
<td>13</td>
<td>14</td>
</tr>
<tr>
<td>15</td>
<td>16</td>
<td>17</td>
<td>18</td>
<td>19</td>
<td>20</td>
<td>21</td>
</tr>
<tr>
<td>22</td>
<td>23</td>
<td>24</td>
<td>25</td>
<td>26</td>
<td>27</td>
<td>28</td>
</tr>
</table>
</body>
</html>
FORMS:label and input
<!DOCTYPE html>
<html>
<body>
<form>
<label for="name">User name:</label>
<input type="text" id="fname" name="fname"><br><br>
<label for="pswd">Password:</label>
<input type="password" id="lname" name="lname"><br><br>
</form>
</body>
</html>
FORM ELEMENTS:
<label for="drmenu">SELECT:</label>
<select id="ns" name="NUMBERS">
<option value="one">ONE</option>
<option value="two">TWO</option>
<option value="three">THREE</option>
Button
<button type="button" onclick="alert('check man')">Click Me!</button>
MULTIMEDIA TAGS:
Video
IFRAME:
3.Restaurant menu
Includes – chain of thr outlets with location
Menu
List of items
Description
Price
Over all and individual items offer details
QUIZ:
9.write simple code to create two files html and css , link css with
html
10.write any three selectors of css
TASK:
Create an attractive landing page for india.com website with Indian map
added to it
CSS SELECTORS: