Nothing Special   »   [go: up one dir, main page]

HTML Tags

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

HTML Tags

<h1>,<h2>,….<h6> Used for Headings, As number increases the font size


decreases.

<title> used for the tab title

<strong> or <b> Tags are used to make the text in it bold

<em> or <i> Tags are used to make the text italic

<u> This tag underlines the text in it

<hr> This tag is used to add lines to the text

<div> Used to make an invisible box, to which content can be added

<p> Used to write paragraphs

<br> Used as a newline character

<span> Used to make changes to specific words in a paragraph text, doesn’t


move the rest of the paragraph to another line. You can further make changes
to only those words inside the <span> tag to make it bold, italic, underline etc..

<form> Used to create forms in a html page. Class, action, method=”post" is


required.
<input> Used to take input from the users while creating a form.

ex: <label for="username">Username</label>

<input id="username" type="text" name="" value="" placeholder="Tony Stark"


required>

We can change the input type to any of the following below:


Text
Email
Password
Radio
Checkbox
Date

<label> used to define a label for the input tag

CREATING CHECKBOX IN HTML:


<label for="">How many do you want?</label> <br><br>
<label for="">1</label>
<input type="checkbox" name="" value="" checked><br><br>

<label for="">2</label>
<input type="checkbox" name="" value="" ><br><br>

<label for="">3</label>

TO CREATE DROPDOWN SELECT OPTION IN HTML:


<select name="" id="">
<option value="">1</option>
<option value="">2</option>
<option value="">3</option>
</select>
<br><br>
LISTS:
<ol> - Ordered Lists
<ul> - Unordered Lists
<dt> - description Lists
<dd> - Terms inside of a description list
<li> - elements inside of a list
We can change the type of the list by using:
<ul type="circle">
<li>Ice Cream</li>
<li>Cheese cake <ul type="i">
<li>Blueberry Cheese Cake</li>
<li>Chocolate Cheese Cake</li>
</ul>

<img> Used to add images into html page


Ex: <imgsrc="Pictures/image.jpg" alt="Japan" title="Mount Fuji Japan"
width="800.5" height="332">

CREATING TABLES IN HTML:


<table border="1" width="200" height="200">
<tr>
<th>Flag</th>
<th>Country</th>
<th>Capital</th>
<th>Population</th>
</tr>

<tbody>
<tr>
<td><img src="Pictures/lon.jpg" alt="london" title="London"
width="50" height=""></td>
<td><a
href="https://en.wikipedia.org/wiki/England">England</a></td>
<td>London</td>
<td>55 Million</td>
</tr>

<tr>
<td><img src="Pictures/usa.png" alt="USA" title="USA"
width="50" height=""></td>
<td><a
href="https://en.wikipedia.org/wiki/United_States">United States</a></td>
<td>Washington</td>
<td>328 Million</td>
</tr>

<tr>
<td><img src="Pictures/china.png" alt="china" title="China"
width="50" height=""></td>
<td><a
href="https://en.wikipedia.org/wiki/China">Beijing</a></td>
<td>China</td>
<td>1.4 Billion</td>
</tr>
</tbody>
</table>

<td> - elements inside a table


<tr> - Rows in a table

To create a clickable text that will redirect you to another website or anything,
use <a> tag:
<a href="https://www.apple.com/sg/">Apple</a>

You might also like