Comfortable White Casual Women Insta Non Sandals Men Slip Sandals Soft Slippers amp; PqnHEO

Why indent your code? Nbpu Side Ankle Peep Cambridge Blush Chunky Wedge Bootie Cutout Women's Platform Toe Select qTWzIw7

Let's look at some examples of coding techniques to make it clear why you should indent your HTML.

Wrong method 1: Everything on one line Nbpu Side Ankle Peep Cambridge Blush Chunky Wedge Bootie Cutout Women's Platform Toe Select qTWzIw7

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.p>

Problems:

  • Hard to figure out where code ends & text/content begins
  • Hard to see where the

    is, even with wrapping turned on

Wrong method 2: 3 lines, but no indentation Nbpu Side Ankle Peep Cambridge Blush Chunky Wedge Bootie Cutout Women's Platform Toe Select qTWzIw7Toe Closed Outdoors Memory Trying To Domestic Get White Indoor Away Shoes Frog House YESEG Foam Slippers wU1qRfnx

<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation 
ullamco laboris nisi ut aliquip ex ea commodo consequat.
p>

OR

<p> 
<Comfortable Soft Sandals amp; Casual Sandals Women Non Men Slippers Insta White Slip a href="http://en.wikipedia.org/wiki/H._P._Lovecraft">H. P. Lovecrafta> 
p>

Problem: Because everything is at left margin, hard to differentiate code & text/content

Best method: indent text/content Nbpu Side Ankle Peep Cambridge Blush Chunky Wedge Bootie Cutout Women's Platform Toe Select qTWzIw7

<p> 
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
    incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
    exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
Sandals Comfortable Slip Slippers amp; Sandals Insta Soft Men White Casual Women Non p>

Advantages:

  • Start (

    ) & end (

    ) are at same level, so it's easy to see that you've closed code & also see where code starts & ends
  • Easy to differentiate between code & text/content

Examples of code indentation Nbpu Side Ankle Peep Cambridge Blush Chunky Wedge Bootie Cutout Women's Platform Toe Select qTWzIw7

Here are some examples of how WebSanity likes to indent our code.

Block-level elements Nbpu Side Ankle Peep Cambridge Blush Chunky Wedge Bootie Cutout Women's Platform Toe Select qTWzIw7

<p> 
    Lorem ipsum. 
p>
<p> 
    Lorem ipsum 
    <br>Dolor sit amet 
p>
<blockquote> 
    <p> 
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt
        ut labore et dolore magna aliqua. 
    p> 
blockquote>

Note: Notice how text/content is indented inside

, and then

is indented inside White Men amp; Insta Sandals Sandals Slip Non Casual Slippers Comfortable Soft Women

. This is called nesting. See how easy it is to tell what's a child of what?

<table> 
    <tr> 
        <td> 
            Lorem ipsum dolor sit amet 
        td> 
        <td> 
            Consectetur adipisicing 
        td> 
    tr> 
    <tr> 
        <td> 
            Lorem ipsum dolor sit amet 
        Soft Comfortable Men Slip amp; Women Slippers White Insta Casual Sandals Non Sandals Sandals Non White amp; Slippers Women Sandals Slip Soft Insta Casual Men Comfortable td> 
        <Women Sandals Men Insta Soft Slippers Sandals Casual amp; Comfortable Non Slip White td> 
            Consectetur adipisicing 
        td> 
    tr> 
table>

Note: Again with the multiple levels of indenting—but it should be obvious how much it helps reading that code!

Exceptions Nbpu Side Ankle Peep Cambridge Blush Chunky Wedge Bootie Cutout Women's Platform Toe Select qTWzIw7

<h1>Title of the pageh1>

Note: We don't indent

& other headers because they're short, but if you want to indent , that would be fine.

<head><title>Document titletitle>
head>

Note: Again, we don't indent </code> & most other items inside <head> because they're short. </p> </blockquote> <pre><code class="html hljs "><span class="hljs-tag"><<span class="hljs-title">ul</span>></span> <span class="hljs-tag"><<span class="hljs-title">li</span>></span>Lorem<span class="hljs-tag"></<span class="hljs-title">li</span>></span> <span class="hljs-tag"><<span class="hljs-title">li</span>></span>Ipsum<span class="hljs-tag"></<span class="hljs-title">li</span>></span> <span class="hljs-tag"><<span class="hljs-title">li</span>></span>Dolor<span class="hljs-tag"></<span class="hljs-title">li</span>></span> <span class="hljs-tag"></<span class="hljs-title">ul</span>></span></code></pre> <blockquote> <p> Note: We don't indent <code><li></code> because most of the time the contents are short, because we're more concerned about the <code><ul></code> & <code></ul></code>, & because it can really lengthen the overall code. That said, if you want to indent <code><li></code>, feel free. </p> </blockquote> <h2 id="inline-examples"> Inline elements <a href="http://www.laowhining.com/Nbpu_Side_Ankle_Peep_Cambridge_Blush_Chunky_Wedge_Bootie_Cutout_Women's_Platform_Toe_Select_qTWzIw7-oveev/13.html" title="Nbpu Side Ankle Peep Cambridge Blush Chunky Wedge Bootie Cutout Women's Platform Toe Select qTWzIw7">Nbpu Side Ankle Peep Cambridge Blush Chunky Wedge Bootie Cutout Women's Platform Toe Select qTWzIw7</a></h2> <p> You never indent inline elements. Treat them like text/content. Examples: </p> <pre><code class="html hljs "><span class="hljs-tag"><<span class="hljs-title">p</span>></span> Lorem ipsum <span class="hljs-tag"><<span class="hljs-title">strong</span>></span>dolor sit amet<span class="hljs-tag"></<span class="hljs-title"><big>Insta White amp; Men Sandals Non Soft Slippers Comfortable Women Slip Sandals Casual</big> strong</span>></span>, consectetur adipisicing elit, sed do <span class="hljs-tag"><<span class="hljs-title">em</span>></span>eiusmod tempor<span class="hljs-tag"></<span class="hljs-title">em</span>></span> incididunt ut labore et <span class="hljs-tag"><<span class="hljs-title">code</span>></span>dolore magna aliqua<span class="hljs-tag"></<span class="hljs-title">code</span>></span>. Ut enim ad minim veniam, <span class="hljs-tag"><<span class="hljs-title">font</span> <span class="hljs-attribute">size</span>=<span class="hljs-value">"5"</span>></span>quis nostrud<span class="hljs-tag"></<span class="hljs-title">font</span>></span> exercitation ullamco <span class="hljs-tag"><<span class="hljs-title">a</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">"http://www.demonoid.me"</span>></span>laboris nisi ut aliquip<span class="hljs-tag"></<span class="hljs-title">a</span>></span> ex ea commodo consequat. <span class="hljs-tag"></<span class="hljs-title">p</span>></span></code></pre> <pre><code class="html hljs "><span class="hljs-tag"><<span class="hljs-title"><strong>Non Insta amp; Soft Sandals Comfortable Slippers Sandals Men Women Slip White Casual</strong> blockquote</span>></span> <span class="hljs-tag"><<span class="hljs-title">p</span>></span> Lorem ipsum dolor sit amet, <span class="hljs-tag"><<span class="hljs-title">a</span> <span class="hljs-attribute">href</span>=<span class="hljs-value">"http://www.avclub.com"</span>></span>consectetur adipisicing elit<span class="hljs-tag"></<span class="hljs-title">a</span><a href="http://www.laowhining.com/Boot_Heel_Bootie_Stylish_Womens_On_Black_Slip_Cute_Su_Cowboy_Shoes_Pointed_Low_r_Zip_MVE_Western_Ankle_nPqYCf6xWw-mwwqc/2.html" title="Boot Heel Bootie Stylish Womens On Black Slip Cute Su Cowboy Shoes Pointed Low r Zip MVE Western Ankle nPqYCf6xWw">Boot Heel Bootie Stylish Womens On Black Slip Cute Su Cowboy Shoes Pointed Low r Zip MVE Western Ankle nPqYCf6xWw</a>></span>, sed do <span class="hljs-tag"><<span class="hljs-title">strong</span>></span>eiusmod tempor<span class="hljs-tag"></<span class="hljs-title">strong</span>></span> incididunt ut labore et <span class="hljs-tag"><<span class="hljs-title">em</span>></span>dolore<span class="hljs-tag"></<span class="hljs-title">em</span>></span> magna aliqua. <span class="hljs-tag"></<span class="hljs-title">p</span>></span> <span class="hljs-tag"></<span class="hljs-title">blockquote</span>></span></code></pre> <h2 id="what-about-the-basic-structure"> What about the basic structure of a webpage? <a href="http://www.laowhining.com/Nbpu_Side_Ankle_Peep_Cambridge_Blush_Chunky_Wedge_Bootie_Cutout_Women's_Platform_Toe_Select_qTWzIw7-oveev/13.html" title="Nbpu Side Ankle Peep Cambridge Blush Chunky Wedge Bootie Cutout Women's Platform Toe Select qTWzIw7">Nbpu Side Ankle Peep Cambridge Blush Chunky Wedge Bootie Cutout Women's Platform Toe Select qTWzIw7</a></h2> <p> Look at the following code. You'd think that <code><head></code> & <code><big>Non Insta Sandals amp; Casual Comfortable Men Sandals Women Soft White Slip Slippers</big> <body></code> would be indented inside <code><html></code>—after all, they're children of <code><head></code>, so shouldn't they be indented? </p> <pre><code class="html hljs "><span class="hljs-tag"><<span class="hljs-title">html</span>></span> <span class="hljs-tag"><<span class="hljs-title">head</span>></span> <span class="hljs-tag"><<span class="hljs-title">title</span>></span>Document title<span class="hljs-tag"></<span class="hljs-title">title</span>></span> <span class="hljs-tag"></<span class="hljs-title">head</span>></span> <span class="hljs-tag"><<span class="hljs-title"><strong>Soft Slippers amp; Comfortable Men Non Slip Women White Sandals Insta Sandals Casual</strong> body</span>></span> <span class="hljs-tag"><<span class="hljs-title">h1</span>></span>Page title<span class="hljs-tag"></<span class="hljs-title">h1</span>></span> <span class="hljs-tag"><<span class="hljs-title">p</span>></span> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt <span class="hljs-tag"></<span class="hljs-title">p</span>></span> <span class="hljs-tag"></<span class="hljs-title">body</span>></span> <span class="hljs-tag"></<span class="hljs-title">html</span>></span></code></pre> <p> So why aren't <code><head></code> & <code><body></code> indented? A couple of reasons: </p> <ul> <li>You know that <code><head></code> & <code><body></code> are the children of <code><html></code>; in fact, they're <em>always</em> the <em>only</em> children of <code><html></code>, so there's no need to remind yourself of this via nesting</li> <li>You save yourself one level on indentation; when you start nesting HTML inside HTML inside HTML inside HTML, this can add up</li> </ul> </div> <h2 id="your-text-editor">Your text editor should make it easy to indent your code<a href="http://www.laowhining.com/Nbpu_Side_Ankle_Peep_Cambridge_Blush_Chunky_Wedge_Bootie_Cutout_Women's_Platform_Toe_Select_qTWzIw7-oveev/13.html" title="Nbpu Side Ankle Peep Cambridge Blush Chunky Wedge Bootie Cutout Women's Platform Toe Select qTWzIw7">Nbpu Side Ankle Peep Cambridge Blush Chunky Wedge Bootie Cutout Women's Platform Toe Select qTWzIw7</a></h2><a href="http://www.laowhining.com/Always_Feet_and_Pretty_Pink_Plush_Womens_Mens_Cat_Slipper_Winter_Soft_Paws_Happy_Lovely_Indoor_Slippers_xrPwOqCxd-laacw/9.html" title="Always Feet and Pretty Pink Plush Womens Mens Cat Slipper Winter Soft Paws Happy Lovely Indoor Slippers xrPwOqCxd">Always Feet and Pretty Pink Plush Womens Mens Cat Slipper Winter Soft Paws Happy Lovely Indoor Slippers xrPwOqCxd</a> <p>You could press tab or the space bar every single time you want to indent your code, but you shouldn't have to do that. Fortunately, good text editors help you out when it comes to indenting.</p> <h3 id="auto-indent">Auto-indent<a href="http://www.laowhining.com/Nbpu_Side_Ankle_Peep_Cambridge_Blush_Chunky_Wedge_Bootie_Cutout_Women's_Platform_Toe_Select_qTWzIw7-oveev/13.html" title="Nbpu Side Ankle Peep Cambridge Blush Chunky Wedge Bootie Cutout Women's Platform Toe Select qTWzIw7">Nbpu Side Ankle Peep Cambridge Blush Chunky Wedge Bootie Cutout Women's Platform Toe Select qTWzIw7</a></h3> <p>BBEdit, for instance, has a setting in its Preferences for "Auto-indent", which it defines as follows: "When this option is selected, pressing the Return key in new windows automatically inserts spaces or tabs to indent the new line to the same level as the previous line."</p> <p>Any good text editor should have a setting like this somewhere. The trick is finding it in the editor's Preferences or Options.</p> <h3 id="spaces-or-tabs-spaces">Spaces or tabs? (Spaces!)<a href="http://www.laowhining.com/Nbpu_Side_Ankle_Peep_Cambridge_Blush_Chunky_Wedge_Bootie_Cutout_Women's_Platform_Toe_Select_qTWzIw7-oveev/13.html" title="Nbpu Side Ankle Peep Cambridge Blush Chunky Wedge Bootie Cutout Women's Platform Toe Select qTWzIw7">Nbpu Side Ankle Peep Cambridge Blush Chunky Wedge Bootie Cutout Women's Platform Toe Select qTWzIw7</a></h3> <p>Should you use spaces or tabs for indenting? A debate has raged on this topic for decades, with different developers insisting that theirs is the right choice. WebSanity uses spaces, for various reasons, so that is the right choice, clearly.</p> <p>Your text editor should let you choose what gets inserted when you press the TAB key: a tab or spaces. Different text editors call that setting different things. Here are a few examples:</p> <ul> <li><strong>BBEdit</strong>: Preferences > Editor Defaults > Auto-expand tabs</li> <li><strong>Komodo Edit</strong>: Options/Preferences > Editor > Indentation > Prefer Tab characters over spaces</li> <li><strong>Notepad++</strong>: Preferences > Language Menu/Tab Settings > Replace by space</li> </ul> <p class="note">Note: If anyone knows of any others that I should add, let me know.</p><a href="http://www.laowhining.com/Heel_Western_Low_Solid_Toe_Womens_Chunky_Shoes_WuyiMC_Closed_Textured_Ankle_Zipper_Beige_Booties_Pointed_08vWxYzn-pbbxb/15.html" title="Heel Western Low Solid Toe Womens Chunky Shoes WuyiMC Closed Textured Ankle Zipper Beige Booties Pointed 08vWxYzn">Heel Western Low Solid Toe Womens Chunky Shoes WuyiMC Closed Textured Ankle Zipper Beige Booties Pointed 08vWxYzn</a> <h3 id="how-many-spaces">How many spaces?<a href="http://www.laowhining.com/Nbpu_Side_Ankle_Peep_Cambridge_Blush_Chunky_Wedge_Bootie_Cutout_Women's_Platform_Toe_Select_qTWzIw7-oveev/13.html" title="Nbpu Side Ankle Peep Cambridge Blush Chunky Wedge Bootie Cutout Women's Platform Toe Select qTWzIw7">Nbpu Side Ankle Peep Cambridge Blush Chunky Wedge Bootie Cutout Women's Platform Toe Select qTWzIw7</a></h3> <p>The next question is, how many spaces get inserted when you press TAB? Basically, people either choose 2, 4, or 8 spaces. In WebSanity's opinion, 8 is far too many, 4 is acceptable but a bit too large, & 2 is just right. With 2, you can see the indentation, but lots of nesting doesn't push your code out to ridiculous lengths, as you can see in the following:</p> <p>Your text editor should let you choose how many spaces get inserted when you press TAB. Different text editors set that in different ways. Here are some examples:</p> <ul> <li><strong>BBEdit</strong>: Preferences > Editor Defaults > Tab width</li> <li><strong>Komodo Edit</strong>: Options/Preferences > Editor > Indentation > Number of spaces per indent</li> <li><strong>Notepad++</strong>: Preferences > Language Menu/Tab Settings > Tab size</li> </ul> <p class="note">Note: Again, if anyone knows of any others that I should add, let me know.</p> <h3 id="indenting-several-lines-at-once">Indenting several lines at once<a href="http://www.laowhining.com/Nbpu_Side_Ankle_Peep_Cambridge_Blush_Chunky_Wedge_Bootie_Cutout_Women's_Platform_Toe_Select_qTWzIw7-oveev/13.html" title="Nbpu Side Ankle Peep Cambridge Blush Chunky Wedge Bootie Cutout Women's Platform Toe Select qTWzIw7">Nbpu Side Ankle Peep Cambridge Blush Chunky Wedge Bootie Cutout Women's Platform Toe Select qTWzIw7</a></h3> <p>What if you want to indent more than one line of code? Like 5? Or 25? You could manually move the cursor to the start of each line and press TAB the requisite number of times, but that would quickly grow tedious.</p> <p>Fortunately, every good text editor lets you select all the lines you wish to indent and then indent them all as a group. This is a fantastic time saver!</p> <p>Here's how various text editors enable you to indent lines at a group:</p> <ul> <li><strong>BBEdit</strong>: Highlight the lines & press TAB. To backdent the lines, press Shift-TAB.</li> <li><strong>Komodo Edit</strong>: Highlight the lines & press TAB. To backdent the lines, press Shift-TAB.</li> <li><strong>Notepad++</strong>: Highlight the lines & press TAB. To backdent the lines, press Shift-TAB.</li> </ul> </main> </div> <footer> <div class="container"> <div class="row"> <div class="col-sm-4"> <div id="HTMLBlock3787" class="HTMLBlock"> <div class="footer-col-1"> <h3>Contact</h3> <div id="home" class="vcard"> <table> <tbody> <tr> <td class="f">Email</td> <td class="v"><a class="email" href="mailto:scott@granneman.com">scott@granneman.com</a></td> </tr> <tr class="tel"> <td class="f type">Voice</td> <td class="v value"><a href="tel:1-314-780-0489">314-780-0489</a></td> </tr> <tr> <td class="f">Address</td> <td class="v"> <div class="adr"> <div class="street-address"> 39 Summit Place </div> <span class="locality">St. Louis</span>, <span class="region">MO</span> <span class="postal-code"><em>Slip Non White Sandals Comfortable Soft Sandals Women Casual Insta Slippers amp; Men</em> 63119</span><a href="http://www.laowhining.com/Black_Revitalign_Breezy_Black_Black_Slipper_Cherry_Breezy_Revitalign_Slipper_Revitalign_Breezy_Slipper_Cherry_6046Fq-gyby/15.html" title="Black Revitalign Breezy Black Black Slipper Cherry Breezy Revitalign Slipper Revitalign Breezy Slipper Cherry 6046Fq">Black Revitalign Breezy Black Black Slipper Cherry Breezy Revitalign Slipper Revitalign Breezy Slipper Cherry 6046Fq</a> <div class="country-name"> United States </div> </div> </td> </tr> </tbody> </table> </div> <h3>Work</h3> <p> For work info, see <a href="/com">WebSanity</a>. </p> </div> </div> </div> <div class="col-sm-4"> <div id="HTMLBlock2299" class="HTMLBlock"> <p>All content, unless <a href="/presentations/creative-commons-license/">under a Creative Commons license,</a> is © 1997-2018 Scott Granneman.</p> <p>(Take a look around—a lot of content is licensed <a href="/presentations/creative-commons-license/">under a Creative Commons license,</a> which gives YOU a lot of freedom to reuse my work.)</p> </div> </div> <div class="col-sm-4"> <div id="HTMLBlock3788" class="HTMLBlock"> <ul class="list-unstyled social-media-icons"> <li><a href="/scottgranneman"><i class="fa fa-facebook-official"></i></a></li> <li><a href="/scottgranneman"><i class="fa fa-twitter"><strong>Insta Non Slip Soft White Casual Sandals Women Comfortable Sandals Men Slippers amp;</strong> </i></a></li> <li><a href="/profile"><i class="fa fa-linkedin"></i></a></li> <li><a href="http://www.laowhining.com/Hill_Mountain_45200_6"_Explorer_Boots_Sole_Side_Vibram_Hiking_GTX_USA_Waterproof_Outdoor_and_Leather_Traction_Combat_Gore_Made_Braking_Boot_Brown_Downhill_Danner_Women's_In_TEX_Boot_5qTwnWECzg-difcf/17.html" title="Hill Mountain 45200 6" Explorer Boots Sole Side Vibram Hiking GTX USA Waterproof Outdoor and Leather Traction Combat Gore Made Braking Boot Brown Downhill Danner Women's In TEX Boot 5qTwnWECzg">Hill Mountain 45200 6" Explorer Boots Sole Side Vibram Hiking GTX USA Waterproof Outdoor and Leather Traction Combat Gore Made Braking Boot Brown Downhill Danner Women's In TEX Boot 5qTwnWECzg</a></li> <li><a href="/user"><i class="fa fa-youtube-play"></i></a></li> <li><a href="/user"><i class="fa fa-lastfm"></i><a href="http://www.laowhining.com/Women's_Marino_Rainboot_Urban_Igor_PVC_Xqw4faa-gybh/15.html" title="Women's Marino Rainboot Urban Igor PVC Xqw4faa">Women's Marino Rainboot Urban Igor PVC Xqw4faa</a></a></li> </ul> </div> </div> </div> </div> </footer> <a href="http://www.laowhining.com/Red_White_Striped_Spinnaker_Women's_Oxford_Sebago_Uwnq7tx-exmi/14.html" title="Red White Striped Spinnaker Women's Oxford Sebago Uwnq7tx">Red White Striped Spinnaker Women's Oxford Sebago Uwnq7tx</a> <div> <ul> <li><span>Material: Made with a Fabric upper and durable EVA sole.</span></li> <li><span>Gender and Size: Adults (US 6-15)</span></li> <li><span>Feature:These sandals are made with top quality construction and designed to last through frequent wear.</span></li> <li><span>Anti-slip Sole Design: Bulged stripe and concave-convex design help draw fashion outline of outsole, increase the friction between feet and sole to keep your foot safety without.</span></li> <li><span>Widely Occasion: Perfect for all season, Indoor bedroom, Bathroom, Living room, Spa, Gym, Swimming pool, Beach, Holiday, Leisure, public showers, steam rooms, dorms, camps, pools, locker rooms.</span></li> </ul> </div> <div> <embed src="http://www.youtube.com/v/xfTqx22ox99?version=3&autohide=1" /> </div> </body> </html>