html notes
html notes
o Editor ( Notepad, Notepad ++, Vs Code, Edit Plus, Sublime Text Editor
etc.)
• What is HTML ?
HTML - Hyper Text Markup Language
o Example
1. Aam Example
CSS - Styling
JS - Functionality
Example:- Wikipedia
• Types of Tag
o Paired Tag
<h1></h1>, <p></p> etc.
o Non-Paired Tag
<img>, <hr>, <br>, <input> etc.
• What is Attribute
Attribute used to tell the extra information about the tag.
Example
<a href="https://google.com">Go to Google</a>
<a title="Central Processing Unit">C.P.U</a>
----___---Heading Tags
-Paragraph Tag
Used to create a Paragarph.
HTML
<!DOCTYPE html>
<html>
<head>
<title>Paragraph Example</title>
</head>
<body>
<p>This is a simple paragraph of text.</p>
</body>
</html>
• Anchor Tag
Used to create links in webpages.
1. Absolute URL:-
<!DOCTYPE html>
<html>
<head>
<title>Paragraph Example</title>
</head>
<body>
<a href="https://www.google.com"
target="_blank">Google</a>
</body>
</html>
2. Relative URL:-
<!DOCTYPE html>
<html>
<head>
<title>Paragraph Example</title>
</head>
<body>
<a href="./about.html" target="_blank">About</a>
</body>
</html>
3. Jump to the specific section in html through anchor tag.
<!DOCTYPE html>
<html>
<head>
<title>Paragraph Example</title>
</head>
<body>
<h1>Welcome</h1>
<a href="#info">Jump to Info Section</a>
• Task
1. Create a basic webpage with a heading and a paragraph.
heading - welcome to My webpage
paragraph - This is my first webpage. I'm learning
HTML!
2. Add a clickable external link (absolute URL) of YouTube.
3. Create two HTML files (index.html and about.html) and link
them together using relative URLs.
index.html - Go To About Page
about.html - Back to Home
4. Create a page with a section link that jumps to a specific part.
----__---Image Tag---__---
---___--Attributes---__---
• Formatting Tags
o Basic Formatting Tags
Old vs. New (Recommended) HTML Tags
Old Tag New Tag Purpose
(Recommended)
Alphanumeric list
<ol type="a">
<li>Apple</li>
<li>Banana</li>
<li>Orange</li>
<li>Grapes</li>
</ol>
Roman List
<ol type="i">
<li>Apple</li>
<li>Banana</li>
<li>Orange</li>
<li>Grapes</li>
</ol>
* Unordered List
<ul>
<li>Apple</li>
<li>Banana</li>
<li>Orange</li>
<li>Grapes</li>
</ul>
• Description List
Description list is used to describe something.
<dl> :- Description List
<dt> :- Description Term
<dd> :- Description Details or Description Definition
<dl>
<dt>HTML</dt>
<dd>HTML is used to create structure of our
webpage.</dd>
</dl>