Web Design Stuff
HTML Tutorials    CSS Tutorials    Web Hosting   Resources
Create a Web Page 101
Making Web Pages Intro What is a Web Page? Why Make a Web Page? The History of HTML Learn HTML or XHTML?
Basic HTML
Basic HTML Tutorials Basic HTML Necessities How to Make a Web Page How to Edit a Web Page The Basics of HTML Tags Basic HTML Page Structure HTML Attributes
HTML Font Codes
HTML Font Codes Intro HTML Font Color Codes HTML Font Size Codes HTML Font Style Codes HTML Bold/Italic Codes Combining Font Codes
Formatting Text
Formatting Text Intro Making Paragraphs Miscellaneous Formatting Headings & Subheadings Creating Hyperlinks
Using Graphics
Using Graphics on the Web Add Graphics to Your Pages Graphics and Accessibility How to Align Graphics Page Color & Background Graphics as Hyperlinks Horizontal Rules
Creating Tables
HTML Tables Tutorials HTML Table Fundamentals Background & Border Color Table Frames & Rules Table Width and Alignment Cells 1 -Space & Alignment Cells 2 -Row Column Span Cells 3 -Width & Height
Making Lists
HTML Lists Tutorials Bulleted Lists Numbered Lists Definition Lists
HTML Frames
HTML Frames Tutorials Using Frames for Layout Advanced Frame Layouts Putting Hyperlinks in Frames Frame Border Width Color, Margin and Control Problems with Frames SmartFrames: A Solution SSI: An Alternative to Frames
Web Page Forms
Making Feedback Forms A Simple Feedback Form Installing NMS FormMail Debugging Your Setup My Web Host is Out to Lunch User Input Components Text Fields Checkboxes & Radio Buttons Dropdown Menus Push Buttons Layout and Presentation
Basic CSS
Basic CSS Tutorials What is CSS? Why You Should Use CSS How to Use CSS Inline Styles Embedded Style Sheets External Style Sheets Class Selectors ID Selectors Combining Selectors
CSS Properties
CSS Properties Intro Font Styles Width, Height & Spacing Borders Backgrounds Position Float & Alignment Hyperlinks
All About Web Hosting
Hosting Your Own Website What is a Web Host? Your Website's Home Page Building a Website Offline About Free Web Hosting Best Free Web Hosting Commercial Web Hosting How to Get a Domain Name Ecommerce Web Hosting Web Hosting Terminology
Free Web Design Tools
Best Free Website Tools Best Free Text Editors Best Free Graphics Editors Free Website Analysis Tools
Setting Up HTML Kit
HTML Kit Introduction How to install HTML Kit Screenshot Breakdown Basic Configuration Overall Appearance Shortcuts and Startup Editing Window Customizing Toolbars Using the Favorites Tab Making a New Actions Bar Odds and Ends
Free Templates
Free Website Templates Two Column Fixed Width Three Column Liquid Layout Miscellaneous Templates Dynamic Menu Effects Two Column Experimental Terms of Use About These Templates
Website Templates Help
Getting Started Template Zip File Download How to Edit Your Template What to Edit in the HTML How to Add Your Logo Making a Website
Web Design Tips
Web Design Basics Tables vs. Tableless Using Tables for Layout Example Table Layouts World's Crappiest Web Page
Twitter Backgrounds
Twitter Backgrounds Intro Cool Twitter Backgrounds Cool Twitter Backgrounds 2 Plain Twitter Backgrounds Dark Twitter Backgrounds Best Twitter Backgrounds Cute Twitter Backgrounds Music Twitter Backgrounds Music Twitter Backgrounds 2 Twitter Backgrounds 101 TERMS OF USE
All About Web Browsers
What is a Web Browser? Mozilla Firefox Internet Explorer Opera How to Set Up Firefox Top 5 Firefox Extensions
 
Contact
Post Some Feedback Send Me An Email Iron Spider Blog About Iron Spider... Site Conventions
 
 
 

 

Making Paragraphs

 
<p>...</p>Paragraph
<div>...</div>Generic division
<blockquote>...</blockquote>Quoted text


Block Elements


When writing up HTML source code, all line breaks created by pressing the 'Enter' key will be ignored by the web browser and will not register as line breaks on the actual web page. In order to create line breaks and hence format your visible text into paragraphs, you will use what are known as block-level or block elements. The main difference between block elements and inline elements is that the end tag of a block element forces a line break in the visible text. Some commonly used block elements are:


BLOCK ELEMENTEFFECT
p Renders text into paragraphs with a blank line in between each... (More)
divRenders text into generic division with no blank line in between each... (More)
blockquote Renders text into an indented paragraph which is typically used to indicate quoted text... (More)


These are all described in more detail below:
  • p (paragraph) ~ Creating paragraphs using HTML is accomplished by placing the text which you wish to be rendered as a paragraph in between the <p>...</p> tags. The end </p> tag terminates the first paragraph while a new start <p> tag begins a new paragraph. Example:

    Example 1A - SOURCE CODE

    <p>This is the first paragraph. In printed text, paragraphs are traditionally rendered by merely breaking the flow of text to the next line and then indenting the first line of the new paragraph. In web pages, however, a new paragraph is typically rendered by breaking the flow of text to the next line which then contains a line of 'white space'. The blank line is subsequently followed by the new paragraph whose first line appears flush with the left margin.</p><p>This is the next paragraph. Note that any line breaks created in the source code by pressing the 'Enter' key will be ignored by the web browser when it displays the web page. Creating line breaks in the visible text can only be accomplished by using one of various HTML elements. In this case, we are using the 'p' element.</p>


    Click here to view the result of Example 1A...


    When using <p>...</p> tags, the end tag may be omitted. Each <p> start tag will automatically begin a new paragraph. Example:

    Example 1B

    <p>First paragraph starts here...<p>Second paragraph starts here...<p>Third paragraph starts here...



  • div (generic division) ~ The div element differs from the p element in that the </div> end tag only breaks the flow of text to the next line. No blank line will appear between it and the succeeding text. Example:

    Example 2 - SOURCE CODE

    <div>This is the first generic division. The text will continue to flow normally until this 'div' element is terminated by the end tag.</div><div>This is the second generic division. Use the 'div' element in conjunction with CSS to achieve a much more refined control over formatting blocks of text on your web page.</div>


    Click here to view the result of Example 2...


    Note that, unlike the </p> end tag, the </div> end tag is mandatory.

    Here's a quick example of how you can use the style attribute with the div element to create a traditional paragraphing style:

    Example 3 - SOURCE CODE

    <div style="text-indent: 30px;">This uses the 'div' element in conjunction with the 'style' attribute to create a paragraph style similar to printed text paragraphing. The first line of text in this generic division is indented by a space of 30 pixels.</div>
    <div style="text-indent: 30px;">Here is the second generic division. The flow of text breaks to the next line and the first line of text is also indented by a space of 30 pixels.</div>


    Click here to view the result of Example 3...


  • blockquote ~ This element can be used to indent an entire block of text. This is typically used to indicate that the text is quoted from another source although it can also be used simply to offset the text for aesthetic reasons. To display text as such, place it within the <blockquote>...</blockquote> tags. Here's an example:

    Example 4 - SOURCE CODE

    In the official HTML 4.01 Specification, the World Wide Web Consortium (W3C) makes this distinction between block level and inline elements:<blockquote>Generally, block-level elements may contain inline elements and other block-level elements. Generally, inline elements may contain only data and other inline elements. Inherent in this structural distinction is the idea that block elements create "larger" structures than inline elements.</blockquote>


    Click here to view the result of Example 4...


Of course, there may be times when you wish to create line breaks at will without having to decide in advance which sections of text to enclose in a block element. There may also be times when you wish to prevent the line from breaking in between two words. How to accomplish both of these as well as how to align text on your web page will be covered next...





Best Free Stuff
for webmasters

Free Text Editors
Free Graphics Editors
Website Analysis Tools
Free Website Templates

See also:

Best Free Web Hosting

 

If you need a .COM web address, you can get one quick and easy at...

www.GoDaddy.com
INTRO TOP NEXT~>
 
HTML Tutorials |  CSS Tutorials |  Web Hosting |  Domain Names |  Web Design Resources
Iron Spider © Copyright 2004-2011 Robert Darrell