Using the <li> element as the primary container for a series of <li>'s within a <ul> is

For my form requirement, I am utilizing Jotforms. After downloading the code, I am currently in the process of customizing the CSS and HTML to fulfill my design needs.

Jotforms uses a set of ul , li for managing its HTML structure. However, I encountered an issue when trying to have a container inside the ul with background and padding. Research revealed that having anything inside the ul other than li's and ul's is incorrect. This resulted in an error due to not having an li child, leading me to remove the div. Now, I am adding an li which contains many more li's inside it. Here is a snippet of the code:

HTML

<form class="jotform-form" action="https://submit.jotform.me/submit/81913120509450/" method="post" enctype="multipart/form-data" name="form_81913120509450" id="81913120509450" accept-charset="utf-8">
  <input type="hidden" name="formID" value="81913120509450" />
  <div class="form-all">
<ul class="form-section page-section">
      <li class="form-line" data-type="control_text" id="id_7">
        <div id="cid_7" class="form-input-wide">
          <div id="text_7" class="form-html" data-component="text">
            <h1>
              Logo Designing
            </h1>
          </div>
        </div>
      </li>
      <li class="form-line" data-type="control_text" id="id_9">
        <div id="cid_9" class="form-input-wide">
          <div id="text_9" class="form-html" data-component="text">
            <p>The best brands own a word or phrase and a related space in consumer's minds. which become each brand's position in the marketplace.brand image and identity to instantly have meaning for consumers and differentiate it from competitor brands</p>
          </div>
        </div>
      </li>
      <li class="form-line" data-type="control_widget" id="id_10">
        <div id="cid_10" class="">
          <div style="width:100%;text-align:Left" data-component="widget-directEmbed">
            <div class="direct-embed-widgets " data-type="direct-embed" style="width:50px;height:50px">
              <div class="form_breadcrumbs_widget" id="form_breadcrumbs_widget_'10'">
                <script type="text/javascript">
                    var qidBreadcrumbs = '10';
                    var tabsCustomCssBreadcrumbs = 'numerically';
                    var navigateWithoutValidationBreadcrumbs = 'Yes';
                    var formTabsThemeBreadcrumbs = 'se-theme-maya-blue';
                    var numberTypeBreadcrumbs = 'numerically';
                </script>
                <script src="//widgets.jotform.io/breadcrumbs/min/scripts.min.js" type="text/javascript"></script>
              </div>
            </div>
          </div>
        </div>
      </li>
    </ul>
</div>
</form>

The issue arises with the commented out white-box div. Although changing it to li seems to fix it initially, it creates further problems as displayed in the editor. The console indicates that each li after the white-box class should be nested inside it, resulting in a mismatched closing tag error.

To explore this further, you can refer to the visual representations of the issue in the editor: https://i.sstatic.net/SAsnX.png and the consequences of changing it to li: https://i.sstatic.net/vMauj.png

It appears that despite aligning the closing tag with the suggested li, the content does not occupy the expected space within the editor. Moreover, the editor highlights a potential error stating "ending tag matches nothing." If anyone has insights on resolving this issue, guidance would be greatly appreciated.

Answer №1

It is considered a coding standard to have the img tag within two li tags instead of outside them. Therefore, it is recommended to remove the image from outside the li.

Your img tag should be placed like this:

<li>
   </li>     
      <img src="images/shair.jpg"/>/*Remove from here*/
<li>
 </li>  

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is preventing select2's multiselect feature from functioning properly when using a CDN?

I have implemented the following code snippet: <head> <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> <link href="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/css/select2.min.css" rel=& ...

Adjusting Font Size of Menu BarORModifying

I'm currently using WordPress to build my website. If you'd like to take a look, here is the link: I'm trying to make the font size smaller to accommodate more menu bars on the site. Any suggestions on how I can achieve this would be great ...

Can CSS rules be inserted outside of the Header section?

Question: Can CSS styles be declared outside the “HEAD” element of an “HTML” page ? While working within a CMS where access to the header tag is restricted, is there a method to include CSS rules within the <BODY> of the ...

Creating a method to emphasize specific words within a sentence using a custom list of terms

Looking for a way to highlight specific words in a sentence using TypeScript? We've got you covered! For example: sentence : "song nam person" words : ["song", "nam", "p"] We can achieve this by creating a custom pipe in typescript: song name p ...

Fascinating CSS quandary: does the transparency of a parent element impact the transparency of a child element that is absolutely positioned, but not in relation

Check out this test case: https://jsbin.com/merujogudo/1/edit?html,css,output Should the element with .test class be transparent or not? Note: The current state is as follows: In Chrome and Firefox (latest versions): transparent In IE11: opaque It wou ...

Eliminate the gaps between the columns of the table

Is there a way to eliminate the gap between the day, month, and year columns in this table? <form action='goServlet' method='POST'> <table style="width:1000px" style="text-align:center"> <tr style="text-ali ...

Is there a way to adjust the dimensions of the <audio> tag using CSS?

//I am trying to adjust the size of the audio player based on the 'height' and 'width' properties, but it doesn't seem to be working as expected. <audio autoplay controls height="100px" width="100px"> ...

The conundrum with JQuery: My script refuses to run when a variable is defined

<script> $(document).foundation( let total = 1 $("button.test").click(function(){ if ($("p.change-me").text() === "OFF") { $("p.change-me").text("ON") total = total + 1 } ...

What method can be employed to eliminate choice selection lacking any value?

Currently, I am encountering difficulties in my attempt to remove or hide the first option value from a ransack code. Would you be able to assist me in addressing this concern? Here is the HTML CODE that I am working with: <select id="q_c_0_a_0_name" ...

Transforming an interactive HTML webpage into React/JSX

Imagine a scenario where I have two files: example.html <!DOCTYPE html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta charset="u ...

Transform Unicode characters into HTML using Qt

I am facing an issue with a particular string that includes Unicode characters and special symbols. The string, for instance, looks like this: SYMBOLSU+2510\n The string contains the Unicode character U+2510 and a new line symbol \n. I have a lo ...

Posts labeled with tags are not properly paginating

I've been working on a Django application that showcases posts created through Django's admin interface. These posts include tags implemented using django-taggit () The main page (home.html) is designed to display both posts and their respective ...

Unexpected issue on AngularJS application

Encountering issues with incorporating a controller into my page - each time I add it to a DOM element, an error is thrown. Here's the structure of my HTML page: <html data-ng-app="sportsStore"> <head> <title>Sports Sto ...

What are the steps for adding information to a MySQL database with GWT, HTML, and either JDBC or Hibernate?

I have been working with GWT (Google Web Toolkit) version 2.5.1 and successfully developed a sample application to display the username and password. However, I am now facing challenges in inserting these values into a MySQL database table using JDBC or Hi ...

passing commands from a chrome extension to a content script

I want to set up a hotkey that will activate a function in my content script. The content script (main.js) is run when the page loads from my popup.js file. I've included the command in my manifest.json and I can see in the console log that it is tri ...

What is the best way to make the button cover the entire width?

I have a Vuetify card with a layout where I am rendering some dynamic Vuetify components inside the card based on checkbox selection. These components can be a divider, a spacer, toolbar, or a button. However, I'm struggling to make the buttons span t ...

What is the best way to incorporate both the left and right menus with the main content

My goal is to incorporate a left and right menu alongside a main feed in the center. However, I'm encountering an issue where the left and right menus are scrolling with the scroll bar. Ideally, I would like the main feed to scroll with the bar while ...

Golang template's nested ranges

Being fairly new to this, I could use a little assistance. I have these two structs: type School struct { ID string Name string Students []Student } type Student struct { ID string Name string } M ...

Incorporate a distinct identifier for every menu item within the Material UI TablePagination

Can a unique identifier be assigned to each menu item generated using the <TablePagination> component? I would like to add a specific ID (e.g., id="menu_item_0", id="menu_item_1" & id="menu_item_2") to the menu item ...

What is the best way to incorporate the value of a textbox into a list?

I currently have a list structured like this: <p>Please choose from the following options:</p> <script type="text/javascript"></script> <select id='pre-selected-options1' multiple='multiple'> <opt ...