Can you please inform me about the specific tag requirement that is currently not included?

I received an assignment from a website and I put in my best effort to fulfill all the specified requirements. However, I am struggling to identify where my code is going wrong. Can anyone help me with this issue?

-

  1. Your form should resemble the form in the provided Bookform image link, including all the listed constructs. Make sure to use appropriate HTML5 tags while creating your form to meet all the specifications.

  2. Ensure that autocomplete is active on your form.

  3. You are required to create two field sets - Customer Info and Books, based on the structure shown in Figure 1. For now, focus on setting up the field sets without worrying about the content fields.

  4. The Name field must have autofocus, placeholder text, and be mandatory. Select the correct type for this field and subsequent fields as well.
  5. The Telephone field should include placeholder text, pattern restrictions, and be required. The pattern format should follow [Pattern: 1-234-567-8910]
  6. The Email address field needs Placeholder text and should allow multiple entries. This field is also a required field.
  7. The Books field should incorporate a data list. You can choose the content you wish to display in this list.
  8. The Quantity field (Maximum 5) needs a minimum value of 1 and a maximum value of 5.

<html>
<head>
    <title>bookform</title>
</head>

<body>

<form autocomplete="on">
    <strong> <div style='color:darkblue'> A Simple Form </div> </strong>
<br/>
<i> <div style='color:Lightblue'> Form Fundamentals </div> </i>

 <fieldset>
  <legend>Customer Info:</legend>
 <label for="Name">Name:</label>  <input type="text" name="Name" id="Name" placeholder="Enter Your Name" autofocus required/><br/><br/>
  <label for="Telephone">Telephone:</label> <input type="text"  id="Telephone" name="Telephone" placeholder="Pattern: 1-234-567-8910" pattern="[0-9]{1}-[0-9]{3}-[0-9]{3}-[0-9]{4}" required/><br/>
 <br/><label for="Emailaddress">Email address:</label> <input type="text" name="Emailaddress" id="Emailaddress" placeholder="Enter Your Email address" multiple required/>
                  
 </fieldset>
 
 
 <fieldset>
  <legend> Books</legend>
  <input type="text" name="Books" list="countries"> <datalist id="countries">

</datalist>
 <label for="Quantity"> Quantity </label> (Maximum 5): <input type="number" name="Quantity"  id="Quantity" max="5" min="1"> <br>

 </fieldset>
 
 <br>
<input type="submit" name="submit" value="Submit">
 
</form>
</body>
</html>

ERROR:testWeb(htmlpackage.WebTestBookform): Please check specifications for each tag false

  • image

update: I encountered an error when using email as the email type, so I had to avoid using it.

Answer №1

There appears to be some coding errors within the markup, notably the absence of the <!DOCTYPE html> tag. It is advisable to run the code through a validator tool for further analysis.

Answer №2

Make a simple correction by changing

<lable ...> Quantity </lable>
to <label>. It appears to be just a typo. However, keep in mind that the datalist tag is not supported by Safari, which can lead to cross-browser compatibility issues. View datalist documentation

Additionally:

  • As per @l2aelba's comment, use a non-space value for the label for.
  • Ensure that the <form> tag has an action attribute defined.
  • If using single tags like <input> <br>, utilize SHORTTAGS: <input /> <br/>
  • Avoid using a block element within an inline-block. For instance,
    <strong><div>...</div></strong>
    is not valid.
  • Following @itacode's advice, include the <!DOCTYPE html> tag as the validator may detect an HTML 4.1 version otherwise.

Answer №3

Make sure to include "autocomplete=on" within the form tag instead of simply using autocomplete.

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

Clicking will open the link in both a new tab and the current tab

I'm looking to enable ng click functionality to work in both new tabs and the current tab. The URL is dynamically generated based on a certain condition. Here is the HTML: <a ng-href="{{myPathVariable }} " ng-click=" GoToThemes()" class="shift-l ...

Using CSS3, HTML5, and Javascript to emulate the visual and interactive design of the WP7 Metro UI

Is it possible to find examples demonstrating the recreation of typical Metro UI controls using CSS, javascript or HTML5 for Windows Phone 7? ...

Tips for fixing padding problems in mobile view mode

My grid-template-columns currently has 4 columns, but I want it to have only 1 column on mobile devices. This is my CSS setup: <div style={{ padding: 16 }}> <div className={styles.cardContainer}> {data.map((value, index) => <div ke ...

When working with Angular, the onSubmit method may sometimes encounter an error stating "get(...).value.split is not a function" specifically when dealing with Form

When the onSubmit method is called in edit, there is an error that says "get(...).value.split is not a function" in Form. // Code for Form's onSubmit() method onSubmitRecipe(f: FormGroup) { // Convert string of ingredients to string[] by ', ...

How to Resize Images in Internet Explorer and Firefox Using CSS

Having an issue with CSS formatting on Internet Explorer and Firefox. I am trying to create a navigation bar with several images displayed in a column, using a background image. I positioned the background image on the page and then created a div inside it ...

Incorporating a complex React (Typescript) component into an HTML page: A Step-by

I used to have an old website that was originally built with Vanilia Javascript. Now, I am in the process of converting it to React and encountering some issues. I am trying to render a compound React(Typescript) component on an HTML page, but unfortunatel ...

Problem with Button Functionality in Outlook Email

I am having trouble making a specific button for Outlook within my email. Due to the different sections in my EMAIL, the button got wrapped in v:rect and now it is shifting to the top of the email. Can someone assist me with this issue? Actual Image - htt ...

The CSS focus-within and hover properties are not functioning as expected

How can I make the search tags visible (the buttons above the text input field) when the search bar below them is clicked? I've tried using :hover, :focus, and :focus-within, but none of them seem to be working. Can someone help me figure out the issu ...

Ways to align div elements

I am currently in the process of developing my own custom animation player. Utilizing Three.js for object rendering has been successful so far. However, the challenge lies in incorporating control options at the bottom of the player interface (such as play ...

Struggling with implementing a grid layout using CSS

I am currently facing an issue with my code where I am attempting to set up a wrapper element as a grid. However, upon inspecting the page, I am receiving notifications that my inputs for display, grid-template-columns, and grid-template-area are considere ...

I'm struggling with creating animations for the bootstrap cards as a newbie. It seems quite complex for me. Can anyone provide guidance on how to achieve this

Explore this template for bootstrap cards here The provided link features a template for bootstrap cards with horizontal sliding animations. I attempted to incorporate only the card properties into my code but encountered issues where the cards overshadow ...

Creating a design utilizing HTML columns with a set height and the ability to scroll horizontally

For my android project, I have a requirement to display a view (WebView) that dynamically loads content. The content will consist of <div class="content-item"> tags that are added by JavaScript to <div class="content-holder"> after the page has ...

Filter posts on Blogger by unique terms

Currently, I have a code snippet designed to showcase blog posts based on tags. There is an option to modify the section that houses the loop: <b:loop values='data:post.labels' var='label'> Utilizing any of these variables: da ...

What are some successful methods for displaying extensive data lists to users in a meaningful and organized manner?

From dropdown lists to hover menus with fly-out options, there are various ways to present content on a website... I am managing a comprehensive list of U.S. military bases across the world for my website. This list includes both active and inactive bases ...

What is the process for incorporating additional attributes into htmlAttributes?

After testing the code below, I encountered an issue when attempting to include a new attribute in htmlAttributes. An error message appeared stating that this action was not allowed. @Html.EditorFor(model => model, new { htmlAttributes = new { @class = ...

Having trouble creating a fully responsive carousel using Bootstrap v4-alpha

I am interested in creating a functional carousel similar to this one: However, when I upload my images and resize the carousel for small screens, I encounter an issue where part of the old image holder appears below the images like shown here: I simply ...

Steps for adjusting the position of this div in relation to the main container

Apologies in advance for my lack of HTML skills. I am struggling with a page layout issue. I have a website at . When the window is resized, the ads div on the right side overlaps the main container. What I would like to achieve is to make this ads div re ...

How can I extract data from a swiffy animation?

Suppose I am tracking the number of mouse clicks in Flash. To do this, I have utilized the following code: import flash.events.MouseEvent; plus.addEventListener(MouseEvent.CLICK,aaa) var i:int=0; function aaa(e:MouseEvent) { i++; var a:Number ...

Is it considered good practice to utilize Vue.js for managing global shared state and implementing for loops outside of components?

Just getting started with Vue.JS and experimenting with creating two lists of books (read and unread) from a shared object in the global data state. This is my approach - working demo (works like a charm! However, I'm wondering if this is considered ...

Filtering Completed: Table Returned

Recently, I worked on a fun project where I organized JSON wine data into a table and created an object that defines various wines along with their attributes like color, taste, and body. The main objective: When clicking the red button, I want a function ...