Sheet HTML
Sheet HTML
HTML
CHEAT SHEET
HTML
HTML (Hypertext Markup Language) is a standard markup
language used to create web pages. It is used to structure and
format content on the web, including text, images, and other
multimedia elements. HTML consists of a series of elements that
are represented by tags, which are used to define the structure
and content of a webpage.
HTML is an essential part of the web development process and is
used to create the structure and content of websites. It is a
fundamental skill for web developers and is used to create the
majority of websites on the internet.
HTML COMPONENTS
• <html> tag: This tag acts as a container for every other
element in the document except the <!DOCTYPE html> tag.
• <head> tag: Includes all the document's metadata.
• <title> tag: Defines the title of the document which is
displayed in the browser's title bar.
• <body> tag: Acts as a container for the document's content
that gets displayed on the browser.
2 | Page
This is how it all comes together:
<!DOCTYPE html>
<html lang="en">
<head>
<title> GDSC HTML Cheat Sheet </title>
</head>
<body> .... </body>
</html>
3 | Page
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<title>GDSC HTML Cheat Sheet</title>
<style>
*{
font-size: 40px;
}
</style>
<script>
alert ('message');
</script>
</head>
4 | Page
You use the <p> tag to create a paragraph.
We also have the <span> tag. This is similar to <div> but you use
it as an inline container.
5 | Page
There's the <br/> tag, which we use to insert line breaks in the
document. This tag does not require a closing tag.
IMAGES IN HTML
In HTML, we use the <img/> tag to insert images into the
document.
6 | Page
• border specifies the thickness of the borders around the
image. If no border is added, it is set to 0.
7 | Page
• The <blockquote> tag is used to enclose a section of text
quoted from another source.
• The <q> tag is used for shorter inline quotes.
LINKS IN HTML
The <a> tag, also referred to as the anchor tag, is used to
establish hyperlinks that link to other pages (external web pages
included) or to a particular section within the same page.
8 | Page
• The href attribute specifies the URL that the link will take the
user to when clicked.
• The download attribute specifies that the target or resource
clicked is a downloadable file.
• The target attribute specifies where the linked document or
LISTS IN HTML
• The <ol> tag defines an ordered list.
• The <ul> tag defines an unordered list.
• The <li> tag is used to create items in the list.
9 | Page
FORMS IN HTML
The <form> element is used to create a form in HTML. Forms are
used to gather user input.
10 | Page
Other input elements that can be used in forms include:
11 | Page
TABLES IN HTML
The <table> tag defines a HTML table.
<table>
<thead>
<tr>
<th> Name </th>
<th> CGPA </th>
</tr>
</thead>
<tbody>
<tr>
<td> Koushik Sadhu </td>
<td> 9.66 </td>
</tr>
<tr>
<td> Pranay Gupta </td>
<td> 9.72 </td>
</tr>
</tbody>
<tfoot>
<tr>
<td> Nidhi Gupta </td>
<td> 10 </td>
</tr>
</tfoot>
</table>
12 | Page
TAGS IN HTML
The following tags were introduced in HTML5:
13 | Page
<header>
<h1> Welcome to GDSC LNCTE ! </h1>
</header>
<nav>
<ul>
<li><a href="#">About Us</a></li>
<li><a href="#">Core Team</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
<article>
<h1> About GDSC </h1>
<p> This is all about GDSC. </p>
<aside>
<p> Join Now. </p>
</aside>
</article>
14 | Page
CHARACTER AND SYMBOLS
In HTML documents, some symbols may not be directly available
on the keyboard. However, there are several ways to include
these symbols in a document. These include using the symbol's
entity name, decimal value, or hexadecimal value.
<!DOCTYPE html>
<html lang="en">
<head>
<title> GDSC HTML Cheat Sheet </title>
</head>
<body>
<p> Copyright Symbol: © </p>
<p> Dollar Symbol: $ </p>
<p> Ampersand Symbol: & </p>
<p> Greater than Symbol: > </p>
<p> Less than Symbol: < </p>
</body>
</html>
15 | Page