diff --git a/HTML5.md b/HTML5.md index 4e5a07f..67cc832 100644 --- a/HTML5.md +++ b/HTML5.md @@ -11,7 +11,7 @@ HTML5 is what makes up web pages, and since a Chrome application consists of web Let's look at XML syntax first. An XML document is a file, that contains structured information. The structure is defined by using the following characters that have special meaning in XML: -```XML +``` < > / " = & # ; ``` ###Elements diff --git a/course/html5/description.md b/course/html5/description.md new file mode 100644 index 0000000..e1c994c --- /dev/null +++ b/course/html5/description.md @@ -0,0 +1,58 @@ +--- +layout: page +title: HTML5 +--- +##What is it? +HTML5 is an abbreviation that stands for Hyper Text Markup Language version 5. + +It is an extension to XML; eXtensible Markup Language. + +##Why should I care? +HTML5 is what makes up web pages, and since a Chrome application consists of web pages, we need to know how to create HTML5 content. + +Let's look at XML syntax first. + +An XML document is a file, that contains structured information. The structure is defined by using the following characters that have special meaning in XML: + + < > / " = & # ; + +###Elements +The `<` and `>` characters are used to define *elements*. + +An element can either have content, or be empty. + +An empty element must start with `<` and end with `/>`. In between is the name of the element and maybe some *attributes*, we'll get back to those. + +```ruby +require 'redcarpet' +markdown = Redcarpet.new("Hello World!") +puts markdown.to_html +``` + + + +The word `html` is the name of the element. An element in XML can have any name. + +An element with content must first have a *start-tag* that starts with `<` and ends with `>`, then comes the content, which can be text, or other elements, and then at the end comes the *end-tag*, which starts with ``. + + + Some content + + +An element can have any number of *child-elements*, which can again have child-elements to any level of nexting you want. + + + My first web page + + +

Here is a paragraph

+ + + +It is customary to indent child-elements, but it is not neccessary. It just makes it more *pretty*, and easier to read. + +Something like this is perfectly legal XML syntax: + +

Here is a paragraph

+ +##Where can I find more information?