Anish Thapa

HTML

Anish.


HTML

HyperText Markup Language


HTML stands for Hyper Text Markup Language and is used to create the structure and content of a webpage. It was created by Tim Berners-Lee in 1993 to define the structure of a web page. Without it, we wouldn’t be able to organize text or add images or videos to pages.

Preparing for HTML

The declaration looks like this :<!DOCTYPE html>This declaration is an instruction, and it must be the first line of code in our HTML document. It tells the browser what type of document to expect, along with what version of HTML is being used in the document. For now, the browser will correctly assume that the html in <!DOCTYPE html> is referring to HTML5, as it is the current standard.

HTML Elements

The <html> HTML element represents the root (top-level element) of an HTML document, so it is also referred to as the root element. All other elements must be descendants of this element.

The <meta> HTML element represents Metadata that cannot be represented by other HTML meta-related elements, like baselinkscriptstyle or title.

The <title>HTML element defines the document’s title that is shown in a Browser’s title bar or a page’s tab. It only contains text; tags within the element are ignored.

The <body>HTML element represents the content of an HTML document. There can be only one <body> element in a document.

The <h1> to <h6>HTML elements represent six levels of section headings. <h1> is the highest section level and <h6> is the lowest.

The <div>HTML element is the generic container for flow content. It has no effect on the content or layout until styled in some way using CSS (e.g. styling is directly applied to it, or some kind of layout model like Flexbox is applied to its parent element).

The <p>HTML element represents a paragraph. Paragraphs are usually represented in visual media as blocks of text separated from adjacent blocks by blank lines and/or first-line indentation, but HTML paragraphs can be any structural grouping of related content, such as images or form fields.

The <figure>HTML element represents self-contained content, potentially with an optional caption, which is specified using the figcaption element. The figure, its caption, and its contents are referenced as a single unit.

The <li>HTML element is used to represent an item in a list. It must be contained in a parent element: an ordered list (ol), an unordered list (ul), or a menu (menu). In menus and unordered lists, list items are usually displayed using bullet points. In ordered lists, they are usually displayed with an ascending counter on the left, such as a number or letter.

The <ul>HTML element represents an unordered list of items, typically rendered as a bulleted list.

The <a>HTML element (or anchor element), with its href attribute, creates a hyperlink to web pages, files, email addresses, locations in the same page, or anything else a URL can address.

The <img>HTML element embeds an image into the document.

Bibliography

Brandon Dusch. “HTML.” Codecademy, www.codecademy.com/resources/docs/html. Accessed 10 Oct. 2023.

Anish.

Anish Thapa  © 2023

Views: 0