HTML Basics
HTML Basics
1. <html>_____________________________________________________________2
2. <head>____________________________________________________________ 2
3. <title>_____________________________________________________________ 2
4. <body>____________________________________________________________ 2
5. <h1> to <h6>________________________________________________________3
6. <p>_______________________________________________________________ 3
7. <a>_______________________________________________________________ 3
8. <img>_____________________________________________________________ 3
9. <ul>______________________________________________________________ 3
10. <ol>______________________________________________________________4
11. <li>_______________________________________________________________4
12. <div>_____________________________________________________________ 4
13. <span>___________________________________________________________ 4
14. <table>___________________________________________________________ 4
15. <tr>______________________________________________________________ 5
16. <th>_____________________________________________________________ 5
18. <form>___________________________________________________________ 5
19. <input>___________________________________________________________ 6
20. <textarea>________________________________________________________ 6
21. <select>__________________________________________________________ 6
22. <option>__________________________________________________________6
23. <button>_________________________________________________________ 6
24. <label>___________________________________________________________ 7
25. <iframe>__________________________________________________________ 7
26. <meta>___________________________________________________________ 7
27. <style>___________________________________________________________ 7
28. <script>__________________________________________________________ 7
29. <link>____________________________________________________________ 8
1. <html>
Defines the root of an HTML document.
example:
<html>
<head>
<title>My Webpage</title>
</head>
<body>
<h1>Welcome to My Website</h1>
</body>
</html>
2. <head>
Contains meta-information about the document, such as its title and links to stylesheets.
example:
<head>
<title>My Webpage</title>
<link rel="stylesheet" href="styles.css">
</head>
3. <title>
Defines the title of the document, shown in the browser's title bar or tab.
4. <body>
Contains the content of the HTML document, such as text, images, and links.
5. <h1> to <h6>
Define HTML headings, with <h1> being the highest (or most important) level and <h6>
the least.
6. <p>
Defines a paragraph of text.
7. <a>
Defines a hyperlink, which links to another document or resource.
8. <img>
Embeds an image on the webpage.
10. <ol>
Defines an ordered (numbered) list.
11. <li>
Defines a list item.
12. <div>
Defines a division or a section in an HTML document, often used as a container for other
elements.
13. <span>re
Used to group inline elements in a document.
14. <table>
Defines a table.
15. <tr>
Defines a row in a table.
18. <form>
Defines an HTML form for user input.
<form action="/submit"> <!-- The form element that will send user input data to the
server at the "/submit" URL when submitted -->
<label for="name">Name:</label> <!-- A label for the text input field, associating the
text "Name:" with the input field with id="name" -->
<input type="text" id="name" name="name"> <!-- A text input field where users can
enter their names. The id is "name" for referencing and the name is "name" for form data
submission -->
<input type="submit" value="Submit"> <!-- A submit button that, when clicked,
submits the form data to the server -->
</form> <!-- Closing the form element -->
19. <input>
Defines an input control.
20. <textarea>
Defines a multi-line text input control.
Example: A large text input area.
html
Copy code
<textarea id="message" name="message"></textarea>
21. <select>
Defines a drop-down list.
22. <option>
Defines an option in a drop-down list.
23. <button>
Defines a clickable button.
24. <label>
Defines a label for an input element.
26. <meta>
Provides metadata about the HTML document, such as character set, author, and
viewport settings.
27. <style>
Defines style information for the document.
28. <script>
Defines client-side JavaScript.
1. Block display:
● Height and width can be defined to block display items.
● Always start with a new line.
● There will always be one block element in one line.
2. Inline display:
● Users cannot define the Height and width of inline display items.
● inline display items can come after others in the same line.
3. Inline-block display:
● Height and width can be defined to Inline-block display items.
● Inline-block display items can come after others in the same line.