HTML
HTML
HTML
1. HTML (Hypertext Markup Language) is the code that is used to structure a web page and its content.
2. HTML was created by Tim Berners-Lee in 1991. The first-ever version of HTML was HTML 1.0, but the first standard
version was HTML 2.0, published in 1999.27-Sept-2021
3. In HTML Hypertext simply means ”Text within Text”.
4. Markup Language describes how HTML works.
Features Of HTML
5. It is a very easy and simple language. It can be easily understood and modified.
6. It is very easy to make an effective presentation with HTML because it has a lot of formatting tags.
7. It is a markup language, so it provides a flexible way to design web pages along with the text.
Advantages of HTML
8. HTML is Easy to Learn and Use. HTML is very easy to learn and understand. ...
9. HTML is Free. ...
10. HTML is supported by all Browsers. ...
11. HTML is the Most Friendly Search Engine. ...
12. HTML is Simple to Edit. ...
13. HTML can Integrate Easily with Other Languages. ...
14. HTML is Lightweight. ...
15. HTML is Basic of all Programming Languages.
HTML Page Structure
Html Page divide into three main section
1.Comment section
2.Head Section
3.Body Section
Comment Section
Head Section
Body Section
To Creating HTML Document
1. Open Notepad or any Editor write program there
2. Save with html means .html extension
3. Go to folder or file .double click on it program will display on Browser.
2. <html>……..</html>Tag:
3. HTML tags contain three main parts: opening tag, content and closing tag.
4. But some HTML tags are unclosed tags.
3.<head>…..</head> Tag:
1. The <head> element is a container for metadata (data about data) and is placed between the <html> tag and the
<body> tag.
2. Metadata is data about the HTML document.
3. Metadata typically define the document title, character set, styles, scripts, and other meta information.
4.<title>….</title> Tag :
4. <title> tag is used for declaring the title, or name, of HTML document.
5. It is display in browser title bar.
Example:
<!DOCTYPE html>
<html>
<head>
<title>Studious SYBCA</title>
</head>
<body>
5.<body>……</body>Tag:
6. The <body> tag defines the document's body.
7. The <body> element contains all the contents of an HTML document, such as headings, paragraphs, images,
hyperlinks, tables, lists,
8. <body>tag having various attributes.
Attribute Value Description
alink color Specifies color of active documents.
background URL
Specifies a background image.
bgcolor color Specifies background color
link color Specifies the color of unvisited links
text color Specifies the color of text
</body>
</html>
2.Text FormattingTags (Working with Text)
The Html hags are used for formatting text are called as text formatting tags.
• <strong> - Important text example :<strong>This text is important!</strong>
• <i> - Italic text example : <i>This text is italic</i>
• <em> - Emphasized text example : <em>This text is emphasized</em>
• <mark> - Marked text example:<p>Do not forget to buy <mark>milk</mark> today.</p>
• <small> - Smaller text example: <small>This is some smaller text.</small>
• <del> - Deleted text example : <p>My favorite color is <del>blue</del> red.</p>
• <ins> - Inserted text example:<p>My favorite color is <del>blue</del> <ins>red</ins>.</p>
• <sub> - Subscript text example: <p>This is <sub>subscripted</sub> text.</p>
• <sup> - Superscript text example:<p>This is <sup>superscripted</sup> text.</p>
<b>-Bold text example: <b>This text is bold</b>
• <u>-Underline example:<u>sybca</u>
3.<p>Tag:
The <p> tag defines a paragraph.
Browsers automatically add a single blank line before and after each <p> element.
Example:<p>This is some text in a paragraph.</p>
4.<br>Tag:
This tag is used for specifying a line break.This is an emply tag.
example:<br/>
8.<hr>Tag:
Horizontal rules are used to visually break up sections of a documents.
<hr>tag creates a line from the current position in the document to the right margin and breaks the line
accordingly.
9.<font>Tag:
the<font> tag specifies the font face,font size and font color of text.
<img>Image Tag:
The <img> tag is used to embed an image in an HTML page.
Images are not technically inserted into a web page; images are linked to web pages. The <img> tag creates a
holding space for the referenced image.
The <img> tag has two required attributes:
•src - Specifies the path to the image
•alt - Specifies an alternate text for the image, if the image for some reason cannot be displayed
Example:
<img src=“dolphine.jpg" alt="Girl in a jacket" width="500" height="600">
Unordered List:
1. An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.
2. The list items will be marked with bullets (small black circles) by default.
Example:
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
Ordered list:
1. An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.
2. The list items will be marked with numbers by default.
Example:
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
Description Lists:
3. HTML also supports description lists.
4. A description list is a list of terms, with a description of each term.
5. The <dl> tag defines the description list, the <dt> tag defines the term (name), and
the <dd> tag describes each term:
Example:
<dl>
<dt>Coffee</dt>
<dd>- black hot drink</dd>
<dt>Milk</dt>
<dd>- white cold drink</dd>
</dl>
9.Working with Frames
1. Frame: A technique to display multiple documents at once.
2. Frames allow us to split the browser window into multiple windows that display different pages.
3. HTML <frame> tag define the particular area within an HTML file where another HTML web page can be
displayed.
4. A <frame> tag is used with <frameset>, and it divides a webpage into multiple sections or frames, and each
frame can contain different web pages.
You can Make vertical Frame as well as horizontal Frame
Example:
For vertical For Horizontal
<html> <html>
<frameset cols=“50%,30%,20%”> <frameset rows=“50%,30%,20%”>
<frame src=“frame1.html”> <frame src=“frame1.html”>
<frame src=“frame2.html”> <frame src=“frame2.html”>
<frame src=“frame3.html”> <frame src=“frame3.html”>
</frameset> </frameset>
</html> </html>
10.Working with Forms and Form Controls:
<form> Tag:
The <form> tag is used to create an HTML form for user input.
The <form> element can contain one or more of the following form elements.
Example:
<form>
Input elements
</form>
<input >tag:
1. The <input> tag specifies an input field where the user can enter data.
2. The <input> element is the most important form element.
3. The <input> element can be displayed in several ways, depending on the type attribute.