HTML, Head, Body tags

0
2K

HTML

  • The root element of an HTML document.
  • Encloses the entire document, including the head and body sections.
  • Provides the overall structure for the webpage.

Head

  • Contains metadata about the webpage, information that is not displayed directly on the page but is essential for browsers and search engines.
  • Common elements within the head include:
    • <title>: Sets the title of the page, displayed in the browser's tab.
    • <meta>: Provides additional information about the page, such as keywords, description, author, character encoding, viewport, etc.
    • <link>: Links to external stylesheets (CSS) for styling the page.
    • <script>: Includes JavaScript code for interactive elements.

Body

  • Contains the visible content of the webpage.
  • This is where you place elements like headings, paragraphs, images, links, forms, and other content that users will see.
  • Common elements within the body include:
    • <h1> to <h6>: Defines headings of different levels.
    • <p>: Defines a paragraph.
    • <img>: Embeds an image.
    • <a>: Creates a hyperlink.
    • <div>: Defines a division or section in an HTML document.
    • <span>: Defines an inline section in an HTML document.

Basic HTML Structure:

HTML
<!DOCTYPE html>
<html>
<head>
  <title>My Web Page</title>
  <meta charset="UTF-8">
</head>
<body>
  <h1>Hello, world!</h1>
  <p>This is a paragraph.</p>
</body>
</html>

In summary:

  • The html tag encompasses the entire document.
  • The head tag contains metadata about the page.
  • The body tag contains the visible content of the page.
Search
Categories
Read More
Technology
The VLOOKUP function in Excel
The VLOOKUP function in Excel is used to search for a value in the first column of a table and...
By Microsoft Excel Tips 2024-10-16 00:58:30 0 2K
Education
A MUST KNOW FOR A'LEVEL HISTORY STUDENTS
https://acrobat.adobe.com/id/urn:aaid:sc:EU:7c45002b-2e38-426f-a0b9-8447c474993b
By Landus Mumbere Expedito 2024-07-15 19:08:17 0 3K
Health
The Ultimate User's Manual for Vidalista 20mg
Vidalista 20mg and Vidalista 60mg are two popular medications for treating erectile dysfunction...
By Norah Simon 2024-09-10 11:10:53 0 2K
Technology
History of Python and Computer Hardware
As computer programming started to get popular and evolve in the 1960’s and 70’s,...