Table of contents
Basic Tags
Tags/ Element | Description | Example |
---|---|---|
<!DOCTYPE> | Defines the document type | <!DOCTYPE html> |
<html> | Defines an HTML document | <html> |
<head> | Contains metadata/ information for the document | <head> |
<title> | Defines a title for the document | <head> |
<body> | Defines the document's body | <body> |
<h1> to <h6> | Defines HTML headings | <h3> My Website</h3> |
<p> | Defines a paragraph | <p> My Website</p> |
<br> | Inserts a single line break | <br> No closing tag |
<hr> | Defines a thematic change in the content | <br No closing tag |
<!--... -- > | Defines a comment | <!-- <h1> My Website </h1> -- > |
Link Tags
Tags/ Element | Description | Example |
---|---|---|
<a> | Defines a hyperlink | <a href="/"> Go to HomePage </a> |
<link> | Defines the relationship between a document and an external resource (most used to link to style sheets) | <link rel="stylesheet" href="styles.css"> |
Image Tags
Tags/ Element | Description | Example |
---|---|---|
<img> | Defines an image | <img |
<svg> | Defines a container for SVG graphics | <svg |
Lists Tags
Tags/ Element | Description | Example |
---|---|---|
<ul> | Defines an unordered list | <ul |
<ol> | Defines an ordered list | <ol |
<li> | Defines a list item | <ul |
Styles and Content
Tags/ Element | Description | Example |
---|---|---|
<style> | Defines style information for a document | <style> </style> |
<div> | Defines a section in a document | <div> </div> |
<span> | Defines a section in a document | <span> </span> |
<main> | Specifies the main content of a document | <main> </main> |
<section> | Defines a section in a document | <section> </section> |
<article> | Defines an article | <article> </article> |
HTML Table
Tags/ Element | Description | Example |
---|---|---|
<table> | Defines a table | |
<caption> | Defines a table caption | |
<th> | Defines a header cell in a table | |
<tr> | Defines a row in a table | |
<td> | Defines a cell in a table | |
<thead> | Groups the header content in a table | |
<tbody> | Groups the body content in a table |
We will go through Attributes in next article.
References: