That’s quite a lot of text, but it’s not as jumbled as it appears. First, ignore everything at the top of the file up to and including the <body> tag on line 11 in this example. The "header" is just information required by HTML files and not something you normally need to change.
Your text starts after the <body> tag:
You can see all the same words that are shown in Preview – the chapter name "Introduction" and several paragraphs of text. But you can also see the HTML code tags that tell readers how to display that text.
A full description of HTML is beyond this tutorial, but understanding the basics will help you edit your text.[1]
If you look at the HTML version of your file in Code View you will see lots of words like <p> or <h1>, etc. These are the HTML tags that tell eReaders what to do with your text.
For instance, the HTML code below tells the eReader that the text Chapter 8 is a level 1 Heading:
<h1>Chapter 8</h1>
The <h1> tag is the start of the text to be treated like a heading, and the </h1> tag indicates the end of the text included in the heading. This is what Sigil enters into your document when you click the
icon. Ereaders will typically make the text of a heading larger and center it on the screen.
The HTML code below tells the eReader that the text This is a paragraph is an ordinary paragraph. Since it’s a paragraph the ereader will apply a certain formatting, perhaps indenting the first line.
<p>This is a paragraph.</p>
There are many more tags in HTML. The important point to remember is that the HTML tags tell eReaders how to format and display your content. They allow you to keep your content separate from your formatting which makes it easier to change how your book looks.
HTML tags can get more fancy since they can include attributes that modify how they are interpreted. For example, here is a paragraph with some tags that define an ID used for linking as shown in the last chapter:
<p><span id="note1">This is a note</span> for linking.</p>
The span tag is used around small sections of text that need to be formatted differently or to contain information. In this case the information is that the words "This is a note" has an ID of "note1". The span tags with the ID attribute are the code that Sigil inserts when you use Insert ID.
These are just a few examples of HTML code, but they give you an idea of what the majority of HTML is all about.
What is important to remember is that in Code View you have access to both your text and the formatting codes that control the look of your book – so you can find and change them.
See the Introduction, Code View and Stylesheets chapters for more details.
Try changing some of your words (but not the HTML tags just yet), and then watch the changes in Preview.
It is essential that you edit carefully. You will need to make sure all the tags you use are valid and are opened and closed properly – if they aren’t, you will get a pink error warning in Preview and you will be unable to save your ePub until they are fixed.
To really see changing the code in action, you can open the Preview window using View→Preview (you can always close it using View→Preview or its shortcut again). You may need to make the window bigger or drag it to another part of your desktop.
You can type in Code View and Preview will be updated to show your changes after a slight delay.
Save often to have your code checked for any errors to catch them early.
[1] Many good HTML tutorial sites can be found on the Internet, W3Schools.com being one.