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

Document 002

Uploaded by

binoy ghosh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Document 002

Uploaded by

binoy ghosh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Basic tags of HTML.

1. <!DOCTYPE html>

- This tag defines the document type and version of HTML being used,
which in modern web development is HTML5. It tells the web browser that
the document conforms to HTML5 standards, helping ensure consistent
rendering across different browsers. It is not an HTML tag per se, but a
declaration that informs the browser about the version of HTML to expect.

2. <html>

- The `<html>` tag is the root element of an HTML document. It


encompasses all other HTML elements, marking the beginning and end of
the document. This tag acts as a container for the entire content of the page
and is essential for structuring an HTML document.

3. <head>

- The `<head>` element contains meta-information about the HTML


document that is not directly displayed on the page but is crucial for defining
properties and linking resources. It typically includes elements like:

- <title>: Sets the title of the document, which appears in the browser’s
title bar or tab. This is a critical component for search engine optimization
(SEO) and user experience.

- <meta>: Provides metadata such as character encoding (e.g., UTF-8)


and viewport settings (for responsive design). Metadata helps in defining the
document’s settings and behaviors.

- <link>: Links external resources, most commonly stylesheets (CSS), to


the document. This allows for the separation of content and presentation by
linking external files.

- <style>: Contains internal CSS styles that apply directly to the


document. This allows for defining styles within the HTML document itself
rather than linking to an external stylesheet.
- <script>: Embeds or references JavaScript code. This can be used to
include inline scripts or link to external JavaScript files, enabling dynamic and
interactive features.

4. <body>

- The `<body>` tag encloses all the content that is visible on the web
page. This includes text, images, links, and other media or interactive
elements. It represents the main content area of the HTML document and is
where the bulk of the web page’s content resides.

5. <h1> to <h6>

- These tags represent headings of different levels, with `<h1>` being the
highest or most important level, and `<h6>` the lowest. They are used to
structure content hierarchically, making it easier for users and search
engines to understand the content’s organization. Headings help in creating
a clear and organized layout for documents and are essential for
accessibility.

6. <p>

- The `<p>` tag defines a paragraph of text. It automatically adds spacing


before and after the paragraph, helping to separate blocks of text for
readability. It is a fundamental element for structuring textual content on a
web page.

7. <a>

- The `<a>` tag creates a hyperlink, allowing users to navigate to other


web pages, resources, or sections of the same page. It is a crucial element
for linking and navigation within and across websites. The `href` attribute
specifies the destination of the link.

8. <img>
- The `<img>` tag embeds images into the document. It is used to display
visual content and requires the `src` attribute to specify the image file’s
location. It can also include attributes like `alt` for alternative text, providing
a description of the image for accessibility and SEO.

9. <div>

- The `<div>` tag defines a division or section within the document. It is a


block-level element often used to group and style other elements, facilitating
layout and design. It does not have any inherent styling but serves as a
container for applying CSS styles and organizing content.

10. <span>

- The `<span>` tag is used to style or group inline elements. Unlike


`<div>`, it is an inline element that does not disrupt the flow of content. It is
often used to apply CSS styles or JavaScript to a specific part of text without
affecting the surrounding content.

11. <ul>

- The `<ul>` tag defines an unordered list, which is a collection of items


displayed with bullet points. It helps organize items in a non-sequential order.
Each item within the list is marked by the `<li>` tag.

12. <ol>

- The `<ol>` tag defines an ordered list, where items are displayed with
numbers or letters. It is used to present a sequential order or ranking of
items. Like `<ul>`, each item is marked by the `<li>` tag.

13. <table>

- The `<table>` tag creates a table, allowing for the presentation of data
in a structured grid format. Tables are composed of rows and columns, with
the following components:

- <tr>: Defines a row in the table.


- <th>: Represents a header cell in the table, typically used for column
headings.

- <td>: Defines a standard data cell in the table where actual content is
placed.

14. <form>

- The `<form>` tag defines an interactive form for collecting user input. It
acts as a container for various form elements, enabling the submission of
data to a server. Key elements include:

- <input>: Defines various types of input fields, such as text boxes,


checkboxes, and radio buttons.

- <textarea>: Creates a multiline text input field, allowing users to enter


longer pieces of text.

- <button>: Defines a clickable button that can submit the form or


trigger actions.

- <select>: Creates a dropdown list of options.

- <option>: Defines individual options within a `<select>` dropdown list.

15. <header>

- The `<header>` tag represents the introductory or navigational section


of a document or section. It typically includes elements such as headings,
logos, and navigation links. It helps in structuring and identifying key areas of
the page.

16. <footer>

- The `<footer>` tag defines the footer section of a document or section.


It generally contains information such as copyright statements, contact
details, and links to related documents or pages. It helps in providing
additional context and information at the end of a page or section.

17. <nav>
- The `<nav>` tag is used to define a section of navigation links. It helps
in grouping and organizing links that allow users to navigate through
different parts of a website or web application. It is essential for creating a
clear and intuitive navigation structure.

18. <section>

- The `<section>` tag defines a thematic grouping of content, often with


its own heading. It helps in organizing content into distinct sections,
improving readability and structure. Sections are useful for dividing content
into meaningful chunks.

19. <article>

- The `<article>` tag represents a self-contained, independent piece of


content that could be distributed or reused separately. It is ideal for blog
posts, news articles, or other standalone content. An article usually includes
a heading and can contain sections, footers, and other relevant content.

20. <aside>

- The `<aside>` tag represents content that is indirectly related to the


main content of the page. It is typically used for sidebars, pull quotes, or
supplementary information that provides additional context but is not
essential to the main content.

21. <br>

- The `<br>` tag inserts a line break within text, creating a new line
without starting a new paragraph. It is commonly used in addresses, poems,
or other content where explicit line breaks are necessary.

22. <hr>

- The `<hr>` tag inserts a horizontal rule (line) across the page, used to
separate content or indicate a thematic change. It is a block-level element
that provides a visual break or division in content.
23. <strong>

- The `<strong>` tag indicates that its content is of strong importance or


urgency. It typically displays text in bold, but its primary function is to convey
semantic meaning rather than visual style.

24. <em>

- The `<em>` tag emphasizes its content, typically rendering it in italics.


It is used to stress or highlight text, suggesting a change in tone or meaning,
rather than merely altering appearance.

25. <blockquote>

- The `<blockquote>` tag defines a block of quoted text, typically


indented from the rest of the content. It is used for longer quotes or citations
and often includes additional styling for visual differentiation.

26. <code>

- The `<code>` tag is used to display a single line of computer code or


programming syntax. It is often rendered in a monospace font to distinguish
code snippets from regular text.

27. <pre>

- The `<pre>` tag defines preformatted text, preserving both spaces and
line breaks. It is useful for displaying code, text with specific formatting, or
content where whitespace is significant.

28. <iframe>

- The `<iframe>` tag embeds another HTML document within the current
document. It allows for the inclusion of external content, such as videos,
maps, or other web pages, within the page, creating a nested browsing
context.

You might also like