HTML HTML Tutorial HTML Forms HTML Graphics HTML Media HTML APIs HTML Tags



HTML Basic

HTML (Hypertext Markup Language) is the standard markup language used to create web pages. It is a set of tags and attributes that define the structure and content of a web page. HTML is the foundation of all web pages and is essential for creating websites.

HTML Basic is the fundamental building block of HTML. It includes the basic tags and attributes that are used to create a web page. HTML Basic is easy to learn and is the starting point for anyone who wants to learn web development.

HTML Basic Tags

The following are some of the basic tags used in HTML:

  • <html> - Defines the start of an HTML document
  • <head> - Contains meta information about the document
  • <title> - Defines the title of the document
  • <body> - Contains the visible content of the document
  • <h1> - Defines a heading
  • <p> - Defines a paragraph
  • <a> - Defines a hyperlink
  • <img> - Defines an image
  • <ul> - Defines an unordered list
  • <ol> - Defines an ordered list
  • <li> - Defines a list item

HTML Basic Attributes

The following are some of the basic attributes used in HTML:

  • id - Defines a unique identifier for an element
  • class - Defines a class name for an element
  • style - Defines inline CSS styles for an element
  • src - Defines the URL of an image
  • href - Defines the URL of a hyperlink
  • alt - Defines alternative text for an image

Code Examples

Here are some code examples using HTML Basic tags:

Heading

To create a heading, use the <h1> tag:

  <h1>This is a heading</h1>

Paragraph

To create a paragraph, use the <p> tag:

  <p>This is a paragraph.</p>

Hyperlink

To create a hyperlink, use the <a> tag:

  <a href="https://www.example.com">This is a hyperlink</a>

Image

To display an image, use the <img> tag:

  <img src="image.jpg" alt="This is an image">

List

To create a list, use the <ul> or <ol> tag:

  <ul>
    <li>Item 1</li>
    <li>Item 2</li>
    <li>Item 3</li>
  </ul>

  <ol>
    <li>Item 1</li>
    <li>Item 2</li>
    <li>Item 3</li>
  </ol>

Conclusion

HTML Basic is the foundation of all web pages and is essential for creating websites. It includes the basic tags and attributes that are used to create a web page. HTML Basic is easy to learn and is the starting point for anyone who wants to learn web development.

References

Activity