Affiliate link

HTML - Elements/Tags

An HTML element is created by a start tag, content, and mostly close with an end tag.

Start tag with closing tag.

<tag>..content</tag>

Self closing tag.

<tag />

HTML Tags - basic

  • <html> - HTML structure
  • <head> - Head section
    • <title> - Title of the web page
    • <meta> - Meta data
    • <script> - Load script such as javascript
    • <style> - Load css or inline css styles
  • <body> - Body section
    • Headings
      • <h1> - Main header of HTML document
      • <h2>, <h3>, <h4>, <h5>, <h6> - Sub headers of HTML document
    • Display
      • <div> - Division section for HTML document
      • <table> - Display a table
        • <tr> - Table row
        • <th> - Table header column
        • <td> - Table data column
    • Text
      • <p> - Paragraph
      • <span> - Span
      • <label> - Label for forms input
    • Forms
      • <button> - Button for forms actions
      • <input> - Input such as text box, checkbox
      • <radio> - Radio buttons
      • <select> - Drop-down list options
      • <textarea> - Multiline text box
    • <a> - Anchor link (Hyperlink)
    • <img> - Image element

HTML - Comments

To add comments to HTML. Use <!-- -->

<html>
    <body>
        <!-- This is a comment -->
        <h1>Learn HTML</h1>
    </body>
</html>

Code Result

Learn HTML

Affiliate link

HTML - References

Affiliate link
Affiliate link
Advertisment
Ad - Managed WordPress Hosting by SiteGround - Powerful, yet simple to use. Amazing speed, tools and support. Click for more.