From the course: HTML Essential Training

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

Paragraphs and headings

Paragraphs and headings

- The majority of content on a webpage is usually text, and now that we've learned the syntax of HTML, let's look at how to create some common text-based elements, starting with paragraphs and headings. To create a paragraph element, use the <p> tag to format one or more sentences into relevant groupings. For headings, there are actually six tags. They range from <h1> to <h6> and are used to define a hierarchy. <h1> is used for the most significant heading on the page, followed by <h2> and so on. I'll use CodePen to demonstrate how these tags work and how they're displayed in the browser. All the links to the CodePen demos, course references, and extra resources can be found in the Links PDF file in your exercise files. You can follow along with the demos on your computer or just watch; whichever method works best for you. Before we get started, let's look at this editor layout. Since we'll only be writing HTML, I'll collapse the CSS and JS editor panels. Hover over the divider lines,…

Contents