basic of html

basic of html

HTML, which stands for Hypertext Markup Language, is the standard markup language used for creating web pages and web applications. It provides a structure for organizing content on the web and is composed of HTML elements and tags.

Here are the basic components and structure of an HTML document:

  1. Document Type Declaration (DTD):

    • The first line of an HTML document is the DTD declaration, which specifies the version of HTML being used. For example: <!DOCTYPE html>
  2. HTML Tag:

    • The <html> tag is the root element of an HTML document. It contains all other elements and tags in the document.
  3. Head Section:

    • The <head> section of the document is used to define meta-information about the document, such as the title, character encoding, linked stylesheets, and scripts. It does not contain visible content.
  4. Title:

    • The <title> tag is placed within the <head> section and specifies the title of the web page. The title is displayed in the browser's title bar or tab.
  5. Body Section:

    • The <body> tag contains the visible content of the web page, such as text, images, links, and other elements.
  6. Heading Tags:

    • HTML provides six levels of headings, <h1> to <h6>, where <h1> represents the highest level and <h6> represents the lowest level of heading.
  7. Paragraphs:

    • Paragraphs are represented using the <p> tag. It is used to define blocks of text.
  8. Links:

    • Links are created using the <a> tag. The href attribute specifies the destination URL or the target location within the same document.
  9. Images:

    • Images are inserted using the <img> tag. The src attribute specifies the path to the image file.
  10. Lists:

    • HTML supports both ordered (numbered) and unordered (bulleted) lists. Ordered lists are created using the <ol> tag, while unordered lists are created using the <ul> tag. List items are represented with the <li> tag.