0% found this document useful (0 votes)
7 views

HTML

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

HTML

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

HTML (Hypertext

Markup Language)

PREPARED BY:-Trupti Dinesh Thakare


Bsc 3rd Year (CSM)
INTRODUCTION TO HTML
HTML was invented in 1991, by a scientist called Tim Berners Lee.

What is HTML?
HTML is the standard markup language for creating Web pages.
 HTML stands for Hyper Text Markup Language
 HTML describes the structure of Web pages using markup
 HTML elements are the building blocks of HTML pages
 HTML elements are represented by tags
 HTML tags label pieces of content such as “heading”, “paragraph”, “table”, and
so on
 Browsers do not display the HTML tags, but use them to render the content of the
page.
HTML Basic Structure
Structure Explained
 The <!DOCTYPE html> declaration defines this document to the
HTML5
 The <html> element is the root of element of an HTML page
 The <head> element contains meta information the document
 The <head> element specifies a title for the document
 The <body> element contain the visible page content
 <head> A container for all the head elements (title, scripts, styles,
meta information, and more)
 The<h1> element defines a large heading
 The <p> element defines a paragraph
HTML formatting elements
HTML also defines special elements for defining text with a special meaning.
HTML uses elements like <b> and <i> for formatting output, like bold or italic
text. Formatting elements were designed to display special types of text:

Formatting elements were designed to display special types of text:


<b> - Bold text
<strong> - Important text
<i> - Italic text
<mark> - Marked text
<small> - Small text
<del> - Deleted text
<ins> - Inserted text
<sub> - Subscript text
<sup>’ Superscript text
Unclosed HTML Tags :-
Some HTML tags are not closed, for example br and hr.
<br> Tag: br stands for break line, it breaks the line of the code
HTML Attributes
 HTML Attributes: It is used to define the character of an HTML element. It always
placed in the opening tag of an element
 HTML attributes provide additional information about HTML elements.
 All HTML elements can have attributes.
 Attributes are always specified in the start tag
 Attributes usually come in name/value pairs like: name=“value”
 The name is the property you want to set. For example, the paragraph <p>element
in the example carries an attribute whose name is align, which you can use to
indicate the alignment of paragraph on the page.
 The value is what you want the value of the property to be set and always put within
quotations. The below example shows three possible values of align attribute: left,
center and right.
 Attribute names and attribute values are case-insensitive. However, the World Wide
Web Consortium (W3C) recommends lowercase attributes/attribute values in their
HTML 4 recommendation
Example :
The style attribute is used to add styles to an element, such as color, font, size, and more,
<p style=“color:red;”>This is a red paragraph.</p>
<palign = “center”>This is center aligned</p>
HTML Headings
 HTML defines six levels of headings. A heading element implies all
the font changes, paragraph breaks before and after, and any white
space necessary to render the heading. The heading elements are h1,
h2, h3, h4, h5, and h6. HTML headings are defined with the <h1> to
<h6> tags.
 <h1> defines the most important heading. <h6> defines the least
important heading: It is important to use headings to show the
document structure.
 <h1> headings should be used for main headings, followed by <h2>
headings, then the less important <h3>, and so on.
Example :
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3<h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
Thank You

You might also like