W3C validation - end tag for "meta" omitted, but OMITTAG NO was specified - w3c-validation

I am getting an error as shown below
Error Line 6, Column 467: end tag for "meta" omitted, but OMITTAG NO was specified
…ta,Manufacturing_Industrial,Educational_Training,Teacher,Engineering_Projects">
✉
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
How can I solve this ?
Please see the source code of the page below
<!doctype html>
<html>
<head>
<title>Jobslamp-free online resume creation and sharing,fresher jobs,experienced jobs,India jobs,Kerala jobs</title>
<meta name="keywords" content="Karnataka,Bangalore_Rural,Healthcare,Office_Assistant,Kerala,Ernakulam,IT_Hardware_Networking,Engineer,Sales___Marketing,Executive,Maharashtra,Mumbai_City,Retailing,Manager,Kollam,CRM_CallCentres_BPO_ITES_Med.Trans,Customer_Care,Hotel_Travel_Tourism_Airlines_Hospitality,Front_Office_Staff,Andhra_Pradesh,Hyderabad,IT_Software,Java_Developer,Pathanamthitta,Manufacturing_Industrial,Educational_Training,Teacher,Engineering_Projects">
<meta name="description" content="The best job oriented resume sharing system. Create and Publish your online resumes for FREE. Search and apply your dream jobs for FREE. Post your jobs for FREE.">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
Thanks in advance

The error message points out the solution: replace the ending > with />.
<meta name="keywords" content="all your keywords" />
You'll need to fix the other meta tags the same way.

Related

Hidden characters appear out of nowhere

I have an HTML Code that keeps coming up with hidden characters. At first, it was the A characters in all the extra spaces which I removed. I tried the <meta http-equiv ="Content-Type " and content= "text /html; charset=UTF-8" /> That seemed to fix the issue.
However, now the code comes up with hidden ?????. I have rebuilt the code again but once it's put through our system it comes up with hidden ?????, how do I fix this? Or could this just be that our system is messing it up?
Please see the photos for reference. <meta http-equiv="Content-Type" and content="text/html; charset=UTF-8=" /> seemed to fix the A character issue

html-agility-pack avoid parsing nodes within TextArea

Html-agility-pack seems to build nodes from elements within TextArea, which are not real nodes.
For example:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
<title>Sample</title>
</head>
<body>
<TEXTAREA>Text in the <div>hello</div>area</TEXTAREA>
</body>
</html>
This will yield a child-node of "div" under the "textarea".
Browsers will treat everything as text.
Is there a way to compel html-agility-pack to behave the same way?
Clarification
I don't want the node to be created in the first place. If I run doc.DocumentNode.SelectNodes("//div") I want this to yield nothing. Right now I have to use doc.DocumentNode.SelectNodes("//div [not(ancestor::textarea]") but I have to do this for every select I perform to avoid phantom nodes.
Any ideas?
Use the InnerText property to get just the text of a node. This also gets the text of any child nodes (in this case the div).
var textArea = doc.DocumentNode.SelectSingleNode("//textarea");
string text = textArea.InnerText;
Issue has been fixed by the kind folks at zzzprojects.
Fix available and tested on version 1.8.2.
You can see the ticket here: Issue 183

How to Properly Define UTF-8 Charset in in <head> Tag Section of Web Document

If my doc type is <!DOCTYPE html> is it best or more correct to use
<meta charset="utf-8" />
or
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
to define utf-8?
Thanks.
The first one is only valid with HTML5.
The second one is also valid for older (X)HTML versions
With this doctype (indicating HTML5) both are valid, I prefer the first as it is shorter. :)

Importing HTML table into OO Calc as UTF8 without converting to entities

I have a problem when opening a HTML table in OpenOffice or LibreOffice if it contains UTF8 extended characters like ÅÄÖåäö.
When opening the table into M$ Excel it works as intended but I can't make OO do the same thing.
By converting all extended characters to its HTML entity eqivalent Å etc. it works but it would be nice to get the correct characters directly.
Is there anyone who knows what I should do?
The following content I have in a file called excelsample.xls and if I open that with OO Calc it will not look nice.
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="content-type" content="application/vnd.ms-excel" charset="UTF-8">
<meta charset="UTF-8">
</head>
<body>
<table>
<tr>
<td>Prawn sandwich</td><td>Räksmörgås</td>
</tr>
</table>
</body>
</html>
Your meta tag is malformed and OO doesn't probably recognize the html5 charset tag.
So fix it with:
<meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8">

HTML unit displaying wrong characters

I'm using HTMLUnit. I am accessing the pages however special (Maltese) characters are being displayed wrongly. For example, ġuvni is displayed as ?uvni
HtmlPage page = submit_button.click();
System.out.println(page.asText());
I suspect it's an encoding problem, though I don't find any page.setPageEndoding or some similar method... Has anyone had such a problem before?
Thanks!
Make sure your page is in UTF-8 by putting this meta tag in your <head>:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Resources