Register   Login   About   Study   Enterprise   Share
Internet / AI Technology University (ITU/AITU)
Fast Login - available after registration







|

Top Links: >> 80. Technology >> Internet Technology Summit Program >> 4. Web Apps Frameworks >> 4.2. HTML 5, CSS, Java Script, jQuery, Angular JS, and REACT
Current Topic: 4.2.1. HTML 5
You have a privilege to create a quiz (QnA) related to this subject and obtain creativity score...
4.2.1. HTML 5

All HTML documents must start with a type declaration:


While teaching a proper HTML structure, I have to disclose that current browsers can forgive omission of this line and much more… With HTML standards W3C recently introduced XHTML standards. XHTML is pretty strict. XHTML validator will not be as forgiving as the current browsers.
HTML tags are not case sensitive, but W3C recommends to use low case for the tags.
The HTML document begins with the tag html and ends with /html displaying the part of the HTML document between the tags body and /body.

Here is an example:




Heading 1


Paragraph 1



Heading 3


Paragraph 2



Heading 1


Paragraph 1


Heading 3


Paragraph 2



HTML heading 1, h1 is the biggest and the heading 6, h6 is the smallest.
HTML paragraphs are defined with the p tags.

How are HTML links and images defined?
HTML links are defined with the a tag and the address is specified in the href attribute
This is a link
Click on the link and then click the Browser BACK button

This is a link

HTML images are defined with the img tag with the attributes:
src - reference to the image source file
alt - alternative text, which is visible if image is not found, and also when mouse is over the image.
It is a good idea to provide the alt attribute. This attribute adds more meaning to the page and helps better indexing by semantic tools and search engines.
width - instructs the page how much horizontal space you would like to provide for the image
height - instructs the page how much vertical space you would like to provide for the image

Example:
alt="faceBehindTheGlass" width="100" height="80">
faceBehindTheGlass

Style in HTML
Every HTML element has a default style, for example background color is white and text color is black.

Using the style attribute we can change the default style. For example, we set background to green and we also set one of the headers to red color:


Background is green


This header is red.



Background is green


This header is red.




The HTML style attribute has the following syntax:
style="property:value"
The property and value must be known in Cascade Style Sheet (CSS) vocabulary. We will learn more about CSS later.
In the next sample we can combine several style attributes for the header: color, family and size. We also instruct the header to be placed in the center of the page.



Check the look and feel.


This header is red and centered.



Was it clear so far?

Check the look and feel.

This header is red and centered.


HTML style can be embedded directly into HTML elements as we can see from the samples above.
It makes more sense to include a block of the STYLE code in the beginning of an HTML page to reuse the same style attributes for multiple HTML elements.



HTML Style with CSS


Welcome to HTML study


This is an example of CSS


Changing style in HTML Header


HTML Headers reuse the style attributes



HTML Style with CSS


Welcome to HTML study


This is an example of CSS


Changing style in HTML Header


HTML Headers reuse the style attributes




In the sample above style a web page reused HTML Header style attributes. Each time reading another HTML header a browser associated the header with its style provided in the style block in the beginning of the page. This is the way to make a consistent look and feel on the web page.

To expand a consistent look and feel to all web pages across a web site, we usually collect all style attributes in a file, for example, main.css and provide a reference to this file in each web page.




HTML and CSS


…HTML content ….

Check a complete set of CSS properties here: http://www.w3schools.com/cssref/default.asp
Besides what we just learned together, you will find very interesting categories, such as animation, speech, user interface (navigation), media, and more. Enjoy!

Web pages can be projected to desktops and viewed on mobile devices. They must be Responsive to the size of devices. How do we make Responsive web pages?
The answer is coming in one of the next sections…

One of the most important function of HTML is delivering data to the server side. Data can be delivered as parameters in the URL or with the HTML form. From HTTP perspectives the first way with URL is the GET method and HTML forms represent the POST method.

Here is a sample of the URL with parameters:
Content
Content

We will take a closer look at HTML forms in the HTML Form section.
A complete list of HTML tags is available at: http://www.w3schools.com/tags/default.asp

Assignments:
1. In Eclipse in the project part4.2.html create the css folder and open a new file main.css.
2. In the main.css file provide style properties for headers 1, 2, 3, 4.
3. In the main.css file provide style properties links and tables.
4. In Eclipse, project part4.2.html – folder html open a new HTML file MyHtmlStyle.html.
5. In the head section provide a link-reference to the main.css file:



MyHtmlStyle


…HTML content ….


6. In the body section create headers, tables and links.
7. Provide the links to 5-6 sections in this tutorial.
8. Add content, create two more pages like that (each refers to the same CSS file) and connect all three pages with the links.
9. Email css and html files to dean@ituniversity.us

| Check Your Progress | Propose QnA | Have a question or comments for open discussion?
<!DOCTYPE html>

While teaching a proper HTML structure, I have to disclose that current browsers can forgive omission of this line and much more… With HTML standards W3C recently introduced XHTML standards. XHTML is pretty strict. XHTML validator will not be as forgiving as the current browsers.
HTML tags are not case sensitive, but W3C recommends to use low case for the tags.
The HTML document begins with the tag html and ends with /html displaying the part of the HTML document between the tags body and /body.

Here is an example:
<br/><!DOCTYPE html>
<br/><html>
<br/><body>
<br/><h1>Heading  1</h1>
<br/><p>Paragraph 1</p>
<br/><h3 style="font-size:12pt;background: #9999cc;color: #FFFFFF">
<br/>Heading  3</h3>
<br/><p>Paragraph 2</p>
<br/></body>
<br/></html>

Heading 1


Paragraph 1


Heading 3


Paragraph 2



HTML heading 1, h1 is the biggest and the heading 6, h6 is the smallest.
HTML paragraphs are defined with the p tags.

How are HTML links and images defined?
HTML links are defined with the a tag and the address is specified in the href attribute
<a href="http://ITofTheFuture.com/BASE/Lookup">This is a link</a>
Click on the link and then click the Browser BACK button

This is a link

HTML images are defined with the img tag with the attributes:
src - reference to the image source file
alt - alternative text, which is visible if image is not found, and also when mouse is over the image.
It is a good idea to provide the alt attribute. This attribute adds more meaning to the page and helps better indexing by semantic tools and search engines.
width - instructs the page how much horizontal space you would like to provide for the image
height - instructs the page how much vertical space you would like to provide for the image

Example:
<img src="/BASE/images/image.png" 
<br/>alt="faceBehindTheGlass" width="100" height="80">
faceBehindTheGlass

Style in HTML
Every HTML element has a default style, for example background color is white and text color is black.

Using the style attribute we can change the default style. For example, we set background to green and we also set one of the headers to red color:
<br/><body style="background-color:green">
<br/><h1>Background is green</h1>
<br/><h2 style="color:red">This header is red.</h2>
<br/></body>

Background is green


This header is red.




The HTML style attribute has the following syntax:
style="property:value"
The property and value must be known in Cascade Style Sheet (CSS) vocabulary. We will learn more about CSS later.
In the next sample we can combine several style attributes for the header: color, family and size. We also instruct the header to be placed in the center of the page.

<br/><body style="background-color:lightgrey">
<br/>Check the look and feel.
<br/><h2 style="color:red;font-family:verdana;font-size:10;text-align:center">
<br/>This header is red and centered.</h2>
<br/></body>
<br/>






Was it clear so far?


Check the look and feel.

This header is red and centered.


HTML style can be embedded directly into HTML elements as we can see from the samples above.
It makes more sense to include a block of the STYLE code in the beginning of an HTML page to reuse the same style attributes for multiple HTML elements.
<html><head><style>
<br/>h1{font-size: 20;color: #4396D8;letter-spacing: 1px}
<br/>h2{font-size: 14pt;color: #FFF}
<br/>h3{font-size:12pt; margin:0px;background: #9999cc;color: #FFFFFF}
<br/>h4{font-size:10pt; margin:0px;background: #9999cc;color: #FFFFFF}
<br/></style></head>
<br/><body style= "background:lightgrey">
<br/><h1>HTML Style with CSS</h1>
<br/><h2>Welcome to HTML study</h2>
<br/><h3>This is an example of CSS</h3>
<br/><h4>Changing style in HTML Header</h4>
<br/><h4>HTML Headers reuse the style attributes</h4>
<br/></body></html>
<br/>

HTML Style with CSS


Welcome to HTML study


This is an example of CSS


Changing style in HTML Header


HTML Headers reuse the style attributes




In the sample above style a web page reused HTML Header style attributes. Each time reading another HTML header a browser associated the header with its style provided in the style block in the beginning of the page. This is the way to make a consistent look and feel on the web page.

To expand a consistent look and feel to all web pages across a web site, we usually collect all style attributes in a file, for example, main.css and provide a reference to this file in each web page.

<html><head>
<br/><meta charset="utf-8">
<br/><title>HTML and CSS</title>
<br/><link rel="stylesheet" type="text/css" href="/css/its.css">
<br/></head>
<br/><body>…HTML content ….</body>

Check a complete set of CSS properties here: http://www.w3schools.com/cssref/default.asp
Besides what we just learned together, you will find very interesting categories, such as animation, speech, user interface (navigation), media, and more. Enjoy!

Web pages can be projected to desktops and viewed on mobile devices. They must be Responsive to the size of devices. How do we make Responsive web pages?
The answer is coming in one of the next sections…

One of the most important function of HTML is delivering data to the server side. Data can be delivered as parameters in the URL or with the HTML form. From HTTP perspectives the first way with URL is the GET method and HTML forms represent the POST method.

Here is a sample of the URL with parameters:
<a href=/BASE/Lookup?action=content>Content</a>
Content

We will take a closer look at HTML forms in the HTML Form section.
A complete list of HTML tags is available at: http://www.w3schools.com/tags/default.asp

Assignments:
1. In Eclipse in the project part4.2.html create the css folder and open a new file main.css.
2. In the main.css file provide style properties for headers 1, 2, 3, 4.
3. In the main.css file provide style properties links and tables.
4. In Eclipse, project part4.2.html – folder html open a new HTML file MyHtmlStyle.html.
5. In the head section provide a link-reference to the main.css file:
<html><head>
<br/><meta charset="utf-8">
<br/><title>MyHtmlStyle</title>
<br/><link rel="stylesheet" type="text/css" href="../css/main.css">
<br/></head>
<br/><body>…HTML content ….</body>


6. In the body section create headers, tables and links.
7. Provide the links to 5-6 sections in this tutorial.
8. Add content, create two more pages like that (each refers to the same CSS file) and connect all three pages with the links.
9. Email css and html files to dean@ituniversity.us


| Check Your Progress | Propose QnA | Have a question or comments for open discussion?

Have a suggestion? - shoot an email
Looking for something special? - Talk to me
Read: IT of the future: AI and Semantic Cloud Architecture | Fixing Education
Do you want to move from theory to practice and become a magician? Learn and work with us at Internet Technology University (ITU) - JavaSchool.com.

Technology that we offer and How this works: English | Spanish | Russian | French

Internet Technology University | JavaSchool.com | Copyrights © Since 1997 | All Rights Reserved
Patents: US10956676, US7032006, US7774751, US7966093, US8051026, US8863234
Including conversational semantic decision support systems (CSDS) and bringing us closer to The message from 2040
Privacy Policy