spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / html / rendering

[next]

ASP 3.0/.NET Developer
Jupitermedia
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume
Developer News
SaaS Tool Offers Custom Database Development
Microsoft’s Automated Agent: Can We Talk?
Borland Finally Sells CodeGear

The HTML Hierarchy: Thinking Inside the Box

By 

When we think of HTML coding, we tend to think of elements ("tags") used to structure a Web page. There are elements that define the body of the page, others to define paragraphs and still others for emphasizing text. It's unusual to think about visualizing the code; our interest is usually focused on the appearance of the final product. In contrast, learning to visualize the structure of the code — seeing it the way the browser does — can actually help in the design of the page.

Part of learning Cascading Style Sheets (CSS) is understanding inheritance. That is, the relationship of a given element to its parent element and its child and sibling elements. For example, the <em> element inherits certain characteristics from the <p> element, which inherits certain characteristics from the <body> element. This schematic of inheritance can also help us to understand the HTML layout of a coded Web page. It can also help when we are referring to elements using JavaScript. If we learn this relationship at the beginning, it makes each additional step that much easier.

HTML Containers

As I said previously, when we speak of HTML, we generally talk about tags or elements, but HTML is much more than that. If we can visualize it, it can help us to understand what's happening with the content that we place on the page. For instance, if we want to create a paragraph, we would enclose the text with the paragraph elements, <p></p>. If we wanted to emphasize one of more of the words in the paragraph, we could enclose them in the text elements <strong></strong>. Then, if we wanted to create a numbered list, we would use the list item elements, <li></li>, enclosed in the list elements, <ol></ol>. All of that might be wrapped in a division element, <div></div>.

All of that makes perfect sense as far as coding the document goes but what does the actual structure look like? How does that make sense to someone learning HTML? If we could visualize it graphically it would deepen our understanding, as in the graphic below.

HTML container

Is that structured or what? This is what an HTML document looks like with basic coding; this is what the browser sees. (I didn't include the DOCTYPE statement because it's not part of the HTML container.) When you look at the page the first and last elements you see are the opening and closing <HTML> elements. They make up the "HTML container." It "contains" all of the other elements, such as text, scripts, etc. Let's take a look at what is actually happening here.

home / html / rendering

[next]



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Microsoft Article: 7.0, Microsoft's Lucky Version?
Microsoft Article: Hyper-V--The Killer Feature in Windows Server 2008
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Windows Server 2008
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES
webref The latest from WebReference.com Browse >
How to Create an Ajax Autocomplete Text Field: Part 6 · Software Engineering for Ajax · Perl Pragma Primer
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Using File Virtualization for Disaster Recovery · VoIP Security: SIP—Versatile but Vulnerable · Around the World in 80 Nodes

Created: January 06, 2006

URL: