HTML images are created using the <img> tag, which allows you to embed images into a web page. The <img> tag requires a “src” attribute, which specifies the URL or file path of the image. Additionally, the “alt” attribute can be used to provide a text description of the image, which is useful for accessibility and SEO purposes.
Example:
Copy code<img src="example.jpg" alt="Example Image">
It is also possible to set the width and height of an image using the “width” and “height” attributes.
Copy code<img src="example.jpg" alt="Example Image" width="100" height="100">
You can also use CSS to style the image.
HTML Tables
HTML tables are created using the <table> tag, which is used to create a table on a web page. Inside the <table> tag, you can use the <tr> (table row) and <td> (table data) tags to create rows and cells, respectively.
Example:
Copy code<table>
<tr>
<td>Row 1, Cell 1</td>
<td>Row 1, Cell 2</td>
</tr>
<tr>
<td>Row 2, Cell 1</td>
<td>Row 2, Cell 2</td>
</tr>
</table>
You can use <th> tag to create header cells in a table, which are typically used to label the columns and/or rows.
Copy code<table>
<tr>
<th>Header 1</th>
<th>Header 2</th>
</tr>
<tr>
<td>Row 1, Cell 1</td>
<td>Row 1, Cell 2</td>
</tr>
<tr>
<td>Row 2, Cell 1</td>
<td>Row 2, Cell 2</td>
</tr>
</table>
You can also use CSS to style the table, including setting the width and height of the table and cells, adding borders and background colors, and adjusting the font and text alignment.