Professional Documents
Culture Documents
INTRODUCTION TO HTML
INTRODUCTION TO HTML
HTML is an acronym which stands for Hyper Text
Mark-up Language which is used for creating
web pages and web applications. Let's see what is
meant by Hypertext Mark-up Language, and Web
page.
Hyper Text: Hypertext simply means "Text within
Text." A text has a link within it, is a hypertext.
Whenever you click on a link which brings you to a
new webpage, you have clicked on a hypertext.
Hypertext is a way to link two or more web pages
(HTML documents) with each other.
To run the HTML page, you need to open the file location, where
you have saved the file and then either double-click on file or click
on open with option
Let's see a simple example of HTML.
<!DOCTYPE>
<html>
<head>
<title>Web page title</title>
</head>
<body>
<h1>Write Your First Heading</h1>
<p>Write Your First Paragraph.</p>
</body>
</html>
Description of HTML Example
<h1> : Text between <h1> tag describes the first level heading of the
webpage.
<p> : Text between <p> tag describes the paragraph of the webpage.
HTML Elements
An HTML element is defined by a start tag, some content, and an end
tag.
HTML Elements
The HTML element is everything from the start tag to the end tag:
<tagname>Content goes here...</tagname>
Example
<a href="https://www.w3schools.com">Visit W3Schools</a>
Example
<img src="img_girl.jpg">
The width and height Attributes
The <img> tag should also contain the width and height attributes,
which specify the width and height of the image (in pixels):
Example
<img src="img_girl.jpg" width="500" height="600">
Example
<img src="img_girl.jpg" alt="Girl with a jacket">
The style Attribute
The style attribute is used to add styles to an element, such as color,
font, size, and more.
Example
<p style="color:red;">This is a red paragraph.</p>
HTML HEADING
A HTML heading or HTML h tag can be defined as a
title or a subtitle which you want to display on the
webpage.
Example:
<!DOCTYPE html>
<html>
<body>
<p>This is first paragraph.</p>
<p>This is second paragraph.</p>
</body>
</html>
HTML STYLE
HTML style attribute is used to add styles to an
element, such as color, font, size, and more.
<tagname style="property:value;">
Background Color
The CSS background-color property defines the background color
for an HTML element.
<body style="background-color:powderblue;">
Text Color
The CSS color property defines the text color for an HTML element:
<del> Element
The HTML <del> element defines text that has been deleted from a
document.
<ins> Element
The HTML <ins> element defines a text that has been inserted into a
document. Browsers will usually underline inserted text:
<p>My favourite color is <del>blue</del> <ins>red</ins>.</p>
<sub> Element
The HTML <sub> element defines subscript text. Subscript text can
be used for chemical formulas, like H2O:
<sup> Element