Typography

Element/Attribute Formatted Tag Description
HTML Element <html>
  • Root of an HTML document
  • All content for HTML document is contained between <html> tags
Body Element <body>
  • Represents content of HTML document
  • Content inside is rendered on web browser
  • There can only be one <body> element in a document
Head Element <head>
  • Contains general information (metadata) about HTML page
  • Includes e.g. the title of an HTML page & links to stylesheets
  • Isn't displayed on the web page
Title Element <title>
  • Contains title of an HTML document
  • Displayed in the browser's title bar
  • Contained inside <head> element
Heading Element <h1> - <h6>
  • HTML can use six levels of heading elements
  • Ordered from biggest (<h1>) to lowest (<h6>)
Div Element <div>
  • Container that divides an HTML document into sections
  • Short for "division"
Paragraph Element <p>
  • Contains & displays a block of text
Line Break Element <br>
  • Creates a line break in text
  • Requires no closing tag
Span Element <span>
  • Inline container for text
  • Can be used to group text for styling purposes
Strong Element <strong>
  • Highlights important, serious, or urgent text
  • Browsers will normally render text in bold by default
Emphasis Element <em>
  • Emphasises text
  • Browsers will normally italicize text by default
Ordered List Element <ol>
  • Creates list of items in sequential order
  • Items will appear numbered by default
Unordered List Element <ul>
  • Creates list of items in no particular order
  • Items will appear with bullet points by default
List Item Element <li>
  • Creates list item inside ordered/unordered lists
Anchor Element <a href="...">
  • Creates hyperlink that can point to other webpages, files on the same server, a location on the same page, or any other URL
  • The hyperlink reference attribute (href) determines location the anchor element points to
Target Attribute <a target="...">
  • Specifies where a hyperlink should be opened
  • Nested inside <a> opening tag
Video Element <video src="..." controls>
  • Embeds media player for video playback
  • src attribute contains URL of video
  • controls attribute displays video controls in the media player
Image Element <img src="..." alt="...">
  • Embeds image in documents
  • src attribute contains URL of image
  • Requires no closing tag
  • alt attribute contains alternative text if image fails to render