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

html3

The document explains the use of <div> and <span> elements in HTML for styling content, where <div> is used for larger sections and <span> for smaller blocks. It also provides an overview of HTML as a markup language, detailing the structure of an HTML document, including the DOCTYPE declaration and the roles of various tags. Examples of HTML documents are included to illustrate the concepts discussed.

Uploaded by

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

html3

The document explains the use of <div> and <span> elements in HTML for styling content, where <div> is used for larger sections and <span> for smaller blocks. It also provides an overview of HTML as a markup language, detailing the structure of an HTML document, including the DOCTYPE declaration and the roles of various tags. Examples of HTML documents are included to illustrate the concepts discussed.

Uploaded by

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

Divs and Spans

These two elements are designed to work with CSS to allow you to style parts (span) or full sections of
content (div) in a unique way.
By default, <div> does nothing visually but provides a way to identify a block of content, usually via CSS
or JavaScript. It is like the <p> tag in that it is often used to logically group blocks of content.
<span>, like div, has no effect on the layout of text itself. Instead, it provides a way to logically group
smaller blocks of content, usually within <div></div>
While <div> refers to larger segments of elements, <span> designates single lines of text.

HTML is a markup language used for describing web documents (web pages).
HTML stands for Hyper Text Markup Language.
A markup language is a set of markup tags.
HTML documents are described by HTML tags.
Each HTML tags describe different content.
HTML Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>

</body>
</html>

The DOCTYPE declaration defines the document type to be HTML.

The text between <html> and </html> describes an HTML document.

The text between <head> and </head> provides information about the document.

The text between <title> and </title> provides a title for the document.

The text between<body> and </body> describes the visible page content.

The text between <h1> and </h1> describes the heading.

The text between <p> and </p> describes the paragraph.


HTML Tags

HTML tags are keywords (tag names) surrounded by angle brackets:

HTML tags come in pairs like<p>and</p>

The first tag in a pair is the start tag and the second tag is the end tag.

HTML Documents

All HTML document must start with a type declaration: <!DOCTYPE html>

The HTML document itself begins with <html> and ends with </html>

The visible part of the html document is between <body> and </body>

<!DOCTYPE html>
<html lang="en">
<body>
<h1>My First heading</h1>
<p> MY First paragraph</p>

</body>
</html>

You might also like