HTML

WikiText does **not** function in the comments. To test out your coding, please either visit your sandbox or this page's talk page.

## HTML5

* HTML1
* HTML2

### Wiki Support

Low support, similar to WikiText, style tags, and a few other tags only.

## Introduction

**HyperText Markup Language** (commonly abbreviated as "**HTML"**) is the most common language used for webpages and displayed documents. It can also be paired with other coding languages like JavaScript and CSS. HTML is mainly a visual markup language without many functions. Currently, the most recent version of HTML is HTML5, but there are also HTML2, HTML3, and HTML4, although these versions are mainly out of usage on the web. There is also XHTML, a more strict version of HTML. In this article, we'll be focusing mainly on HTML5, the most recent version of HTML, as well as the best version for beginner coders.

## Development

**HTML** was first created in the 1980s by a company called CERN and was used primarily as a system for sharing and creating documents. It wasn't until 1989 that the idea that HTML could be converted into a hypertext system.

In the beginning, HTML was a very basic language that used only 18 elements and tags. Since then, with each update of HTML, more tags and attributes have been added. 11 of those original elements and tags still exist today.

## Usage

### How HTML Executes

HTML is a web-based coding language, which means web browsers receive HTML documents from close servers and translate the HTML into a visual display on your browser. If parts of the page are not specified, browser defaults will take over, such as how on FANDOM, we automatically have left align and black text. Some parts of HTML are also included in FANDOM (many are not), as you will see below.

### Parts of HTML

HTML is made up primarily of attributes and tags. Let's take a closer look at what that means.

***Tags***: Tags are predefined in HTML, but can also be redefined using CSS or another similar coding language. Tags are enclosed with angled brackets and look as follows: <tag text>Content</tag text>. There are two main types of tags: Tags that **put** content on the page, and tags that **modify** content on the page. An example of a tag that puts content on the page would be an <img src="link"> tag. An example of a tag that modifies content on the page would be a <b> or bold tag. Style tags are in the second category, as they do not take information from outside of the page and place it directly there. Many tags also have sub-tags, or variations on the tags, such as the <h1> <h2> <h3> tags, and so on. All tags have closing tags, which are almost always the beginning tag with a slash before it.

***Attributes*:** Attributes are similar to tags, and often make up tags that modify content on the page. Attributes specify certain parts of a coded item, like height, color, border, and shadows. Like tags, attributes often have sub-parts, like the 'text-decoration' attribute and the 'text-decoration-color' attribute. To learn more about attributes and see the pages we have on attributes, visit the attributes page.

### HTML Tags

HTML has many, many tags. Here we'll spotlight a few of them that define parts of an HTML document.

* **<!DOCTYPE html>**: This tag always goes at the very top of the document and tells the browser that the code it is about to see is HTML and should be read and converted to visual by a certain set of instructions. This tag can sometimes be optional, depending on your browser, HTML documentation platform, and computer's age, but it should always be added, along with the prefix of '.html' to the file's name.
* **<body>**: Like the previous tag, the <body> tag is mainly optional, but it depends on the platform, computer age, and browser. However, <body> should always be used and MUST be used when ending a tag like <script>, <head>, or <style>. The body defines the visible HTML page content.
* **<head>**: The head tag is a container for metadata and contains things like the <title> and <style> tags. Items in the <head> tag usually cannot be seen unless otherwise specified.
* **<title>**: The title tag is used to give a title to the HTML document once it has entered your web browser. This won't change the name of the actual file. <title> MUST go **inside of the <head> tag.**
* **<style>**: The style tag is used to apply a style sheet of CSS to an HTML document. This tag also must go inside the head tag.
* **<script>**: The script tag is used to apply JavaScript to an HTML document, similar to the style tag. The script tag doesn't need to go inside the head tag.
* **<!--...-->**: This tag is used to add a note anywhere in the HTML document. It won't show up in the web browser. Simply replace the ... in the middle with words of your own. **Do not add an end tag. Otherwise, it'll show up!**

## Recommended Sites

* w3schools.com
* codecademy.com
* html.com
* sololearn.com
* pluralsight.com (pay subscription for courses)