Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. XHTML was an attempt by the W3C to make HTML compatible with XML parsers. In XML, anytime the parser finds a "<" it assumes that it's the beginning of a tag. XHTML was stuck unchanging for nearly a decade because the members of the W3C couldn't come to an agreement on how to move forward with the standard. After some years a new organization formed named WHATWG which picked up where the W3C left off and they decided to scrap XHTML and continue with HTML, moving it up to version 5. These days, the HTML 5 standard is a joint effort between the W3C and the WHATWG. They don't always agree on things, but we keep moving forward anyway. HTML 5 is referred to as a "living standard" which means that there won't be an HTML 6, they will just keep adding new features to HTML 5 as time progresses.
  2. XHTML is actually an old and outdated standard, I would not suggest sticking with it. If you really want your document to be XHTML compliant, here's a list of things that need to be fixed: All tags must either have a closing tag (<img></img>) or be self-closed (<img />) The charset attribute does not exist in XHTML, you have to get rid of it, you must use the content attribute in the meta tag. Inline elements such as <img> cannot be a direct child of the <body> You cannot have any angle brackets "<" ">" in your code unless they're part of a tag. To use angle brackets as content you have to use the entities that represent them, &lt; and &gt;. I highly suggest forgetting about XHTML, it is not good.
  3. Your document is not XHTML, it's HTML 5, so the XHTML validator is going to find problems with it and XML parsers will as well. Save it with a .html extension rather than .xhtml so that the browser doesn't try to use the XML parser on it.
  4. You have to wrap the attribute value in quotes, otherwise the content after the space is treated as a different attribute.
  5. If you want a paragraph to be focusable, you'll have to give it a tabindex attribute with a non-negative value.
  6. The W3Schools description of the <input type="image"> field is incorrect. While it can be used as a submit button that's a very old way of achieving the task. The main purpose of the image field is to send the XY coordinates of the image pixel that was clicked to the server, so it adds additional data to the form's request. The best way to have an image as a submit button is to use <button type="submit"> and either put an image inside of it or use CSS to set its background image. <button type="submit"><img src="#" alt=""></button>
  7. Certain elements in queries can't have placeholders, like the LIMIT clause. I haven't tested, but it's probable that ALTER can't have placeholders either since MySQL needs to know the table structure when preparing queries because it uses the data types of the fields to determine how to sanitize the data. If you find yourself having to give the user the ability to alter tables then your database structure may be badly designed. If it is important that you alter tables with variables in the query, you can just put the variables into the SQL string itself, making sure to have carefully sanitized them beforehand.
  8. Your function definition needs an argument named "event" in order to work.
  9. That is just an example, you should actually read the paragraphs on the page which describe the mail function to understand how it works. Pass your form data into the arguments of the mail() function.
  10. I would guess that your book explains how to send mail in a later chapter, but if your book does not have it, you can find the mail function in the W3Schools reference https://www.w3schools.com/php7/func_mail_mail.asp
  11. I see what you're trying to do and it is not going to work. You cannot save the content of the edited page, all you can do is save the original source code of the page you wrote. If you want to save the edited page, you will have to get Javascript to get the page's innerHTML and download it as a file, you can follow the approach given here: https://stackoverflow.com/questions/3665115/create-a-file-in-memory-for-user-to-download-not-through-server You cannot decide where the file will be downloaded to, so remove all of those prompt() dialogs, the user will decide where the file goes.
  12. You forgot to close the quotation marks here: type="text name="name"
  13. We don't need forums for all these things, all Javascript related questions go in the Javascript forum, all CSS related questions go in the CSS forum. W3.CSS and Bootstrap are just CSS. jQuery, Angular JS, JSON, AJAX and W3.JS are all just Javascript. We don't get nearly enough threads to warrant having forums for such specific topics.
  14. The href attribute should point to a file. You don't need the ="" after "download" unless you want to save the file with a different name than its real name. This might not work on the computer's local filesystem due to security restrictions in some browsers because of the same-origin policy which usually excludes the local filesystem.
  15. HTML 5 has the download attribute, see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#Attributes
  16. You basically cannot. The international organization IANA controls all top level domains. Here is a list of all permitted top level domains: https://www.iana.org/domains/root/db
  17. I'm not sure what an audio icon is. You should go through the HTML and CSS tutorials on W3Schools and relearn it all.
  18. You will need to user a server-side programming language to send the mail. HTML and CSS cannot do it.
  19. The solution I provided is not directly related to the overflow property, but setting overflow does solve it. It's just a side-effect of the overflow property on elements with variable height. If you want to learn more about the real problem, you should research "collapsing margins" rather than the overflow property.
  20. It's just a case of collapsing margins, you would be able to see this if you used the browser's development tools to inspect the element and its children. This would be easier if you were using classes instead of IDs so that you could reuse them. A quick solution to your problem is to add overflow: auto to #Row3
  21. Set the type attribute of the button: <button type="button"> so that it won't try to submit the form.
  22. I'd keep away from Microsoft products.
  23. According to the PHP manual for createFromFormat() This means that the value contained in $monthNum is not valid and the function has returned a boolean instead of a DateTime object.
  24. I generally prefer to support the least common denominator to give the users of my website the best experience regardless of which browser they're using.
×
×
  • Create New...