Inline Elements

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

1.

<abbr>

<!DOCTYPE html>

<html>

<body>

<h1>The abbr element</h1>

<p>The <abbr title="Hyper Text Markup Language">HTML</abbr> is a markup language.</p>

</body>

</html>

—————————————————————

2.

<!DOCTYPE html>

<html>

<head>

<style>

table, th, td {

border: 1px solid black;

</style>

</head>

<body>

<h1>The caption element</h1>

<table>

<caption>Monthly savings</caption>

<tr>

<th>Month</th>

<th>Savings</th>

</tr>

<tr>

<td>January</td>

<td>$100</td>

</tr>

<tr>

<td>February</td>

<td>$50</td>

</tr>

</table>

</body>

</html>

—————————————————————————————————

3.

<!DOCTYPE html>

<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>

——————————————————————————————————

4. code

<!DOCTYPE html>

<html>

<body>

<h1>The code element</h1>

<code>

C Program

int main()

int a,b;

printf("welcome to C Programming");

</code>

<p>The CSS <code>background-color</code> property de nes the background color of an


element.</p>

</body>

</html>

———————————————————————————————————

5. em

<!DOCTYPE html>

<html>

<body>

<h1>The em element</h1>

<p>This is the <em>need</em> of the hour.</p>

<p>We <em>cannot</em> wait, please <em> hurry up!.</p>

</body>

</html>

——————————————————————————————————-

6. style

<!DOCTYPE html>

<html>

<body>

<p>I am normal</p>

<p style="color:red;">I am red</p>

<p style="color:blue;">I am blue</p>

fi
<p style="font-size:50px;">I am big</p>

</body>

</html>

——————————————————————————————————

7. lists

<!DOCTYPE html>

<html>

<body>

<h1> product Lines</h1>

<ol type="A">

<li> Product1</li>

<li>Product2</li>

</ol>

</body>

</html>

——————————————————————————————————-

8. GuessThe Output

<!DOCTYPE html>

<html>

<head>

<title>Page Title</title>

</head>

<body>

<h3>Placing Orders</h3>

<p>You can place <strong> orders</strong> via our

<font size = "+2">telephone</font> if you <i>must.</i>

Call in person for orders &lt; Rs. 500 .<br/> <i> &quot;

we are always ready to help! &quot;</i></p>

<h3> Our Address </h3>

<pre>

The Cake Shop,

Mysuru,

Karnataka, India

</pre>

</body>

</html>

——————————————————————————————————-

9. All Tags

<!DOCTYPE html>

<html>

<head>

<title>Basic Tags</title>

</head>

<body>

<h1>Heading h1</h1>

<h2>Heading h2</h2>

<h3>Heading h3</h3>

<h4>Heading h4</h4>

<h5>Heading h5</h5>

<h6>Heading h6</h6>

<p>This is a sample paragraph.</p>

<p>This is the 2nd para.</p>

<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum
has been the industry's standard dummy text ever since the 1500s, when an unknown printer
took a galley of type and scrambled it to make a type specimen book. It has survived not only ve
centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was
popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages,
and more recently with desktop publishing software like Aldus PageMaker including versions of
Lorem Ipsum.

</p>

<p>This is a sample paragraph.</p>

<hr>

<p>This is the 2nd para.</p>

<p>This is a sample<br>

paragraph.</p>

<code>

console.log("Hello World!");

</code>

<br>

<code>

var name = "abc";

</code>

<p>This is a

Sample

Paragraph.

</p>

<pre>This is a

Sample

Paragraph.

</pre>

<a href="https://www.google.com" target="_blank">google.com</a>

<img src="https://www.dyclassroom.com/image/dyclassroom-logo-black-311x48.png">

<a href="https://www.dyclassroom.com">

<img src="https://www.dyclassroom.com/image/dyclassroom-logo-black-311x48.png">

</a>

</body>

</html>

fi

You might also like