Fix HTML Errors
#### Description
Fix HTML Errors
https://validator.w3.org/
#### Operating System
Windows 10
#### Python Version
Python 3.5.2
#### PyCM Version (Use : `pycm.__version__`)
3.0
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c45caa4..2aeaf10 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
 ### Changed
 - Test system modified
 - `overall_statistics` function modified
+- HTML report modified
 - Document modified
 - References format updated
 - `CONTRIBUTING.md` updated
diff --git a/Otherfiles/notebook_check.py b/Otherfiles/notebook_check.py
index eb0dc82..8545f8a 100644
--- a/Otherfiles/notebook_check.py
+++ b/Otherfiles/notebook_check.py
@@ -19,13 +19,13 @@ NOTEBOOKS_LIST = [
 EXTENSION = ".ipynb"
 
 if __name__ == "__main__":
-    tprint("PYCM","bulbhead")
-    tprint("Document","bulbhead")
+    tprint("PYCM", "bulbhead")
+    tprint("Document", "bulbhead")
     print("Processing ...")
     for index, notebook in enumerate(NOTEBOOKS_LIST):
         ep = ExecutePreprocessor(timeout=6000, kernel_name='python3')
         path = os.path.join("Document", notebook)
-        with open(path + EXTENSION,"r",encoding="utf-8") as f:
+        with open(path + EXTENSION, "r", encoding="utf-8") as f:
             nb = nbformat.read(f, as_version=4)
             ep.preprocess(nb, {'metadata': {'path': 'Document/'}})
         with open(path + EXTENSION, 'w', encoding='utf-8') as f:
diff --git a/pycm/pycm_class_func.py b/pycm/pycm_class_func.py
index 20d12be..2c592ac 100644
--- a/pycm/pycm_class_func.py
+++ b/pycm/pycm_class_func.py
@@ -21,6 +21,7 @@ def sensitivity_index_calc(TPR, FPR):
     except TypeError:
         return "None"
 
+
 def NB_calc(TP, FP, POP, w):
     """
     Calculate NB (Net Benefit).
diff --git a/pycm/pycm_obj.py b/pycm/pycm_obj.py
index e76b586..d1972dc 100644
--- a/pycm/pycm_obj.py
+++ b/pycm/pycm_obj.py
@@ -498,7 +498,8 @@ class ConfusionMatrix():
         """
         sensitivity_index_dict = {}
         for i in self.classes:
-            sensitivity_index_dict[i] = sensitivity_index_calc(self.TPR[i], self.FPR[i])
+            sensitivity_index_dict[i] = sensitivity_index_calc(
+                self.TPR[i], self.FPR[i])
         return sensitivity_index_dict
 
     def IBA_alpha(self, alpha):
@@ -862,8 +863,7 @@ class ConfusionMatrix():
         :type class_name : any valid type
         :return: confusion matrix as a numpy.ndarray
         """
-        classes = self.classes
-        classes.sort()
+        classes = sorted(self.classes)
         table = self.table
         if normalized:
             table = self.normalized_table
diff --git a/pycm/pycm_output.py b/pycm/pycm_output.py
index 5bbfdf6..d04182e 100644
--- a/pycm/pycm_output.py
+++ b/pycm/pycm_output.py
@@ -15,15 +15,7 @@ def html_init(name):
     :type name : str
     :return: html_init as str
     """
-    result = ""
-    result += "<html>\n"
-    result += "<head>\n"
-    result += "<title>" + str(name) + "</title>\n"
-    result += "</head>\n"
-    result += "<body>\n"
-    result += '<h1 style="border-bottom:1px solid ' \
-              'black;text-align:center;">PyCM Report</h1>'
-    return result
+    return HTML_INIT_TEMPLATE.format(str(name), OG_DESCRIPTION, OG_IMAGE_URL)
 
 
 def html_dataset_type(is_binary, is_imbalanced):
@@ -43,7 +35,7 @@ def html_dataset_type(is_binary, is_imbalanced):
         balance_type = "Imbalanced"
     if not is_binary:
         class_type = "Multi-Class Classification"
-    result += "<ul>\n\n<li>{0}</li>\n\n<li>{1}</li>\n</ul>\n".format(
+    result += "<ul>\n<li>{0}</li>\n<li>{1}</li>\n</ul>\n".format(
         class_type, balance_type)
     result += "<p>{0}</p>\n".format(RECOMMEND_HTML_MESSAGE)
     result += "<p>{0}</p>\n".format(RECOMMEND_HTML_MESSAGE2)
@@ -113,14 +105,14 @@ def html_table(classes, table, rgb_color, normalize=False):
         result += "(Normalized)"
     result += ": </h2>\n"
     result += '<table>\n'
-    result += '<tr  align="center">' + "\n"
+    result += '<tr style="text-align:center;">' + "\n"
     result += '<td>Actual</td>\n'
     result += '<td>Predict\n'
     table_size = str((len(classes) + 1) * 7) + "em"
     result += '<table style="border:1px solid black;border-collapse: collapse;height:{0};width:{0};">\n'\
         .format(table_size)
     classes.sort()
-    result += '<tr align="center">\n<td></td>\n'
+    result += '<tr style="text-align:center;">\n<td></td>\n'
     part_2 = ""
     for i in classes:
         class_name = str(i)
@@ -129,7 +121,7 @@ def html_table(classes, table, rgb_color, normalize=False):
         result += '<td style="border:1px solid ' \
                   'black;padding:10px;height:7em;width:7em;">' + \
             class_name + '</td>\n'
-        part_2 += '<tr align="center">\n'
+        part_2 += '<tr style="text-align:center;">\n'
         part_2 += '<td style="border:1px solid ' \
                   'black;padding:10px;height:7em;width:7em;">' + \
             class_name + '</td>\n'
@@ -139,7 +131,7 @@ def html_table(classes, table, rgb_color, normalize=False):
             back_color = html_table_color(table[i], item, rgb_color)
             if min(back_color) < 128:
                 color = "white"
-            part_2 += '<td style="background-color:	rgb({0},{1},{2});color:{3};padding:10px;height:7em;width:7em;">'.format(
+            part_2 += '<td style="background-color:rgb({0},{1},{2});color:{3};padding:10px;height:7em;width:7em;">'.format(
                 str(back_color[0]), str(back_color[1]), str(back_color[2]), color) + str(item) + '</td>\n'
         part_2 += "</tr>\n"
     result += '</tr>\n'
@@ -185,7 +177,7 @@ def html_overall_stat(
         background_color = DEFAULT_BACKGROUND_COLOR
         if i in recommended_list:
             background_color = RECOMMEND_BACKGROUND_COLOR
-        result += '<tr align="center">\n'
+        result += '<tr style="text-align:center;">\n'
         result += '<td style="border:1px solid black;padding:4px;text-align:left;background-color:{};"><a href="'.format(
             background_color) + document_link + PARAMS_LINK[i] + '" style="text-decoration:None;">' + str(i) + '</a></td>\n'
         if i in BENCHMARK_LIST:
@@ -230,7 +222,7 @@ def html_class_stat(
     result = ""
     result += "<h2>Class Statistics : </h2>\n"
     result += '<table style="border:1px solid black;border-collapse: collapse;">\n'
-    result += '<tr align="center">\n<td>Class</td>\n'
+    result += '<tr style="text-align:center;">\n<td>Class</td>\n'
     for i in classes:
         result += '<td style="border:1px solid black;padding:4px;border-collapse: collapse;">' + \
             str(i) + '</td>\n'
@@ -247,7 +239,7 @@ def html_class_stat(
         background_color = DEFAULT_BACKGROUND_COLOR
         if i in recommended_list:
             background_color = RECOMMEND_BACKGROUND_COLOR
-        result += '<tr align="center" style="border:1px solid black;border-collapse: collapse;">\n'
+        result += '<tr style="text-align:center;border:1px solid black;border-collapse: collapse;">\n'
         result += '<td style="border:1px solid black;padding:4px;border-collapse: collapse;background-color:{};"><a href="'.format(
             background_color) + document_link + PARAMS_LINK[i] + '" style="text-decoration:None;">' + str(i) + '</a></td>\n'
         for j in classes:
@@ -276,12 +268,7 @@ def html_end(version):
     :type version:str
     :return: html_end as str
     """
-    result = "</body>\n"
-    result += '<p style="text-align:center;border-top:1px solid black;">Generated By ' \
-        '<a href="http://www.pycm.ir" ' \
-              'style="text-decoration:none;color:red;">PyCM</a> Version ' + version + '</p>\n'
-    result += "</html>"
-    return result
+    return HTML_END_TEMPLATE.format(version)
 
 
 def pycm_help():
diff --git a/pycm/pycm_param.py b/pycm/pycm_param.py
index 68760ce..6a57ac0 100644
--- a/pycm/pycm_param.py
+++ b/pycm/pycm_param.py
@@ -18,6 +18,34 @@ https://doi.org/10.21105/joss.00729
 
 '''
 
+OG_IMAGE_URL = "http://www.pycm.ir/images/logo-og.png"
+
+OG_DESCRIPTION = "PyCM is a multi-class confusion matrix library written in Python. http://www.pycm.ir"
+
+HTML_INIT_TEMPLATE = '''<!doctype html>
+<html lang="en">
+<head>
+<title>{0}</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<meta name="description" content="{1}">
+<meta name="og:title" content="PyCM Report (File Name : {0})">
+<meta name="og:description" content="{1}">
+<meta name="og:url" content="http://www.pycm.ir">
+<meta property="og:image" content="{2}">
+<meta name="twitter:image:src" content="{2}">
+<meta name="twitter:card" content="summary_large_image">
+<meta name="twitter:title" content="PyCM Report (File Name : {0})">
+<meta name="twitter:description" content="{1}">
+</head>
+<body>
+<h1 style="border-bottom:1px solid black;text-align:center;">PyCM Report</h1>
+'''
+
+HTML_END_TEMPLATE = '''<p style="text-align:center;border-top:1px solid black;">Generated By <a href="http://www.pycm.ir" style="text-decoration:none;color:red;">PyCM</a> Version {0}</p>
+</body>
+</html>
+'''
+
 
 MATRIX_CLASS_TYPE_ERROR = "Type of the input matrix classes is assumed  be the same"
 MATRIX_FORMAT_ERROR = "Input confusion matrix format error"
@@ -387,13 +415,13 @@ PARAMS_LINK = {
     "Scott PI": "Scott's-Pi",
     "Gwet AC1": "Gwet's-AC1",
     "Bennett S": "Bennett's-S",
-    "Kappa 95% CI": "Kappa-95%-CI",
+    "Kappa 95% CI": "Kappa-95%25-CI",
     "Kappa Standard Error": "Kappa-standard-error",
     "Chi-Squared": "Chi-squared",
     "Phi-Squared": "Phi-squared",
     "Cramer V": "Cramer's-V",
     "Chi-Squared DF": "Chi-squared-DF",
-    "95% CI": "95%-CI",
+    "95% CI": "95%25-CI",
     "Standard Error": "Standard-error",
     "Response Entropy": "Response-entropy",
     "Reference Entropy": "Reference-entropy",
@@ -708,66 +736,66 @@ TABLE_COLOR = {
 }
 
 NDTRI_P0 = [
-        -5.99633501014107895267E1,
-        9.80010754185999661536E1,
-        -5.66762857469070293439E1,
-        1.39312609387279679503E1,
-        -1.23916583867381258016E0,
-    ]
+    -5.99633501014107895267E1,
+    9.80010754185999661536E1,
+    -5.66762857469070293439E1,
+    1.39312609387279679503E1,
+    -1.23916583867381258016E0,
+]
 
 NDTRI_Q0 = [
-        1.95448858338141759834E0,
-        4.67627912898881538453E0,
-        8.63602421390890590575E1,
-        -2.25462687854119370527E2,
-        2.00260212380060660359E2,
-        -8.20372256168333339912E1,
-        1.59056225126211695515E1,
-        -1.18331621121330003142E0,
-    ]
+    1.95448858338141759834E0,
+    4.67627912898881538453E0,
+    8.63602421390890590575E1,
+    -2.25462687854119370527E2,
+    2.00260212380060660359E2,
+    -8.20372256168333339912E1,
+    1.59056225126211695515E1,
+    -1.18331621121330003142E0,
+]
 
 NDTRI_P1 = [
-        4.05544892305962419923E0,
-        3.15251094599893866154E1,
-        5.71628192246421288162E1,
-        4.40805073893200834700E1,
-        1.46849561928858024014E1,
-        2.18663306850790267539E0,
-        -1.40256079171354495875E-1,
-        -3.50424626827848203418E-2,
-        -8.57456785154685413611E-4,
-    ]
+    4.05544892305962419923E0,
+    3.15251094599893866154E1,
+    5.71628192246421288162E1,
+    4.40805073893200834700E1,
+    1.46849561928858024014E1,
+    2.18663306850790267539E0,
+    -1.40256079171354495875E-1,
+    -3.50424626827848203418E-2,
+    -8.57456785154685413611E-4,
+]
 
 NDTRI_Q1 = [
-        1.57799883256466749731E1,
-        4.53907635128879210584E1,
-        4.13172038254672030440E1,
-        1.50425385692907503408E1,
-        2.50464946208309415979E0,
-        -1.42182922854787788574E-1,
-        -3.80806407691578277194E-2,
-        -9.33259480895457427372E-4,
-    ]
+    1.57799883256466749731E1,
+    4.53907635128879210584E1,
+    4.13172038254672030440E1,
+    1.50425385692907503408E1,
+    2.50464946208309415979E0,
+    -1.42182922854787788574E-1,
+    -3.80806407691578277194E-2,
+    -9.33259480895457427372E-4,
+]
 
 NDTRI_P2 = [
-        3.23774891776946035970E0,
-        6.91522889068984211695E0,
-        3.93881025292474443415E0,
-        1.33303460815807542389E0,
-        2.01485389549179081538E-1,
-        1.23716634817820021358E-2,
-        3.01581553508235416007E-4,
-        2.65806974686737550832E-6,
-        6.23974539184983293730E-9,
-    ]
+    3.23774891776946035970E0,
+    6.91522889068984211695E0,
+    3.93881025292474443415E0,
+    1.33303460815807542389E0,
+    2.01485389549179081538E-1,
+    1.23716634817820021358E-2,
+    3.01581553508235416007E-4,
+    2.65806974686737550832E-6,
+    6.23974539184983293730E-9,
+]
 
 NDTRI_Q2 = [
-        6.02427039364742014255E0,
-        3.67983563856160859403E0,
-        1.37702099489081330271E0,
-        2.16236993594496635890E-1,
-        1.34204006088543189037E-2,
-        3.28014464682127739104E-4,
-        2.89247864745380683936E-6,
-        6.79019408009981274425E-9,
-    ]
+    6.02427039364742014255E0,
+    3.67983563856160859403E0,
+    1.37702099489081330271E0,
+    2.16236993594496635890E-1,
+    1.34204006088543189037E-2,
+    3.28014464682127739104E-4,
+    2.89247864745380683936E-6,
+    6.79019408009981274425E-9,
+]
diff --git a/pycm/pycm_util.py b/pycm/pycm_util.py
index e03f270..51ce227 100644
--- a/pycm/pycm_util.py
+++ b/pycm/pycm_util.py
@@ -539,6 +539,7 @@ def polevl(x, coefs, n):
         power -= 1
     return ans
 
+
 def p1evl(x, coefs, n):
     """
     Evaluate polynomial when coefficient of x^n is 1.
@@ -590,6 +591,7 @@ def ndtri(y):
         x = -x
     return x
 
+
 def inv_erf(z):
     """
     Inverse error function.
@@ -605,6 +607,7 @@ def inv_erf(z):
     result = ndtri((z + 1) / 2.0) / math.sqrt(2)
     return result
 
+
 def normal_quantile(p, mean=0, std=1):
     """
     Calculate normal distribution quantile.
@@ -618,6 +621,6 @@ def normal_quantile(p, mean=0, std=1):
     :return: normal distribution quantile as float
     """
     try:
-        return mean + std*math.sqrt(2)*inv_erf((2*p)-1)
+        return mean + std * math.sqrt(2) * inv_erf((2 * p) - 1)
     except Exception:
         return "None"
['pycm/pycm_obj.py', 'pycm/pycm_output.py', 'pycm/pycm_util.py', 'Otherfiles/notebook_check.py', 'pycm/pycm_param.py', 'pycm/pycm_class_func.py', 'CHANGELOG.md']