HTML, Head, Body tags
Posted 2024-08-13 03:31:57
0
3K
HTML
- The root element of an HTML document.
- Encloses the entire document, including the
head
andbody
sections. - Provides the overall structure for the webpage.
Head
- Contains metadata about the webpage, information that is not displayed directly on the page but is essential for browsers and search engines.
- Common elements within the
head
include:<title>
: Sets the title of the page, displayed in the browser's tab.<meta>
: Provides additional information about the page, such as keywords, description, author, character encoding, viewport, etc.<link>
: Links to external stylesheets (CSS) for styling the page.<script>
: Includes JavaScript code for interactive elements.
Body
- Contains the visible content of the webpage.
- This is where you place elements like headings, paragraphs, images, links, forms, and other content that users will see.
- Common elements within the
body
include:<h1>
to<h6>
: Defines headings of different levels.<p>
: Defines a paragraph.<img>
: Embeds an image.<a>
: Creates a hyperlink.<div>
: Defines a division or section in an HTML document.<span>
: Defines an inline section in an HTML document.
Basic HTML Structure:
HTML
<!DOCTYPE html>
<html>
<head>
<title>My Web Page</title>
<meta charset="UTF-8">
</head>
<body>
<h1>Hello, world!</h1>
<p>This is a paragraph.</p>
</body>
</html>
In summary:
- The
html
tag encompasses the entire document. - The
head
tag contains metadata about the page. - The
body
tag contains the visible content of the page.
Search
Categories
- Technology
- Education
- Business
- Music
- Got talent
- Film
- Politics
- Food
- Games
- Gardening
- Health
- Home
- Literature
- Networking
- Other
- Party
- Religion
- Shopping
- Sports
- Theater
- Wellness
Read More
Doctype Declaration in HTML
What is a Doctype Declaration?
A doctype declaration is an instruction to the web browser about...
Creating your first HTML file
Step-by-Step Guide
1. Choose a Text Editor:
Basic Text Editors: Notepad (Windows), TextEdit...
Business Information Systems Course Outline
Introduction to Business Information Systems
Overview of BIS
Importance of BIS in modern...
A'LEVEL PHYSICS SEMINAR 2024
A'LEVEL PHYSICS SEMINAR 2024
Italic Text in HTML: <i> and <em>
To make text italic in HTML, you can use either the <i> or <em> element. Both...