Curriculum
Course: HTML and CSS 101
Login

Curriculum

HTML and CSS 101

Video lesson

Headings, Paragraph, Pre & Code tags

This lesson will help you understand how to use headings, paragraph, pre and code tags in Web page.

 

Quick Hands-on

 

Lecture Slides

 

Points to Remember

  • Heading tags are used for titles and subtitles.

  • Headings are used by search engines to index the structure and content of web pages.

  • Paragraph tag ( <p> ) is used to define the paragraph.

  • Browsers automatically add margin around <p> element.

  • Default font size is 1em.

  • <p> tag takes the whole width of the screen.

  • The <pre> tag is used to define the preformatted text.

  • The text will be displayed exactly as written in the HTML source code.

  • <pre> tag takes the whole width of the screen.

  • The <code> tag is used to define a piece of computer code.

  • The width of an <code> element is determined by the content inside it.

  • By using a combination of <pre> and <code> tags we can represent code snippets from the programming language.