Let's Learn Basics Of HTML.
-
Let's start with basic HTML Structure:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>Heading 1</h1>
<p>Paragraph</p>
</body>
</html> -
HTML Tags: HTML tags define the different elements of an HTML document. Here are some commonly used tags:
-
<html>: The root element of an HTML document.
-
<head>: Contains the metadata of the document, such as the title and stylesheets.
-
<title>: Defines the title of the document.
-
<body>: Contains the visible content of the document.
-
<h1> to <h6>: Defines headings with different levels of importance.
-
<p>: Defines a paragraph of text.
-
<a>: Defines a hyperlink.
-
<img>: Displays an image on the page
​
-
HTML Attributes: HTML attributes provide additional information about an HTML element. Here are some commonly used attributes:
-
id: Defines a unique identifier for an element.
-
class: Defines a class name for an element.
-
href: Specifies the URL of the linked resource.
-
src: Specifies the URL of the image source.
​
4.
-
HTML Forms: HTML forms allow users to input data and submit it to a server. Here is an example form:
-
<form action="/submit" method="POST">
<label for="name">Name:</label>
<input type="text" id="name" name="name" required> -
<label for="email">Email:</label>
<input type="email" id="email" name="email" required> -
<button type="submit">Submit</button>
</form>
​
Can you create a simple webpage using HTML?
​
​
​