I'm still learning Sigil, and I don't know HTML or CSS.
Here are the steps that I use to assign <h1> class to all chapters. Please note the key secret--
you don't need to fix the closing HTML. Sigil will find your opening mark-up code, and automatically re-assign the correct closing code!!!!
- Work in Code View.
- Open the Find/Replace Dialog box.
- Under the Replace Field, there is a Selection down arrow for "This File" or "All HTML Files." Choose "All HTML Files."
- For the "Up Down All" radio buttons, select "All"
- Select "case sensitive"
- Scroll down the document until you find a Chapter.
- Carefully select the existing mark-up BEFORE "chapter" as well as the word "chapter."
- Paste into the Find field of the Find/Replace Dialog box, and then paste into the Replace Field also.
- In the Replace Field, change the mark-up to <h1>. Leave the word Chapter in place. You may want to press the space bar one time at the end of the word Chapter.
- Click "Find Next." Don't replace anything yet. Make sure you can bounce from Chapter to Chapter using your search text. You may need to tinker with the Find selection to narrow it down. Visually Check the closing code on the chapter, to make sure it does not run into the following text.
- If your selection text is valid, you can start Replacing. Don't choose "Replace All," just replace one at a time. If it seems to be clean, select "Replace All."
- Make note of the number of replacements.
- THIS IS IMPORTANT. Switch from Code View to Split View, or Page View. This will trigger the validation function of Sigil. Wherever you changed the opening code to <h1>, Sigil will fix the closing code to </h1>.
- Check your TOC.