M1 Introduction to HTML

From CSE330 Wiki
Revision as of 03:46, 27 June 2023 by Zach (talk | contribs) (Created page with "== HTML == === HTML? === HTML, which stands for HyperText Markup Language, is the standard language used to create webpages. It describes the structure and content of a webp...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

HTML

HTML?

HTML, which stands for HyperText Markup Language, is the standard language used to create webpages. It describes the structure and content of a webpage. HTML uses a system of tags and attributes to define elements on the page. These elements can be things like headings, paragraphs, links, images, lists, tables, forms, and many more. Each of these elements has a specific tag that describes what it is and helps the browser know how to display it.

Here's a very basic example:

<!DOCTYPE html>
<html>
  <head>
    <title>My First Web Page</title>
  </head>
  <body>
    <h1>Welcome to My Website!</h1>
    <p>This is a paragraph of text.</p>
  </body>
</html>

IMAGE GOES HERE

In this example:

  • <!DOCTYPE html> is the document type declaration. This tells the browser that this document is an HTML document.
  • The <html> tag is the root of an HTML document.
  • The <head> tag contains meta-information about the document. This can include the title, character set declarations, CSS style definitions, and more.
  • The <title> tag is the title of the document and is displayed in the browser's title bar or tab.
  • The <body> tag contains the content of the document, such as text, hyperlinks, images, tables, lists, etc. When you visit a website, the content you see is rendered in the body.
  • The <h1> tag defines a top-level heading, and the <p> tag defines a paragraph.

In essence, HTML gives the webpage its basic structure and content; without it, a webpage can't exist.


Tags