CS 142 _ W1_1_HTML
This document is singly a lecture notes for CS 142 and act as a review for basic markdown syntax.
Markup Language:
Include directives with content. Is an example of declarative language
.
The Major purpose for using markup language can be disected into many aspects, but one use can be to focus on the content of the text per se, instead of its formation.
Two examples of markup langages: Markdown, HTML
HTML(HyperText Markup Language)
As noted above, HTML is a type of markup language.
Approach for writing HTML:
- start with contents to be displayed
- annotate it with tags
HTML Tags:
HTML tags provide:
- Meaning of text:
<h1>
means top-level heading<p>
means paragraph<ul> <li>
for unordered(bulleted) list
- Formatting information(properties of the contents)
- Additional information to display(e.g.
<img>
)
Tags nestation are supported
XHTML(XML-Based HTML)
Difference:
- XHTML is more strict about adhering to proper syntax
- do not ignore unknown tags
- do not carry on with syntax errors
- do not guess the character missing
Basic Syntax of XHTML:
Document: hierarchical collection of elements, starting with <html>
- Elements: start tag, contents, end tag
- start tags can contain attributes
A test html site.
<–The document would be renewed in 2023/2/26 UTC-5–>