FIVE (5) HTML TAGS AND THEIR USES
HTML ELEMENTS AND THEIR USES.
a. <div>: This element is used as a container for other HTML elements. It is often used to group block-level elements to apply CSS styles or Javascript.
b. <a>: This element is used to create hyperlinks, which are clickable links that navigate to another page or resource.
c. <p>: This element is used to define a paragraph of text.
d. <img>: This element is used to embed images in an HTML document.
e. <form>: This is used to create an interactive form for user input. It can contain various form elements like text fields, checkboxes and submit buttons.
EXPLANATION OF FIVE TAGS WITH EXAMPLES:
1. <html> and </html>:
– <html> tag is the root element of an HTML page, and all other elements are contained within it.
– </html> marks the end of the HTML document.
Example:
html
<!DOCTYPE html>
<html>
<head>
<title>My Web Page</title>
</head>
<body>
<!– Content goes here –>
</body>
</html>
