<img src="workplace.jpg" alt="Workplace" usemap="#workmap" width="400" height="379">
<map name="workmap">
<area shape="rect" coords="34,44,270,350" alt="Computer" href="computer.htm">
<area shape="rect" coords="290,172,333,250" alt="Phone" href="phone.htm">
<area shape="circle" coords="337,300,44" alt="Cup of coffee" href="coffee.htm">
</map>
address tag :- Contact information for Example.com
<address>
Written by <a href="mailto:webmaster@example.com">Jon Doe</a>.<br>
Visit us at:<br>
Example.com<br>
Box 564, Disneyland<br>
USA
</address>
a tag:-Create a link to featurecoding.blogspot.com
<a href="https://featurecoding.blogspot.com">Visit featurecoding.blogspot.com!</a>
B html Tags
bold tag:- Make some text bold (without marking it as important)
<p>This is normal text - <b>and this is bold text</b>.</p>
body tag:-<body> Hellow World !! </body>
<html>
<head>
<title>Title of the document</title>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
br tag:- Insert single line breaks in a text
<p>To force<br> line breaks<br> in a text,<br> use the br<br> element.</p>
button tag:-
<button type="button">Click Me!</button>
<!DOCTYPE html>
<html>
<head>
<style>
.button {
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
}
.button1 {background-color: #4CAF50;} /* Green */
.button2 {background-color: #008CBA;} /* Blue */
</style>
</head>
<body>
<button class="button button1">Green</button>
<button class="button button2">Blue</button>
</body>
</html>
blockquote tag:- A section that is quoted from another source
<blockquote cite="http://www.worldwildlife.org/who/index.html">
For 50 years, WWF has been protecting the future of nature. The world's leading conservation organization, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally.
</blockquote>
C html Tags
caption tag:- A table with a caption
<table>
<caption>Monthly savings</caption>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
center tag:- Center any text
<center>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<div>This is a div.</div>
</center>
Center-align text (with CSS)
<html>
<head>
<style>
h1 {text-align: center;}
p {text-align: center;}
div {text-align: center;}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<div>This is a div.</div>
</body>
</html>
city tag:- Define the title of a work with the
city tag
<p><cite>The Scream</cite> by Edward Munch. Painted in 1893.</p>
code tag:- Define some text as computer code in a document
<p>The HTML <code>button</code> tag defines a clickable button.</p>
<p>The CSS <code>background-color</code> property defines the background color of an element.</p>
<html>
<head>
<style>
code {
font-family: Consolas,"courier new";
color: crimson;
background-color: #f1f1f1;
padding: 2px;
font-size: 105%;
}
</style>
</head>
<body>
<h1>The code element + CSS</h1>
<p>The HTML <code>button</code> tag defines a clickable button.</p>
<p>The CSS <code>background-color</code> property defines the background color of an element.</p>
</body>
</html>
col tag:- Set the background color of the three columns with the
colgroup and
col tags
<table>
<colgroup>
<col span="2" style="background-color:red">
<col style="background-color:yellow">
</colgroup>
<tr>
<th>ISBN</th>
<th>Title</th>
<th>Price</th>
</tr>
<tr>
<td>3476896</td>
<td>My first HTML</td>
<td>$53</td>
</tr>
</table>
colgroup tag:- Set the background color of the three columns with the
colgroup and
col tags
<table>
<colgroup>
<col span="2" style="background-color:red">
<col style="background-color:yellow">
</colgroup>
<tr>
<th>ISBN</th>
<th>Title</th>
<th>Price</th>
</tr>
<tr>
<td>3476896</td>
<td>My first HTML</td>
<td>$53</td>
</tr>
</table>
D html Tags
data tag:- The following example displays product names but also associates each name with a product number
<ul>
<li><data value="21053">Cherry Tomato</data></li>
<li><data value="21054">Beef Tomato</data></li>
<li><data value="21055">Snack Tomato</data></li>
</ul>
datalist tag:- A datalist with pre-defined options (connected to an
input element)
<label for="browser">Choose your browser from the list:</label>
<input list="browsers" name="browser" id="browser">
<datalist id="browsers">
<option value="Edge">
<option value="Firefox">
<option value="Chrome">
<option value="Opera">
<option value="Safari">
</datalist>
dd tag:- A description list, with terms and descriptions
<dl>
<dt>Coffee</dt>
<dd>Black hot drink</dd>
<dt>Milk</dt>
<dd>White cold drink</dd>
</dl>
del tag:- A text with a deleted part, and a new, inserted part
<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>
<html>
<head>
<style>
del {background-color: tomato;}
ins {background-color: green;}
</style>
</head>
<body>
<h1>The del and ins elements + CSS</h1>
<p>My favorite color is <del>red</del> <ins>green</ins>!</p>
</body>
</html>
details tag:- Specify details that the user can open and close on demand
<details>
<summary>Taj Mahal</summary>
<p>The Taj Mahal is an ivory-white marble mausoleum on the southern bank of the river Yamuna in the Indian city of Agra.</p>
</details>
<html>
<head>
<style>
details > summary {
padding: 4px;
width: 200px;
background-color: #eeeeee;
border: none;
box-shadow: 1px 1px 2px #bbbbbb;
cursor: pointer;
}
details > p {
background-color: #eeeeee;
padding: 4px;
margin: 0;
box-shadow: 1px 1px 2px #bbbbbb;
}
</style>
</head>
<body>
<h1>The details and summary elements + CSS</h1>
<details>
<summary>Epcot Center</summary>
<p>Epcot is a theme park at Walt Disney World Resort featuring exciting attractions, international pavilions, award-winning fireworks and seasonal special events.</p>
</details>
</body>
</html>
dfn tag:- The
dfn tag stands for the "definition element", and it specifies a term that is going to be defined within the content.
<p><dfn>HTML</dfn> is the standard markup language for creating web pages.</p>
With the title attribute added
<p><dfn title="HyperText Markup Language">HTML</dfn> is the standard markup language for creating web pages.</p>
dialog tag:- Using the
dialog element
<dialog open>This is an open dialog window</dialog>
div tag:- The
div tag defines a division or a section in an HTML document
<div class="myDiv">
<h2>This is a heading in a div element</h2>
<p>This is some text in a div element.</p>
</div>
A
div section in a document that is styled with CSS
<html>
<head>
<style>
.myDiv {
border: 5px outset red;
background-color: lightblue;
text-align: center;
}
</style>
</head>
<body>
<div class="myDiv">
<h2>This is a heading in a div element</h2>
<p>This is some text in a div element.</p>
</div>
</body>
</html>
dl tag:- A description list, with terms and descriptions
<dl>
<dt>Coffee</dt>
<dd>Black hot drink</dd>
<dt>Milk</dt>
<dd>White cold drink</dd>
</dl>
dt tag:- A description list, with terms and descriptions
<dl>
<dt>Coffee</dt>
<dd>White cold drink</dd>
<dt>Milk</dt>
<dd>Black hot drink</dd>
</dl>
E html Tags
em tag:- Mark up emphasized text in a document
<p>You <em>have</em> to hurry up!</p>
embed tag:- An embedded image
<embed type="image/jpg" src="pic_trulli.jpg" width="300" height="200">
F html Tags
fieldset tag:- An embedded image
<form action="/action_page.php">
<fieldset>
<legend>Personalia:</legend>
<label for="fname">First name:</label>
<input type="text" id="fname" name="fname"><br><br>
<label for="lname">Last name:</label>
<input type="text" id="lname" name="lname"><br><br>
<label for="email">Email:</label>
<input type="email" id="email" name="email"><br><br>
<label for="birthday">Birthday:</label>
<input type="date" id="birthday" name="birthday"><br><br>
<input type="submit" value="Submit">
</fieldset>
</form>
Use CSS to style
fieldset and
legend
<html>
<head>
<style>
fieldset {
background-color: #eeeeee;
}
legend {
background-color: gray;
color: white;
padding: 5px 10px;
}
input {
margin: 5px;
}
</style>
</head>
<body>
<h1>The fieldset element + CSS</h1>
<form action="/action_page.php">
<fieldset>
<legend>Personalia:</legend>
<label for="fname">First name:</label>
<input type="text" id="fname" name="fname"><br><br>
<label for="lname">Last name:</label>
<input type="text" id="lname" name="lname"><br><br>
<label for="email">Email:</label>
<input type="email" id="email" name="email"><br><br>
<label for="birthday">Birthday:</label>
<input type="date" id="birthday" name="birthday"><br><br>
<input type="submit" value="Submit">
</fieldset>
</form>
</body>
</html>
figcaption tag:- Use a
figure element to mark up a photo in a document, and a
figcaption element to define a caption for the photo
<figure>
<img src="pic_trulli.jpg" alt="Trulli" style="width:100%">
<figcaption>Fig.1 - Trulli, Puglia, Italy.</figcaption>
</figure>
figure tag:- Use a
figure element to mark up a photo in a document, and a
figcaption element to define a caption for the photo
<figure>
<img src="pic_trulli.jpg" alt="Trulli" style="width:100%">
<figcaption>Fig.1 - Trulli, Puglia, Italy.</figcaption>
</figure>
font tag:- In HTML, the syntax for the
font tag is: (example that formats the text as red, uses to the font-family Verdana, Geneva, sans-serif and has a relative size of +1)
<body>
<p><font color="red" face="Verdana, Geneva, sans-serif" size="+1">Your formatted text goes here</font></p>
</body>
footer tag:- A footer section in a document
<footer>
<p>Author: Hege Refsnes</p>
<p><a href="mailto:hege@example.com">hege@example.com</a></p>
</footer>
form tag:- An HTML form with two input fields and one submit button
<form action="/action_page.php" method="get">
<label for="fname">First name:</label>
<input type="text" id="fname" name="fname"><br><br>
<label for="lname">Last name:</label>
<input type="text" id="lname" name="lname"><br><br>
<input type="submit" value="Submit">
</form>
H html Tags
h1 to h2 tag:- The two different HTML headings
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
head tag:- A simple HTML document, with a
title tag inside the head section
<html>
<head>
<title>Title of the document</title>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
header tag:- A header for an article
<article>
<header>
<h1>A heading here</h1>
<p>Posted by John Doe</p>
<p>Some additional information here</p>
</header>
<p>Lorem Ipsum dolor set amet....</p>
</article>
hr tag:- Use the
hr tag to define thematic changes in the content
<h1>The Main Languages of the Web</h1>
<p>HTML is the standard markup language for creating Web pages. HTML describes the structure of a Web page, and consists of a series of elements. HTML elements tell the browser how to display the content.</p>
<hr>
<p>CSS is a language that describes how HTML elements are to be displayed on screen, paper, or in other media. CSS saves a lot of work, because it can control the layout of multiple web pages all at once.</p>
<hr>
<p>JavaScript is the programming language of HTML and the Web. JavaScript can change HTML content and attribute values. JavaScript can change CSS. JavaScript can hide and show HTML elements, and more.</p>
I html Tags
i tag:- Mark up text that is set off from the normal prose in a document
<p><i>Lorem ipsum</i> is the most popular filler text in history.</p>
iframe tag:- Use the
iframe tag to embed another document within the current HTML document
<iframe src="https://featurecoding.blogspot.com"></iframe>
img tag:- How to insert an image
<img src="img_girl.jpg" alt="Girl in a jacket" width="500" height="600">
input tag:- An HTML form with three input fields; two text fields and one submit button
<form action="/action_page.php">
<label for="fname">First name:</label>
<input type="text" id="fname" name="fname"><br><br>
<label for="lname">Last name:</label>
<input type="text" id="lname" name="lname"><br><br>
<input type="submit" value="Submit">
</form>
ins tag:- A text with a deleted part, and a new, inserted part
<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>
K html Tags
kbd tag:- Define some text as keyboard input in a document
<p>Press <kbd>Ctrl</kbd> + <kbd>C</kbd> to copy text (Windows).</p>
<p>Press <kbd>Cmd</kbd> + <kbd>C</kbd> to copy text (Mac OS).</p>
L html Tags
label tag:- Three radio buttons with labels
<form action="/action_page.php">
<label for="male">Male</label>
<input type="radio" name="gender" id="male" value="male"><br>
<label for="female">Female</label>
<input type="radio" name="gender" id="female" value="female"><br>
<label for="other">Other</label>
<input type="radio" name="gender" id="other" value="other"><br><br>
<input type="submit" value="Submit">
</form>
legend tag:- Group related elements in a form
<form action="/action_page.php">
<fieldset>
<legend>Personalia:</legend>
<label for="fname">First name:</label>
<input type="text" id="fname" name="fname"><br><br>
<label for="lname">Last name:</label>
<input type="text" id="lname" name="lname"><br><br>
<label for="email">Email:</label>
<input type="email" id="email" name="email"><br><br>
<label for="birthday">Birthday:</label>
<input type="date" id="birthday" name="birthday"><br><br>
<input type="submit" value="Submit">
</fieldset>
</form>
li tag:- One ordered (ol) and one unordered (ul)HTML list
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
link tag:- Link to an external style sheet
<head>
<link rel="stylesheet" href="styles.css">
</head>
M html Tags
main tag:- Specify the main content of the document
<main>
<h1>Most Popular Browsers</h1>
<p>Chrome, Firefox, and Edge are the most used browsers today.</p>
<article>
<h2>Google Chrome</h2>
<p>Google Chrome is a web browser developed by Google, released in 2008. Chrome is the world's most popular web browser today!</p>
</article>
</main>
map tag:- An image map, with clickable areas
<img src="workplace.jpg" alt="Workplace" usemap="#workmap" width="400" height="379">
<map name="workmap">
<area shape="rect" coords="34,44,270,350" alt="Computer" href="computer.htm">
<area shape="rect" coords="290,172,333,250" alt="Phone" href="phone.htm">
<area shape="circle" coords="337,300,44" alt="Cup of coffee" href="coffee.htm">
</map>
mark tag:- Highlight parts of a text
<p>Do not forget to buy <mark>milk</mark> today.</p>
meta tag:- Describe metadata within an HTML document
<head>
<meta charset="UTF-8">
<meta name="description" content="Free Web tutorials">
<meta name="keywords" content="HTML, CSS, JavaScript">
<meta name="author" content="John Doe">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
meter tag:- Use the meter element to measure data within a given range (a gauge)
<head>
<label for="disk_c">Disk usage C:</label>
<meter id="disk_c" value="2" min="0" max="10">2 out of 10</meter><br>
<label for="disk_d">Disk usage D:</label>
<meter id="disk_d" value="0.6">60%</meter>
N html Tags
nav tag:- A set of navigation links
<nav>
<a href="/html/">HTML</a> |
<a href="/css/">CSS</a> |
<a href="/js/">JavaScript</a> |
<a href="/python/">Python</a>
</nav>
noscript tag:- Use of the
noscript tag
<script>
document.write("Hello World!")
</script>
<noscript>Your browser does not support JavaScript!</noscript>
O html Tags
object tag:- An embedded image
<object data="pic_trulli.jpg" width="300" height="200"></object>
ol tag:- Two different ordered lists (the first list starts at 1, and the second starts at 50)
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
<ol start="50">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
optgroup tag:- Group related options with
optgroup tags
<label for="cars">Choose a car:</label>
<select name="cars" id="cars">
<optgroup label="Swedish Cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
</optgroup>
<optgroup label="German Cars">
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</optgroup>
</select>
option tag:- A drop-down list with four options
<label for="cars">Choose a car:</label>
<select id="cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
output tag:- Perform a calculation and show the result in an
output element
<form oninput="x.value=parseInt(a.value)+parseInt(b.value)">
<input type="range" id="a" value="50">
+<input type="number" id="b" value="25">
=<output name="x" for="a b"></output>
</form>
P html Tags
p tag:- A paragraph is marked up as follows
<p>This is some text in a paragraph.</p>
param tag:- Set the "autoplay" parameter to "true", so the sound will start playing as soon as the page loads
<object data="horse.wav">
<param name="autoplay" value="true">
</object>
picture tag:- How to use the
picture tag
<picture>
<source media="(min-width:650px)" srcset="img_pink_flowers.jpg">
<source media="(min-width:465px)" srcset="img_white_flower.jpg">
<img src="img_orange_flowers.jpg" alt="Flowers" style="width:auto;">
</picture>
pre tag:- Preformatted text
<pre>
Text in a pre element
is displayed in a fixed-width
font, and it preserves
both spaces and
line breaks
</pre>
progress tag:- Show a progress bar
<label for="file">Downloading progress:</label>
<progress id="file" value="32" max="100"> 32% </progress>