Introduction to HTML HyperText Markup Language Basics
What is HTML? • HTML stands for HyperText Markup Language • It is the standard language for creating webpages • HTML describes the structure of a webpage • Uses tags to define elements like headings, paragraphs, and links
Basic Structure of an HTML Document <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html>
HTML Attributes • Provide additional information about elements • Written inside the opening tag • Example: <img src='image.jpg' alt='Description'> • Common attributes: id, class, style, src, href
Forms in HTML • Forms are used to collect user input • Elements: <form>, <input>, <textarea>, <button>, <select> • Example: <form> <input type='text' placeholder='Enter Name'> <button>Submit</button> </form>
Conclusion • HTML is the foundation of all web pages • Defines structure and elements of a webpage • Works with CSS (for styling) and JavaScript (for interactivity)