In this lesson , we are going to discuss:
- To create a link and name it in our html file.
- To format text like inserting new line.
- To bold a certain text.
- To show text in italic.
Creating links:
To embed links in our program we will use the tag <a href> </a>.
<a is the anchor tag and href is its attribute. So we write <a href>
Now to insert link we may write <a href "http://www.google.com>Go to google</a>
For example:
<!DOCTYPE html>
<html>
<head>
<title>Inserting link</title>
</head>
<body>
<a href = http://www.google.com>Go to google</a>
</body>
</html>
Insert new line:
Generally html ignore the white spaces then here is way is to insert a new line your paragraph.
You need to use the tag <br> or <BR /> means the break tag.
For example:
<!DOCTYPE html>
<html>
<head>
<title>Inserting new line</title>
</head>
<body>
<H2>An article on html</H2>
HTML Article is a HTML semantic element. <br>It is most commonly used to contain information that may be distributed independently from the rest of the site or application it appears in.
</body>
</html>
Formatting text:
In order to use bold and italic fonts we need these tags:
- <strong></strong> or <b></b>:To bold the characters
- <em></em>: This is emphasize tag to use italic fonts.
- <small></small> : To make text smaller.
- <big></big> : To make text bigger.
For example:
<!DOCTYPE html>
<html>
<head>
<title>Inserting new line</title>
</head>
<body>
<H2>An article on html</H2>
HTML Article is a <strong><big>HTML</big></strong> semantic element.It is most commonly used to contain <small><em>information</em></small> that may be distributed independently from the rest of the site or application it appears in.
</body>
</html>
Note: Make sure to use HTML tags in correct order.
Line separator:
You may also put a horizontal line separator using <hr> tag, which stands for horizontal. As shown in the simple example below:
<!DOCTYPE html>
<html>
<head>
<title>Inserting images</title>
</head>
<body>
<H1>What is html</H1>
<p>Hypertext Markup Language is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets and scripting languages such as JavaScript.</p>
<hr>
<img src="html.png" height="500px" width="700px" alt= "Error image" >
</body>
<html>
To Know how to insert an image in html Click here .
0 Comments