As Felipe Alsacreations has already said, the first option is fine.
If you want to ensure that nothing below the list is interpreted as belonging to the heading, that’s exactly what the HTML5 sectioning content elements are for. So, for instance you could do
<h2>About Fruits</h2> <section> <h3>Fruits I Like:</h3> <ul> <li>Apples</li> <li>Bananas</li> <li>Oranges</li> </ul> </section> <!-- anything here is part of the "About Fruits" section but does not belong to the "Fruits I Like" section. -->
Related Posts:
- Proper way to make HTML nested list?
- Getting rid of bullet points from
- How do I set vertical space between list items?
- HTML list-style-type dash
- Removing ul indentation with CSS
- How to center an unordered list?
- how do I get the bullet points of a
- to center with the text?
- Half circle with CSS (border, outline only)
- Unblur content inside blurring background div
- What character encoding is >?
- Setting table column width
- What is difference between png8 and png24
- How to center an iframe horizontally?
- How can I set the default value for an HTML
- the use of `%3F` in URL
- Tab space instead of multiple non-breaking spaces (“nbsp”)?
- My website doesn’t work in I.E. (but does in chrome and firefox)
- Onclick javascript to make browser go back to previous page?
- Best way to encode Degree Celsius symbol into web page?
- How to place a text next to the picture?
- How do you create a hidden div that doesn’t create a line break or horizontal space?
- Is it possible to get a list of files under a directory of a website? How?
- AngularJS ngClass conditional
- How to darken a background using CSS?
- How to solve PHP error ‘Notice: Array to string conversion in…’
- Hiding a button in Javascript
- How to display and hide a div with CSS?
- Draw a line in a div
- Get HTML code using JavaScript with a URL
- Change Color of Fonts in DIV (CSS)
- Why is “cursor:pointer” effect in CSS not working
- a href link for entire div in HTML/CSS
- How to read if a checkbox is checked in PHP?
- Definition of ui-sref in Angular.js?
- mailto using javascript
- Complete list of reasons why a css file might not be working
- How to submit a form with JavaScript by clicking a link?
- Brackets – Live Preview not working
- CSS set li indent
- Why does this CSS margin-top style not work?
- How to do auto-width with HTML IFrame
- Bootstrap throws Uncaught Error: Bootstrap’s JavaScript requires jQuery
- How can I make my footer center to the bottom of the page?
- “AutoComplete=Off” not working on Google Chrome Browser
- Why would max-width not work on this?
- Binding select element to object in Angular
- Dynamic height of div with css
- Why write script type=”text/javascript” when the mime type is set by the server?
- RegEx match open tags except XHTML self-contained tags
- How to make a div 100% height of the browser window
- Why doesn’t min-height not work on my page?
- Difference between href and data-href in anchor tag in html
- button vs. input type=”button” /. Which to use?
- HTML: How to center align a form
- Can an HTML element have multiple ids?
- How can I change the Bootstrap default font family using font from Google?
- Add stroke around text – on the outside – with css?
- Full Page < iframe >
- Change cursor to hand when mouse goes over a row in table
- CSS table td width – fixed, not flexible
- Check if a div exists with jquery
- Favicon not working
- CSS max-height not working
- Horizontal list items
- How to make Bootstrap Panel body with fixed height
- word-wrap break-word does not work in this example
- Change navbar text color Bootstrap
- Tooltip on image
- Create a slanted edge to a div [duplicate]
- Override USER AGENT STYLE SHEET – Chrome
- aking a flex item float right
- wp_editor adds HTML entities to the content
- How to escape html code with html allowed
- How to Embed HTML files directly into WordPress
- Thumbnail + Excerpt = loss in word count
- How do you get words to show up at the bottom instead of beside a left-aligned photo? [closed]
- Migrating content from an old solution. How to easily change hardcoded hyperlinks in legacy content
- Embed tag length issues
- How put links in wordpress dynamic sidebar?
- How to add a class to the element?
- WordPress editor not creating tags properly in tables
- How do I make HTML output work when using the customizer?
- Custom posts with certain html [closed]
- What doctype is considered best practice to use for WordPress?
- Using custom HTML tags to WordPress [closed]
- Remove tags from wordpress head
- render html no formatting
- hyphenation not working in Gutenberg editor
- product description text displays above website when in shop page [closed]
- All wordpress site went white blank screen
- Why is WordPress swapping double quotes (“) to curly quotes (“) and how do I stop it from happening?
- Display GIF as Facebook link thumbnail
- Change rel=”noopener noreferrer” to rel=’noopener noreferrer’ (single quote)
- How to add an ID to an existing HTML element?
- Open popup automatically when navigate to the page id
- Displaying html table on post content
- What are the WordPress’ pre-formatted html components?
- can’t update plugins or wordpress or install new plugins [duplicate]
- How can I add a google play badge to my header and footer?
- Post title appears twice in browser title bar