HTML
• The HyperText Markup Language
• The language used to design web pages
• The HyperText Markup Language
• The language used to design web pages
• Text Mixed with Markup Tags
– Tags Enclosed in Angle Brackets (<H1>Introduction</H1>)
The HTML document itself begins with <html> and ends with </html>.
The visible part of the HTML document is between <body> and </body>.
– Tags Enclosed in Angle Brackets (<H1>Introduction</H1>)
HTML Basic Examples
1. HTML DocumentsThe HTML document itself begins with <html> and ends with </html>.
The visible part of the HTML document is between <body> and </body>.
Example:
<html>
<body><h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>

that is the output when we use notepad.
2. HTML Tables
• Tables are defined with the <table> tag.
• Tables are divided into table rows with the <tr> tag. • Table rows are divided into table data with the <td> tag.
• A table row can also be divided into table headings with the <th> tag.
<html><head><META http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body>
<div>
<h4> Without cellpadding : </h4>
<table border="1">
<tr>
<td> Nukman Naim </td>
<td> <a href="https://www.facebook.com/nukmannaim.nazmi" target="_blank"><wbr>fb nukman</a></td>
</tr>
<tr>
<td> Syahriman96 </td>
<td><a href="https://www.instagram.com/syahriman96/?hl=en" target="_blank"><wbr>ig iman</a> </td>
</tr>
</table>
<h4> With cellpadding : </h4>
<table border="1" cellpadding="50">
<tr>
<td> Mimi Hafizah binti Abdullah </td>
<td> <img src="mimi.jpg" alt="Smiley Face" width="75" height="75">
</td></tr>
<tr>
<td> KAMARUZZAMAN BIN YUNUS </td>
<td> <img src="1.pjpg.jpg" alt="Smiley Face" width="75" height="75">
</td></tr>
</table>
The output screen :
3. HTML with a border attribute
If you do not specify a border for the table, it will be displayed without borders. A border can be added using the border attribute:
Example
<html>
<body>
<table border="1" style="width:100%">
<tr>
<td>Azmil</td>
<td>Afiq</td>
<td>100</td>
</tr>
<tr>
<td>Nukman</td>
<td>Syahriman</td>
<td>98</td>
</tr>
<tr>
<td>Zul</td>
<td>Kimi</td>
<td>96</td>
</tr>
</table>
</body>
</html>
4. HTML IMAGES
- In HTML, images are defined with the <img> tag.
- The <img> tag is empty, it contains attributes only, and does not have a closing tag.
EXAMPLE
<html>
<body>
<p>
An image:
<img src ="SNice.svg.png" alt="Smiley Face" width="32" height="32"/>
</p>
<p>
A moving image :
<img src="giphy.gif"alt="Smiley Face" width="32" height="32"/>
</p>
<p>
Note that the syntax of inserting a moving image is no different from a non moving image.
</p>
</body>
</html>
The output screen :



Comments
Post a Comment