From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
(HyperText Markup Language)
Filename extension .html, .htm
Internet media type text/html
Type code TEXT
Uniform Type Identifier (UTI) public.html
Developed by World Wide Web Consortium & WHATWG
Type of format Markup language
Extended from SGML
Extended to XHTML

ISO/IEC 15445
W3C HTML 4.01

W3C HTML 5 (draft)

HyperText Markup Language (HTML) is a markup language[1] for creating a webpage. Webpages are usually viewed in a web browser. They can include writing, links, pictures, and even sound and video. HTML is used to mark and describe each of these kinds of content so the web browser can display them correctly. HTML can also be used to add meta information to a webpage. Meta information is usually not shown by web browsers and is data about the web page, e.g., the name of the person who created the page. Cascading Style Sheets (CSS) is used to style HTML elements while JavaScript is used to manipulate HTML elements and CSS styles.

HTML was made by the World Wide Web Consortium (W3C). There are several versions of HTML. As of September 2018, the current standard of HTML is dubbed HTML 5 and is specifically at version 5.2.

Tags[change | change source]

HTML uses special bits of programming language called "tags" to let the browser know how a webpage should look. The tags usually come in pairs: an opening tag defines the start of a block of content and an ending tag defines the end of that block of content. There are many different kinds of tags, and each one has a different purpose. See Basic HTML Tags below for tag examples.

Some tags only work in certain browsers. For example, the <marquee> tag, which is used to make a bit of writing slide across the page, only works in the Internet Explorer and Mozilla Firefox browsers. Other browsers simply ignore this tag and display the writing normally. Many web page creators avoid using these "non-standard" tags because they want their pages to look the same with all browsers.

Example[change | change source]

Here is an example page in HTML.

 1 <!DOCTYPE html>
 2 <html>
 3   <head>
 4     <title>This is the title of the page.</title>
 5   </head>
 6   <body bgcolor="gray">
 7     <p>This is a paragraph.</p>
 8     <a href="">This is a link.</a>
 9     <img url="image.jpg" alt="Image">
10   </body>
11 </html>

Basic HTML tags[change | change source]

Tag name Name Function Code Example
<!DOCTYPE> Doctype Defines the Document type
<!DOCTYPE html>
<html> HTML Defines an HTML document
<html>All code</html>
<head> Head Contains any code that is not used to display elements on the webpage
<title> Title Defines the title of the webpage (shown on the tab) and is entered within the <head>
<body> Body Contains the visible elements of the webpage
<body>Html tags</body>
<h1> to <h6> Headings Headings of various sizes (<h1> being the largest)
<p> Paragraph Defines a paragraph of text
<a> Anchor Creates active links to other web pages
<a href="">Visit our site</a>
<img> Image Displays an image on the page
<img src="ImageUrl" alt="Text displayed if image is not available">
<br> Break Inserts a single line break
Text <br> Text
<center> Center Moves content to the center of the page
<script> Script Creates a script in the webpage
<script>document.write("Hello World!")</script>

Other websites[change | change source]

References[change | change source]

  1. "Why HTML is Not a Programming Language". Syracuse University. Retrieved 27 June 2016.