HTML Rashika Singh Acem College of Engineeringand Management
HTML Rashika Singh Acem College of Engineeringand Management
HTML Rashika Singh Acem College of Engineeringand Management
RASHIKA SINGH
ACEM COLLEGE OF
ENGINEERINGAND MANAGEMENT
What is 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 Markup 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.
Mark-up language: A mark-up language is a computer language that is used to apply layout and formatting conventions to a text
document. Markup language makes text more interactive and dynamic. It can turn text into images, tables, links, etc.
Web Page: A web page is a document which is commonly written in HTML and translated by a web browser. A web page can be
identified by entering an URL. A Web page can be of the static or dynamic type. With the help of HTML only, we can create
static web pages.
Hence, HTML is a markup language which is used for creating attractive web pages with the help of styling, and which looks in a
nice format on a web browser. An HTML document is made of many HTML tags and each HTML tag contains different content.
Description of HTML Example
<!DOCTYPE>: It defines the document type or it instruct the browser about the version of HTML.
<html > :This tag informs the browser that it is an HTML document. Text between html tag describes the web document. It is a
container for all other elements of HTML except <!DOCTYPE>
<head>: It should be the first element inside the <html> element, which contains the metadata(information about the document).
It must be closed before the body tag opens.
<title>: As its name suggested, it is used to add title of that HTML page which appears at the top of the browser window. It must
be placed inside the head tag and should close immediately. (Optional)
<body> : Text between body tag describes the body content of the page that is visible to the end user. This tag contains the main
content of the HTML document.
<h1> : Text between <h1> tag describes the first level heading of the webpage.
<p> : Text between <p> tag describes the paragraph of the webpage.
Features of HTML
1) It is a very easy and simple language. It can be easily understood and modified.
2) It is very easy to make an effective presentation with HTML because it has a lot of formatting tags.
3) It is a markup language, so it provides a flexible way to design web pages along with the text.
4) It facilitates programmers to add a link on the web pages (by html anchor tag), so it enhances the interest of
browsing of the user.
5) It is platform-independent because it can be displayed on any platform like Windows, Linux, and Macintosh,
etc.
6) It facilitates the programmer to add Graphics, Videos, and Sound to the web pages which makes it more
attractive and interactive.
7) HTML is a case-insensitive language, which means we can use tags either in lower-case or upper-case.
HTML text Editors
•An HTML file is a text file, so to create an HTML file we can use any text editors.
•Text editors are the programs which allow editing in a written text, hence to create a web page we need to write our
code in some text editor.
•There are various types of text editors available which you can directly download, but for a beginner, the best text
editor is Notepad (Windows) or TextEdit (Mac).
•After learning the basics, you can easily use other professional text editors which are, Notepad++, Sublime Text,
Vim, etc.
•In our tutorial, we will use Notepad and sublime text editor. Following are some easy ways to create your first web
page with Notepad, and sublime text.
•All HTML tags must enclosed within < > these brackets
•Every tag in HTML perform different tasks.
•If you have used an open tag <tag>, then you must use a close tag </tag> (except some tags)
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. When you place the text within the heading tags <h1>.........</h1>, it is displayed on
the browser in the bold format and size of the text depends on the number of heading.
There are six different HTML headings which are defined with the <h1> to <h6> tags, from highest
level h1 (main heading) to the least level h6 (least important heading).
h1 is the largest heading tag and h6 is the smallest one. So h1 is used for most important heading
and h6 is used for least important.
HTML Paragraph
HTML paragraph or HTML p tag is used to define a paragraph in a webpage. Let's take a simple
example to see how it work. It is a notable point that a browser itself add an empty line before and
after a paragraph. An HTML <p> tag indicates starting of new paragraph.
Note: If we are using various <p> tags in one HTML file then browser automatically adds a single blank line
between the two paragraphs.
See this example:
1.<p>This is first paragraph.</p>
2.<p>This is second paragraph.</p>
3.<p>This is third paragraph.</p>
Space inside HTML Paragraph
If you put a lot of spaces inside the HTML p tag, browser removes extra spaces and extra line while
displaying the page. The browser counts number of spaces and lines as a single one.
How to Use <br> and <hr> tag with paragraph?
An HTML <br> tag is used for line break and it can be used with paragraph elements. Following is the example to show how to
use <br> with <p> element.
Example:
1.<!DOCTYPE html>
2.<html>
3. <head>
4. </head>
5. <body>
6. <h2> Use of line break with pragraph tag</h2>
7. <p><br>Papa and mama, and baby and Dot,
8. <br>Willie and me?the whole of the lot
9. <br>Of us all went over in Bimberlie's sleigh,
10. <br>To grandmama's house on Christmas day.
11. </p>
12. </body>
13.</html>
HTML Anchor
The HTML anchor tag defines a hyperlink that links one page to another page. It can create hyperlink to other web
page as well as files, location, or any URL. The "href" attribute is the most important attribute of the HTML a tag.
and which links to destination page or URL.
07/14/2021 12