Jump to reference ... All Basic Structure Paragraph Format Text Formatting General

Laurainda's HTML Reference

Basic Structure
<html>
 <head>
  <title>website title</title>
 </head>
 <body>
  content of website ...
 </body>
</html>
Paragraph Format
Paragraph
<p>some paragraph text</p>
Paragraph of text. Always start with at a new line. Browser automatically add spacing before and after paragraph.
Line break
<br>
Insert a single line break. It is an empty tag, meaning it has no end tag.
Div
<div>Some text in a div</div>
Defines a division or section in HTML. Often used with CSS and other scripting languages.
Blockquote
<blockquote>Quotation from somewhere</blockquote>
Specify a section that is quoted from other sources. Usually indented.
Horizonal Rule
<hr>
Defines a change of topic. Usually display as a horizonal rule that is used to separate content.
Text Formatting
Bold
<b>Bold text</b>
Text displayed in bold.
Strong
<strong>Important text</strong>
Define important text. Usually displayed in bold.
Italic
<i>Italic text</i>
Text displayed in italic.
Emphasized
<em>Emphasized text</em>
Define text with emphasis. Screen reader will read the content using verbal stress. Usually display in italic.
Superscript
<sup>Superscript text</sup>
Superscript text appears half a character higher than normal line, usually in smaller font.
Subscript
<sub>Subscript text</sub>
Subscript text appears half a character lower than normal line, usally in smaller font.
Font size
<font size="1">Font size</font>
Font size can vary from 1 (smallest) to 7 (largest). Not supported in HTML5. Should use CSS instead.
Font colour
<font color = "#FF00FF">Font colour</font>
Can use HEX colour or colour names (such as red, blue, black). Not supported in HTML5. Should use CSS instead.
Font face
<font face = "Verdana">Font face</font>
Setting font face. Not supported in HTML5. Should use CSS instead.
General
Hyperlink
<a href="http://some.web.page.com" target="_blank">Text to display</a>
Defines a hyperlink to another page. Can be used with "target" attribute to open in specific windows.
Link
<link rel="stylesheet" href="styles.css">
Defines relationship between current and external document. Often used for linking CSS stylesheets.
Image
<img src="some_img.jpg" alt="Sample image" width="500" height="600">
Embed an image with "src" specifying the image location.