HTML, Hyper Text Markup Language, is the standard markup language (<...></...>) for documnets designed to be displayed in a web browser. Newest version is HTML5. All popular browsers support HTML5. Nowadays, HTML5 is maintained by World Wide Web Consortium (W3C). All W3C maintained standards include HTML, XML, CSS, DOM, ECMAScript.
'!-- --' markup surrounds the documents only showed to a developer but not normal browser users.
'!DOCTYPE' defines what standard is used in this web page. 'html' represent HTML5 standard. The default standard of a web browser is mostly HTML5, so this statement can be omitted.
'html' markup surrounds the documents showed as a web page. Anything out of 'html' will not affect the page or be displayed on it.
'head' markup surrounds the header of a web page. Page settings are defined in this block.
'meta' descripts information needed on this web page. This markup can be used for search engine optimization (SEO).
charset="UTF-8"
name="key" content="content mapped by key"
'title' markup surrounds the text in the web browser's title bar. Only texts are allowed here.
'body' markup surrounds the body of a web page. Main documents are defined in this block.
'h[number]' markup surrounds the title in the body of a web page.
eg.
'p' markup surrounds the paragraph.
eg.
<p>First paragraph.</p>
<p>Second paragraph.</p>
'br' markup state that a newline comes after the markup.
eg.
First line.<br />
Second line.
'hr' markup display a line segmentate web Page.
eg.<hr />
'strong' or 'b' markup surrounds the words displayed in bold front.
eg.
<strong>bold front</strong>
<b>bold front</b>
'em' or 'i' markup surrounds the words displayed in emphasized front.
eg.
<em>emphasized front</em>
<i>emphasized front</i>
eg.
one space: ' '
two spaces: ' '
eg.
less: < <
greater: > >
eg.
copyright: © ©
'img' links to a image, and displays it in the web page.
src="source, path to a image"
alt="alternative text, the text showed while the photo was broken"
title="hover text"
width="width of photo, a number"
height="height of photo, a number"
eg.'a' an anchor links to another web page, an id or an email sender. It surrounds the text showed as hyperlink, anchorlink or functional link.
href="hypertext reference, path to another web page, an id or an email sender"
target="target position of the linked web page"
eg.
_self: open the linked page and replace this page
_blank: open the linked page on a new tab
Block element starts a newline after ending.
<p>, <h>...
Inline element does not start a newline after ending.
<strong>, <em>...
'li' is a child element contained by following parent element. It represents an item of a list.
unordered list
eg.
<ul>
<li>first item</li>
<li>second item</li>
</ul>
ordered list
<ol>
<li>first item</li>
<li>second item</li>
</ol>
Definition list is different from normal list.
It contains <dt> as list name and <dd> as list item
eg.
<dl>
<dt>list name</dt>
<dd>first item</dd>
<dd>second item</dd>
</dl>
'table' element represents a two dimentional table. It contains row and column elements.
'tr' table row represents a row of data. It contains table data of each column.
'td' table data represents unit data of a table.
'border' defines table border type. It has been already deprecated.
'rowspan' defines the number of row to span towards down on this table data element.
'colspan' defines the number of column to span towards right on this table data element.
eg.row span | 1st row, 1st column | 1st row, 2nd column |
2nd row, 1st column | 2nd row, 2ndt column | |
column span |
'controls' add web browser default controler of a video.
'autoplay' allow video autoplay after loading. This feature is disabled in chrome web browser.
eg.
eg.
<audio src="./audio/mixkit-dog-barking-twice-1.wav" controls autoplay></audio>
'iframe' element represents a nested browsing context, embedding another HTML page into the current one.
eg.
click on dynamic iframe
'form' element represents a document section containing interactive controls for submitting information.
'input' element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent. The input element is one of the most powerful and complex in all of HTML due to the sheer number of combinations of input types and attributes.
'type' attribute define how an 'input' works. eg. text (default), password, checkbox, radio, submit, reset, file, hidden, image, button...
Name of the form control. Submitted with the form as part of a name/value pair.
The initial value of the control.
Size of the control
Maximum length (number of characters) of value
Whether the command or control is checked
eg.