Learn Advanced and Basic HTML - Lesson 2

7
Learn HTML Basics Lesson No : 02 Publisher : Attitude Ac

Transcript of Learn Advanced and Basic HTML - Lesson 2

Page 1: Learn Advanced and Basic HTML - Lesson 2

Learn HTML BasicsLesson No : 02

Publisher : Attitude Academy

Page 2: Learn Advanced and Basic HTML - Lesson 2

LESSON NO :- 02HTML

Page 3: Learn Advanced and Basic HTML - Lesson 2

HTML documents are divided into paragraphs.The HTML <p> element defines a paragraph. ... Note, Browsers automatically add some white space before and after a paragraph.

HTML Paragraphs

The HTML <p> element defines a paragraph.

<!DOCTYPE html><html><head><title>Page Title</title></head> <body>

<p>This is a paragraph.</p><p>This is a paragraph.</p><p>This is a paragraph.</p>

</body></html>

Page 4: Learn Advanced and Basic HTML - Lesson 2

HTML Block ElementsBlock-level ElementsEvery HTML element has a default display value depending on what type of element it is. A Block-level element always starts on a new line and takes up the full width available (stretches out to the left and right as far as it can).

The <div> element is a block-level element.

Examples of block-level elements:• <div>• <h1> - <h6>• <p>• <form>

Page 5: Learn Advanced and Basic HTML - Lesson 2

Inline ElementsThe <span> element is an inline element that is often used as a container for some text. An inline element does not start on a new line and only takes up as much width as necessary.

Examples of inline elements: • <span>• <a>• <img>

The <span> element is a block-level element.

HTML Inline Elements

Tag Description<div> Defines a section in a document (block-level)

<span> Defines a section in a document (inline)

HTML Grouping Tags

Page 6: Learn Advanced and Basic HTML - Lesson 2

PRACTICALIMPLEMENTATION

Page 7: Learn Advanced and Basic HTML - Lesson 2

Visit Us : Attitude Academy