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

HTML Notes

Uploaded by

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

HTML Notes

Uploaded by

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

HTML Notes

1. Definitions

a. Web Browsers
Web browsers are software applications used to access and view websites. They retrieve
content from web servers and display it on your device. Popular web browsers include
Google Chrome, Mozilla Firefox, Microsoft Edge, and Safari.

b. Webpages
Webpages are individual documents on the World Wide Web that are written in HTML
(HyperText Markup Language). Each webpage can contain text, images, videos, links, and
other multimedia content.

c. Websites
Websites are collections of related webpages that are accessed through a common domain
name. A website typically consists of a homepage and several other linked pages, providing
information and services.

2. HTML Structure
HTML (HyperText Markup Language) is the standard markup language for creating
webpages. An HTML document has a structured format that includes elements such as the
doctype declaration, html, head, and body tags. Below is a basic structure of an HTML
document:

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
</body>
</html>

3. Tags in HTML
HTML tags are the building blocks of HTML. They are used to create elements on a webpage.
Tags are usually paired, with an opening tag and a closing tag. Some common HTML tags
include:
<html>: Defines the root of an HTML document.
<head>: Contains meta-information about the document.
<title>: Sets the title of the document.
<body>: Contains the content of the document.
<h1> to <h6>: Define HTML headings.
<p>: Defines a paragraph.
<a>: Defines a hyperlink.
<img>: Embeds an image.

4. Attributes in HTML
HTML attributes provide additional information about HTML elements. They are always
included in the opening tag and usually come in name/value pairs like name='value'. Some
common attributes include:

id: Specifies a unique id for an element.


class: Specifies one or more class names for an element.
src: Specifies the source file for an image, audio, or video element.
href: Specifies the URL of a linked resource.
alt: Provides alternative text for an image.

5. Examples of HTML Files


Below is an example of a simple HTML file:

<!DOCTYPE html>
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
<h1>Welcome to My Website</h1>
<p>This is my first webpage created using HTML.</p>
<a href='https://www.example.com'>Visit Example</a>
<img src='image.jpg' alt='Sample Image'>
</body>
</html>

You might also like