HTML

HTML (HyperText Markup Language) is the standard language used to create and design web pages. It structures content on the web, allowing browsers to display text, images, videos, links, forms, and other media. HTML uses a system of tags and attributes to define how different elements appear and interact with each other.

Here's a quick rundown of some key concepts:

1 Tags: HTML uses "tags" to define elements on a page. Tags typically come in pairs: an opening tag (e.g., <h1>) and a closing tag (e.g., </h1>). The content goes between these tags.

Example:

<h1>Welcome to My Website</h1>

2 Elements: An element is a complete unit consisting of an opening tag, content, and a closing tag. For example, the <p> element defines a paragraph of text.

Example: <p>This is a paragraph of text.</p>

3 Attributes: Tags can have attributes that provide additional information. For example, an image tag <img> can have an src attribute to define the image's source.

Example: <img src="image.jpg" alt="Description of the image">

4 Nesting: HTML elements can be nested inside each other to build a structure. For example, an unordered list <ul> can contain list items <li>.

Example: <ul>
    <li>Item 1</li>
    <li>Item 2</li>
</ul>

5 Structure: A basic HTML page has a structure that typically includes the following:<!DOCTYPE html>: Declares the document type.

  • <html>: The root element.
  • <head>: Contains meta-information about the page (like title, character set).  
  • <body>: Contains the actual content of the page.

  • Example:
  • <!DOCTYPE html>
  • <html>
  •     <head>
  •         <title>My Webpage</title>
  •     </head>
  •     <body>
  •         <h1>Welcome!</h1>
  •         <p>This is my first webpage.</p>
  •     </body>
  • </html>
Previous Post Next Post

Contact Form