Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
4 views

HTML

HTML, or Hypertext Markup Language, is the standard markup language for creating web pages, allowing for the structuring and formatting of content using various elements and tags. It is easy to learn, platform-independent, and supports multimedia content. The document outlines the basic structure of an HTML page, key HTML elements, and various formatting and block-level tags.

Uploaded by

Monika Kate
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

HTML

HTML, or Hypertext Markup Language, is the standard markup language for creating web pages, allowing for the structuring and formatting of content using various elements and tags. It is easy to learn, platform-independent, and supports multimedia content. The document outlines the basic structure of an HTML page, key HTML elements, and various formatting and block-level tags.

Uploaded by

Monika Kate
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

INTRODUCTION TO HTML

HTML Overview

HTML stands for Hypertext Markup Language, and it is the most widely used language to write Web Pages.

 Hypertext refers to the way in which Web pages (HTML documents) are linked together. Thus, the link available
on a webpage is called Hypertext.

 As its name suggests, HTML is a Markup Language which means you use HTML to simply "mark-up" a text
document with tags that tell a Web browser how to structure it to display.

Originally, HTML was developed with the intent of defining the structure of documents like headings, paragraphs,
lists, and so forth to facilitate the sharing of scientific information between researchers.

Now, HTML is being widely used to format web pages with the help of different tags available in HTML language.

What is HTML?

 HTML stands for Hyper Text Markup Language

 HTML is the standard markup language for creating Web pages

 HTML describes the structure of a Web page

 HTML consists of a series of elements

 HTML elements tell the browser how to display the content

 HTML elements label pieces of content such as "this is a heading", "this is a paragraph", "this is a link", etc.

Features of HTML

 It is easy to learn and easy to use.

 It is platform-independent.

 Images, videos, and audio can be added to a web page.

 Hypertext can be added to the text.

 It is a markup language.

HTML Page Structure

The basic structure of an HTML page is shown below. It contains the essential building-block elements (i.e. doctype
declaration, HTML, head, title, and body elements) upon which all web pages are created.
 <!DOCTYPE html> – This is the document type declaration (not technically a tag). It declares a document as
being an HTML document. The doctype declaration is not case-sensitive.

 <html> – This is called the HTML root element. All other elements are contained within it.

 <head> – The head tag contains the “behind the scenes” elements for a webpage. Elements within the
head aren’t visible on the front end of a webpage. HTML elements used inside the <head> element
include:

 <title> – The title is what is displayed on the top of your browser when you visit a website and contains the
title of the webpage that you are viewing.

 <body> – The body tag is used to enclose all the visible content of a webpage. In other words, the body
content is what the browser will show on the front end.
What is an HTML Element?

An HTML element is defined by a start tag, some content, and an end tag:

<tagname> Content goes here... </tagname>

The HTML element is everything from the start tag to the end tag:

HTML Text Formatting Tags:

Sr. Tag Description Syntax & Example


No
1 <b> The HTML <b> element defines bold text, <b>…..</b>
without any extra importance. e.g <b>This text is bold</b>
2 <strong> The HTML <strong> element defines text with <strong>…….</strong>
strong importance. The content inside is typically <strong>This text is important!
displayed in bold. </strong>
3 <i> The content inside is typically displayed in italic. <i>This text is italic</i>
4 <em> <em>This text is
emphasized</em>
5 <small> The HTML <small> element defines smaller text. <small>Write the paragraph in smalle
This tag is used to decrease the font size by one r font.</small>
unit from base font size.
6 <mark> The HTML <mark> element defines text that <p>Do not forget to
should be marked or highlighted. buy <mark>milk</mark> today.</p
>
7 <del> The HTML <del> element defines text that has <p>My favorite color
been deleted from a document. Browsers will is <del>blue</del> red.</p>
usually strike a line through deleted text.
8 <ins> The HTML <ins> element defines a text that has <p>My favorite color
been inserted into a document. Browsers will is <del>blue</del> <ins>red</in
usually underline inserted text: s>.</p>
o/p- My favorite color is blue red.
9 <sub> The HTML <sub> element defines subscript text. <p>This
Subscript text appears half a character below the is <sub>subscripted</sub> text.
normal line, and is sometimes rendered in a </p>
smaller font. Subscript text can be used for O/P:- This is subscripted text.
chemical formulas, like H2O:
10 <sup> The HTML <sup> element defines superscript <p>This
text. Superscript text appears half a character is <sup>superscripted</sup> tex
above the normal line, and is sometimes t.</p>
rendered in a smaller font. Superscript text can O/P :- This is superscripted text.
be used for footnotes, like WWW[1]:
Note : <strike>, <big> Not Supported in HTML5.
HTML Block Level Tags

1) <!...............> Comment Tag is used to insert Comments in the source code in a HTML document.
2) Heading <h1> to <h6> tags: The HTML <h1> to <h6> tags are used to define HTML headings.
Example:

Attributes for heading tag is Align having a value left, center, right, justify This attribute specifies the
alignment of a heading.

3) <p> Tag : HTML documents are divided into paragraphs.


4) <br> Tag : It is used to specify line break.
5) <center> Tag: The <center> tag is used to center align text.
6) &nbsp; - Non breaking space
7) <div> Tag : It defines a division or a section in an HTML document. It used to group block
elements to format them with CSS.
8) <span> Tag : The <span> tag is used for grouping styles to inline elements.
9) <hr> Tag : The HTML <hr> tag is used for specifying a horizontal rule in an HTML document. The
<hr> tag is used for creating a horizontal line which separate content in an HTML page.
e.g <hr style="height:2px;border-width:0;color:gray;background-
color:gray">

10) <font> Tag: Not Supported in HTML5.


The <font> tag was used in HTML 4 to specify the font face, font size, and color of text.
What to Use Instead?
<p style="color:red">This is a paragraph.</p>
<p style="color:blue">This is another paragraph.</p>
11) <a> Anchor Tag: The HTML <a> tag is used for creating a hyperlink to another web page.
The <a> tag can be used in two ways:
To create a link to another document, by using the href attribute, and
To create bookmark inside a document, by using the name attribute.

12)List in HTML
In HTML, we can list out the items, subjects or menu in the form of list. HTML gives us
three different types of lists
1. Unordered Lists
2. Ordered Lists
3. Definition Lists
1. Unordered Lists: An Unordered list is a collection of related items that have no special
order or sequence. Unordered list is created by using <ul> tag. Each item in the list is
marked with the bullet. The bullet itself comes in three flavors : squares, discs and
circles.

HTML5 Semantics

You might also like