If you are the content provider, read HTML. If you are the graphic designer, read CSS. If you are a programmer and want to add dynamic effects to your web page, read JavaScript. But if you operate in OMO (one-man-operated) and are expected to create a reasonably good-looking website, you need to understand HTML, CSS and JavaScript. This is the reason that I combine both the HTML and CSS in this article as they are inseparable.
To create an OMO website, I suggest that:
- Understand HTML, CSS and JavaScript thoroughly.
- Pick an authoring tool: Use Dreamweaver if you can afford. Otherwise, find a free source-code editor (such as VS Code, Sublime Text, Sublime Text, NotePad++). For programmers, Eclipse/NetBeans/VSCode are good choice for HTML/CSS/JavaScript as they perform syntax checking and provide auto-code-complete.
- Design and organize your page. Decide on the look and feel of your website. How many columns? What are the major sections (e.g., header, navigation menu, main content, sidebar, table of content, footer)? Do you need a navigation menu or panel? What is your theme (colors, fonts)? And so on.
- Take a close look at your favorite websites!!! CSS is humongous and complex! You can't invent this wheel! Use F12 Debugger to inspect HTML/CSS of your favorite websites.
Use a CSS framework, such as BootStrap, to jump-start your design. - Start with an initial CSS design. Website design begins with CSS, NOT HTML?!. Work on your CSS:
- Partition your web page into logical section via
(or HTML5',,
,), such as header, content, footer. Assign an The h1 tags enclose a heading level 1
The p tags is used to markup a paragraph.
1 tothat is unique (e.g., "
The h1 tags enclose a heading level 1
The p tags is used to markup a paragraph.
2", "The h1 tags enclose a heading level 1
The p tags is used to markup a paragraph.
3". Assign a common classname to sections (non-unique) that share the same style (e.g., "The h1 tags enclose a heading level 1
The p tags is used to markup a paragraph.
4", "The h1 tags enclose a heading level 1
The p tags is used to markup a paragraph.
5"). Write the CSS id-selectors and class-selectors (e.g.,The h1 tags enclose a heading level 1
The p tags is used to markup a paragraph.
6The h1 tags enclose a heading level 1
The p tags is used to markup a paragraph.
7The h1 tags enclose a heading level 1
The p tags is used to markup a paragraph.
8) for common tags (such asThe h1 tags enclose a heading level 1
The p tags is used to markup a paragraph.
9,
//validator.w3.org/. - W3C Online CSS Validator @ //jigsaw.w3.org/css-validator/.
- Partition your web page into logical section via
- Specifications:
- HTML5 @ //www.w3.org/TR/html5/.
- CSS3 Selectors @ //www.w3.org/TR/css3-selectors/.
02 character encoding scheme, which is compatible with ASCII code for English alphabets and allow you to include other Unicode characters (such as Chinese, Japanese and Korean) efficiently. - The
See how the extra white spaces, tabs and line-breaks are ignored by the browser.
4 element (Line 5) provides a descriptive title to the page. The browser displays the title on the title-bar of the tab/window.
When saving your file, you need to choose "UTF-8 encoding" in the "save-as" dialog menu.
See how the extra white spaces, tabs and line-breaks are ignored by the browser.
7 section:- The
Lists and Hyperlinks
Lists and Hyperlinks
There are two types of lists in HTML:
- Ordered List.
- Unordered List.
This is a nested unordered list of links:
- Online Validator:
- W3C Online HTML Validator @ //validator.w3.org/.
- W3C Online CSS Validator @ //jigsaw.w3.org/css-validator/.
- Specifications:
- HTML5 @ //www.w3.org/TR/html5/.
- CSS3 Selectors @ //www.w3.org/TR/css3-selectors/.
Lists and Hyperlinks
There are two types of lists in HTML:
- Ordered List.
- Unordered List.
This is a nested unordered list of links:
- Online Validator:
- W3C Online HTML Validator @ //validator.w3.org/.
- W3C Online CSS Validator @ //jigsaw.w3.org/css-validator/.
- Specifications:
- HTML5 @ //www.w3.org/TR/html5/.
- CSS3 Selectors @ //www.w3.org/TR/css3-selectors/.
See how the extra white spaces, tabs and line-breaks are ignored by the browser.
4. Line 11 uses a Lists and HyperlinksLists and Hyperlinks
There are two types of lists in HTML:
- Ordered List.
- Unordered List.
This is a nested unordered list of links:
- Online Validator:
- W3C Online HTML Validator @ //validator.w3.org/.
- W3C Online CSS Validator @ //jigsaw.w3.org/css-validator/.
- Specifications:
- HTML5 @ //www.w3.org/TR/html5/.
- CSS3 Selectors @ //www.w3.org/TR/css3-selectors/.
- The
//validator.w3.org/. - W3C Online CSS Validator @ //jigsaw.w3.org/css-validator/.
- HTML5 @ //www.w3.org/TR/html5/.
- CSS3 Selectors @ //www.w3.org/TR/css3-selectors/.
Lists and Hyperlinks
There are two types of lists in HTML:
- Ordered List.
- Unordered List.
This is a nested unordered list of links:
- Online Validator:
- W3C Online HTML Validator @ //validator.w3.org/.
- W3C Online CSS Validator @ //jigsaw.w3.org/css-validator/.
- Specifications:
- HTML5 @ //www.w3.org/TR/html5/.
- CSS3 Selectors @ //www.w3.org/TR/css3-selectors/.
Lists and Hyperlinks
There are two types of lists in HTML:
- Ordered List.
- Unordered List.
This is a nested unordered list of links:
- Online Validator:
- W3C Online HTML Validator @ //validator.w3.org/.
- W3C Online CSS Validator @ //jigsaw.w3.org/css-validator/.
- Specifications:
- HTML5 @ //www.w3.org/TR/html5/.
- CSS3 Selectors @ //www.w3.org/TR/css3-selectors/.
Lists and Hyperlinks
There are two types of lists in HTML:
- Ordered List.
- Unordered List.
This is a nested unordered list of links:
- Online Validator:
- W3C Online HTML Validator @ //validator.w3.org/.
- W3C Online CSS Validator @ //jigsaw.w3.org/css-validator/.
- Specifications:
- HTML5 @ //www.w3.org/TR/html5/.
- CSS3 Selectors @ //www.w3.org/TR/css3-selectors/.
Lists and Hyperlinks
There are two types of lists in HTML:
- Ordered List.
- Unordered List.
This is a nested unordered list of links:
- Online Validator:
- W3C Online HTML Validator @ //validator.w3.org/.
- W3C Online CSS Validator @ //jigsaw.w3.org/css-validator/.
- Specifications:
- HTML5 @ //www.w3.org/TR/html5/.
- CSS3 Selectors @ //www.w3.org/TR/css3-selectors/.
See how the extra white spaces, tabs and line-breaks are ignored by the browser.
4 (HTML 5) requests for highlight.View Page Source
You can read the HTML source code by right-clicking on the page and select "View Source" (or "View Page Source", or "Show Page Source"). Try it out.
Note: For macOS's Safari, you may need to enable "Show Page Source" via "Preferences" ⇒ Advanced ⇒ "Show Develop menu in menu bar".
Don't Load the Cached Page (Ctrl-F5)!
Most browsers cache web pages (and the associated images, style sheets, JavaScripts) to boost the speed for web surfing. When you modify and reload a page (via the refresh key F5), the browser might retrieve the un-modified cache copy. To force the browser to reload the page (and all its associated resources) from the source, hit Ctrl-F5.
Most Frequently-Used HTML Elements
The most frequently-used HTML elements are:
- block elements:
(paragraph),
//validator.w3.org/. - W3C Online CSS Validator @ //jigsaw.w3.org/css-validator/.
- HTML5 @ //www.w3.org/TR/html5/.
- CSS3 Selectors @ //www.w3.org/TR/css3-selectors/.
- The (in Line 3) is an HTML comment. Comments are ignored by the browsers, but are important to provide explanations to the readers as well as the author.
- There are two types of lists in HTML: ordered list and unordered list. An ordered list is marked by
Lists and Hyperlinks
Lists and Hyperlinks
There are two types of lists in HTML:
- Ordered List.
- Unordered List.
This is a nested unordered list of links:
- Online Validator:
- W3C Online HTML Validator @ //validator.w3.org/.
- W3C Online CSS Validator @ //jigsaw.w3.org/css-validator/.
- Specifications:
- HTML5 @ //www.w3.org/TR/html5/.
- CSS3 Selectors @ //www.w3.org/TR/css3-selectors/.
Lists and Hyperlinks
There are two types of lists in HTML:
- Ordered List.
- Unordered List.
This is a nested unordered list of links:
- Online Validator:
- W3C Online HTML Validator @ //validator.w3.org/.
- W3C Online CSS Validator @ //jigsaw.w3.org/css-validator/.
- Specifications:
- HTML5 @ //www.w3.org/TR/html5/.
- CSS3 Selectors @ //www.w3.org/TR/css3-selectors/.
See how the extra white spaces, tabs and line-breaks are ignored by the browser.
4 .- You can nest a list inside another list, by placing the complete inner list definition inside a list item
See how the extra white spaces, tabs and line-breaks are ignored by the browser.
4 of the outer list.- Hyperlink is marked by
//validator.w3.org/. - W3C Online CSS Validator @ //jigsaw.w3.org/css-validator/.
- Specifications:
- HTML5 @ //www.w3.org/TR/html5/.
- CSS3 Selectors @ //www.w3.org/TR/css3-selectors/.
28 provides the destination URL of the link.
Example 3: Tables and Images
Table and ImagesTable and Images
1. | HTML5 | //validator.w3.org/.
Lists and HyperlinksThere are two types of lists in HTML:
This is a nested unordered list of links:
Lists and HyperlinksThere are two types of lists in HTML:
This is a nested unordered list of links:
Lists and HyperlinksThere are two types of lists in HTML:
This is a nested unordered list of links:
//validator.w3.org/.
Lists and HyperlinksThere are two types of lists in HTML:
This is a nested unordered list of links:
See how the extra white spaces, tabs and line-breaks are ignored by the browser. 6 section, I added some so-called style rules under the//validator.w3.org/.
, Lists and Hyperlinks Lists and HyperlinksThere are two types of lists in HTML:
This is a nested unordered list of links:
Attributes, in the form of Lists and Hyperlinks Lists and HyperlinksThere are two types of lists in HTML:
This is a nested unordered list of links:
Example 1: In, the attribute See how the extra white spaces, tabs and line-breaks are ignored by the browser. 5 specifies the natural language for this document.Example 2: In
Example 3: An
Lists and HyperlinksThere are two types of lists in HTML:
This is a nested unordered list of links:
Lists and HyperlinksThere are two types of lists in HTML:
This is a nested unordered list of links:
Lists and HyperlinksThere are two types of lists in HTML:
This is a nested unordered list of links:
Some of the attributes are mandatory (e.g., the " Lists and Hyperlinks Lists and HyperlinksThere are two types of lists in HTML:
This is a nested unordered list of links:
Lists and HyperlinksThere are two types of lists in HTML:
This is a nested unordered list of links:
//validator.w3.org/.
Lists and HyperlinksThere are two types of lists in HTML:
This is a nested unordered list of links:
//validator.w3.org/.
Lists and HyperlinksThere are two types of lists in HTML:
This is a nested unordered list of links:
Lists and HyperlinksThere are two types of lists in HTML:
This is a nested unordered list of links:
An HTML element consists of the opening and closing tags, and the content in between, e.g., Lists and Hyperlinks Lists and HyperlinksThere are two types of lists in HTML:
This is a nested unordered list of links:
Lists and HyperlinksThere are two types of lists in HTML:
This is a nested unordered list of links:
There are two types of elements:
//validator.w3.org/. //validator.w3.org/. Lists and HyperlinksThere are two types of lists in HTML: This is a nested unordered list of links: A valid HTML document exhibits a tree structure (called DOM or Document Object Model), with the element as the root element of the document tree, with two child elements: and . [TODO] Draw the DOM tree for one of the examples. Rendering HTML PagesBrowsers follow these rules when rendering HTML documents: //validator.w3.org/. Lists and HyperlinksThere are two types of lists in HTML: This is a nested unordered list of links: This is a paragraph. Another paragraph The Basic Document SkeletonThe Element and its Child Elements andAn HTML document has the following skeleton: Lists and HyperlinksLists and HyperlinksThere are two types of lists in HTML: This is a nested unordered list of links: The See how the extra white spaces, tabs and line-breaks are ignored by the browser. 4 container element defines the extent of an HTML document.There are two sections: See how the extra white spaces, tabs and line-breaks are ignored by the browser. 6 andSee how the extra white spaces, tabs and line-breaks are ignored by the browser. 7:See how the extra white spaces, tabs and line-breaks are ignored by the browser. 6 Section and the Lists and HyperlinksLists and HyperlinksThere are two types of lists in HTML: This is a nested unordered list of links: The Lists and Hyperlinks Lists and HyperlinksThere are two types of lists in HTML: This is a nested unordered list of links: Lists and HyperlinksThere are two types of lists in HTML: This is a nested unordered list of links: The is the same as: Lists and HyperlinksLists and HyperlinksThere are two types of lists in HTML: This is a nested unordered list of links: The " Lists and Hyperlinks Lists and HyperlinksThere are two types of lists in HTML: This is a nested unordered list of links: Table and Images
|