Free Essay

Science

In:

Submitted By pavan546
Words 1324
Pages 6
XHTML Tutorial
Author: Dwight VanTuyl Created: September 15, 2008

SGML Background
SGML
XML HTML
XHTML

Content vs. Presentation
• HTML (content)
– Historically was used for rendering content and presentation – Now, push is to use only for describing content – e.g. Header, paragraph, list, image, etc. – Still backwards compatible and can be used for presentation

• CSS (presentation)
– Introduced after the web started getting really ‘fancy.’ – Now, we use a separate CSS file for the presentation – e.g. Layout, color, font, position, size, etc.

W3C
• The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web (abbreviated WWW or W3). • Learn more about HTML and XHTML at: http://www.w3schools.com/ • Also Check Out:
HTML For the World Wide Web by Elizabeth Castro

Elements and Attributes Element Content

• Elements (aka tags): specify the type of content – how the content will be used in an XML document. XHTML defines its own set of valid element_names (e.g. head, body, h1). • Attributes: give special properties to each element. Again, XHTML defines its own set of valid attribute_names (e.g. class, style, id).

Important XHTML Rules
• Elements must be properly nested
– Wrong: blah blah – Right: blah blah

• Elements must always be closed
– Wrong: Hello. This is paragraph that isn’t closed. – Right: This is the right way.

• Element and Attribute names must be in lowercase
– Wrong:
– Right:

• Attribute values must be quoted
– Wrong:
– Right:

Mandatory XHTML Elements
• the DOCTYPE • the Head • the Body

DOCTYPE (example01.xhtml) Example Title

DOCTYPE

• Defines the type of document to render and references the DTD schema. • An XHTML DTD describes in precise, computer-readable language, the allowed syntax and grammar of XHTML markup.

(example01.xhtml) Example Title

Example Title

• The head element contains general information, also called meta-information, about a document. • XHTML requires the element specified in the element. • Other elements in the include references to css files and javascript files used in the page.

(example01.xhtml) Example Title

• The main XHTML element for all rendered elements and their content.

Validation
• Firefox Web Developer Toolbar • http://chrispederick.com/work/web-developer/

• Local Files (on your computer):
– Tools => Validate Local HTML

• Live Files (on the server):
– Tools => Validate HTML

Comments
• XHTML Comments begin with • At the top of the file should be a note from the creator, and then a log of every change made by the creator or any updater. • Example:

Comments (example02.xhtml) Example Title

Character Entities
• Special Characters, ones that have specific meaning in XHTML syntax, need to be represented differently. • space :   • < : < • > : > • & : & • “ : "

Character Entities (example03.xhtml)
<   >   &   "

Character Entities (example03.xhtml -- rendered)

Header Elements …
• Historically used for defining ‘header’ type presentation of content – not pretty. • Now used for semantically defining a header to web crawlers and other non-human readers in order to recognize the headers in a page. • Backwards compatible -- still defines a ‘header’ type presentation. • Block level element (not inline). Starts a new line after the element is closed.

Header Elements … (example04.xhtml)
Header 1 Header 2 Header 3 Header 4 Header 5 Header 6

Header Elements … (example04.xhtml -- rendered)

Horizontal Rule
• Render’s a horizontal line across the width of the containing element. • Empty – doesn’t contain any content so it is closed within the tag. • !!! Always close your tags !!!

Horizontal Rule (example05.xhtml)

Horizontal Rule (example05.xhtml -- rendered)

Paragraph
• Renders a block of text that wraps its content within the containing paragraph element. • XHTML automatically adds an extra blank line before and after a paragraph.

Paragraph (example06.xhtml)
...
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum posuere mi eget odio. Donec at libero sit amet nunc venenatis fringilla. Sed a magna. Phasellus nec eros. Nulla gravida imperdiet elit. Aliquam tempor, diam quis pharetra rutrum, purus ipsum porta lectus, eu sollicitudin turpis ante ut felis. Donec sollicitudin posuere augue. Proin dui quam, blandit non, sagittis tempus, feugiat sed, lacus. Duis in massa quis nibh iaculis dignissim. Nam non quam. Praesent viverra suscipit justo. Quisque mauris mi, adipiscing et, viverra vel, molestie sed, justo. Maecenas vel augue sit amet eros egestas tempor. Maecenas sed urna quis tortor molestie venenatis. Vestibulum id sapien. Integer tempus magna vel justo.

Paragraph (example06.xhtml -- rendered)

Line Break
• Even though you may have added line breaks within your content by using the [Enter] key, they will not render -- you must use the element. • Empty – doesn’t contain any content so it is closed within the tag. • Don’t go overboard!! Using more than one or two line breaks at a time is considered bad style. Use CSS for positioning elements on the page instead.

Line Break (example07.xhtml)
...
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum posuere mi eget odio. Donec at libero sit amet nunc venenatis fringilla. Sed a magna. Phasellus nec eros. Nulla gravida imperdiet elit. Aliquam tempor, diam quis pharetra rutrum, purus ipsum porta lectus, eu sollicitudin turpis ante ut felis. Donec sollicitudin posuere augue. Proin dui quam, blandit non, sagittis tempus, feugiat sed, lacus. Duis in massa quis nibh iaculis dignissim. Nam non quam. Praesent viverra suscipit justo. Quisque mauris mi, adipiscing et, viverra vel, molestie sed, justo. Maecenas vel augue sit amet eros egestas tempor. Maecenas sed urna quis tortor molestie venenatis. Vestibulum id sapien. Integer tempus magna vel justo.

Line Break (example07.xhtml -- rendered)

Lists &
• Used for rendering a bulleted list of items (bullet can be changed to any char or no char at all using CSS). • item elements are enclosed in tags. • Must NOT put any content inside elements unless inside of element. • elements can NOT be used alone without being nested inside tags.

Lists & (example08.xhtml) Item 1 Item 2 Item 3 Item 4 Item 5

Lists & (example08.xhtml -- rendered)

Anchor & Hyperlink
• Directs browser to an HTML page, an image, a sound file, a movie, etc. • Attributes:
– href: link destination to a URL, #id of an element, or image file name. – target=‘_blank’: use if opening in new window

• Inline element (not block)

Anchor & Hyperlink (example09.xhtml)
Link to Linguist List Open new window to Google Link to Header 1 on this page

Anchor & Hyperlink (example09.xhtml -- rendered)

Image
• Renders an image from the defined source attribute. • Empty – doesn’t contain any content so it is closed within the tag. • Block level element. • Attributes:
– src: source location of the image file. – alt: alternative text for the image if it doesn’t display.

Image (example10.xhtml)

Image (example10.xhtml -- rendered)

Tables
• DON’T USE TABLES – unless absolutely necessary. • Why? Its better to separate content (HTML) from presentation (CSS).
– Easier to maintain – Easier to modify – Cleaner code

• Most everything tables are used for can and should be done with CSS. • Why learn tables? Because linguistlist.org, like much of the web, was built long before CSS came around. Tables were used to provide layout to a page. So we need to understand tables in order to maintain old pages. Even now, people still use tables who don’t understand CSS. • Don’t create tables! Learn CSS instead!

Tables cont.
• : encloses the whole table • : defines a table row • : defines a column in a table row. This is where your content belongs. • !!! Don’t put content in anything but the !!!

Tables cont.
• Table Structure: row1 col1 row1 col2 row2 col1 row2 col2

row1 col1

row1 col2

row2 col1

row2 col2

Tables (example11.xhtml –rendered)

CSS Preview
• Adding tables in order to layout content makes html unwieldy and difficult to understand. • Better solution is to NOT use tables and position all elements with a separate CSS file. • CSS is used for the “presentation” part of a web page – e.g. color, size, position, layout, font, etc.

CSS Preview cont.
• CSS properties can be attached to most elements with two important attributes:
– id: the specific identity of an element – like social security number – class: a grouping name to add a style to many elements.

• We’ll also learn two new elements that help CSS out but do not render anything on their own:
– div – span

Similar Documents

Premium Essay

The Importance Of Science In Science

...Our project specifically focused on the DNA sequence analysis of the genes in duckweed and how those genes fit into bioremediation. As an intimidated and shy freshman with a strong yearning to be part of the science community at my school, decided to join the intensive program with barely any knowledge about biology. It didn't seem like a smart move at the time, but I'm glad that I had persistence because I learned so much about the field through the guidance from the team. Exploring PCR and Restriction Digests, my group and I were able to publish new proteins on the national GenBank. I learned more about biology and how to work/perform in a team. This motivated me to join the Science/Biology Olympiads where we do independent research and come together as a team to compete. I found that these opportunities along with the research in my science classes not only help me learn actual science but provide me with valuable life skills that will help in the...

Words: 918 - Pages: 4

Premium Essay

Science

...Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science Science science science science science...

Words: 460 - Pages: 2

Premium Essay

Science

...The word 'science' is derived from the Latin word 'scientia' which means knowledge. Therefore, science is about gaining knowledge either through observing, studying, experience, or practice. Entire knowledge acquired through science is about discovering truths, finding facts, uncovering phenomenon hidden by the nature. Observations and experimentation, in science, support in describing truth and realities through systematic processes and procedures. For me, science is an intellectual set of activities designed to uncover information about anything related to this world in which we live. The information gathered is organized through scientific methods to form eloquent patterns. In my opinion the primary objective of science is to gather information and to distinguish the order found between facts. What Science Means to Me as an Upcoming Scientist Science exposes several ideas along with significant themes so that I could test them independently and without any bias to arrive at solid conclusion. For this purpose exchange of data and materials is necessary. I am able to generate real and tangible facts supported by reliable evidence. Work of scientist is based on theoretical science. It means, in theoretical science, there is only a sign, just a hint on which discoveries could be made, facts could be found. While studying science I am always working for determining truth, based on my perceptions, judgment, observation, experience, and knowledge collected through several means...

Words: 1529 - Pages: 7

Premium Essay

Science

...Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science Science...

Words: 462 - Pages: 2

Free Essay

Science

...Science is the concerted human effort to understand, or to understand better, the history of the natural world and how the natural world works, with observable physical evidence as the basis of that understanding1. It is done through observation of natural phenomena, and/or through experimentation that tries to simulate natural processes under controlled conditions. (There are, of course, more definitions of science.) Consider some examples. An ecologist observing the territorial behaviors of bluebirds and a geologist examining the distribution of fossils in an outcrop are both scientists making observations in order to find patterns in natural phenomena. They just do it outdoors and thus entertain the general public with their behavior. An astrophysicist photographing distant galaxies and a climatologist sifting data from weather balloons similarly are also scientists making observations, but in more discrete settings. The examples above are observational science, but there is also experimental science. A chemist observing the rates of one chemical reaction at a variety of temperatures and a nuclear physicist recording the results of bombardment of a particular kind of matter with neutrons are both scientists performing experiments to see what consistent patterns emerge. A biologist observing the reaction of a particular tissue to various stimulants is likewise experimenting to find patterns of behavior. These folks usually do their work in labs and wear impressive...

Words: 306 - Pages: 2

Premium Essay

Science

...Chapter 132 - Science and Technology Section SCIENCE AND TECHNOLOGY Science and technology provide people with the knowledge and tools to understand and address many of the challenges. Students must be provided with opportunities to access, understand, and evaluate current information and tools related to science and technology if they are to be ready to live in a 21st century global society. The study of science and technology includes both processes and bodies of knowledge. Scientific processes are the ways scientists investigate and communicate about the natural world. The scientific body of knowledge includes concepts, principles, facts, laws, and theories about the way the world around us works. Technology includes the technological design process and the body of knowledge related to the study of tools and the effect of technology on society. Science and technology merge in the pursuit of knowledge and solutions to problems that require the application of scientific understanding and product design. Solving technological problems demands scientific knowledge while modern technologies make it possible to discover new scientific knowledge. In a world shaped by science and technology, it is important for students to learn how science and technology connect with the demands of society and the knowledge of all content areas. It is equally important that students are provided with learning experiences that integrate tools, knowledge, and processes of science and technology...

Words: 8232 - Pages: 33

Free Essay

Science

...1. Describe how fishing has changed at Apo Island, and the direct and indirect effects on people’s lives. Apo Island’s marine preserve allows fishing with hand-held lines, bamboo traps, large mesh nets, spear fishing without SCUBA gear, and hand netting. Fishing with dynamite, cyanide, trawling, and Muro-ami are forbidden. This has increased fish populations and made it easier to catch the fish needed to support a family. The healthy reef community now attracts ecotourists and provides jobs for islanders. 2. What are some basic assumptions of science? 3. Distinguish between a hypothesis and a theory. A hypothesis is the second step from the scientific method that forms an educated guess based off an observation. A theory is the information that was gathered to support the proof of an observation and confirms the hypothesis. 4. Describe the steps in the scientific method. 7. What’s the first step in critical thinking? The first step in critical thinking is 8. Distinguish between utilitarian conservation and biocentric preservation. Name two environmental leaders associated with each of these philosophies. Biocentric preservation emphasizes the fundamental right of living organisms to exist and to pursue their own good. While utilitarian conservation emphasized that resources should be used for the greater good for the greatest number for the longest time. Two environmental leaders associated with the biocentric preservation philosophy are John Muir...

Words: 294 - Pages: 2

Free Essay

Science

...Blueprint to address Australia’s lack of science strategy unveiled Chief scientist makes series of recommendations to improve the country’s skills in science, technology, engineering and maths Australia’s chief scientist, Ian Chubb, has unveiled a blueprint to address Australia’s lack of a science strategy, with proposals aimed at improving skills, supporting research and linking scientific work to other countries. Chubb has made a series of recommendations to the federal government to increase focus on science, technology, engineering and maths skills. The strategy is partially aimed at addressing the declining number of students taking advanced maths in year 11 and 12, as well as the shortage of qualified maths and science teachers. Chubb said each primary school should have at least one specialist maths and science teacher, a policy currently used in South Australia and Victoria. This would be encouraged by improving incentives, including pay, for teachers. Other recommendations include supporting research potential, improving research collaboration with other countries and doing more to stress the importance of science to businesses and students. Chubb said: “We are the only OECD country without a science or technology strategy. Other countries have realised that such an approach is essential to remaining competitive in a world reliant on science and science-trained people. “Science is infrastructure and it is critical to our future. We must align our scientific effort...

Words: 510 - Pages: 3

Premium Essay

Science

...Science: A Blessing Or A Curse Everything in the universe has its uses and abuses. The same applies to science. Science has revolutionized human existence and has made it happier and more comfortable. Modern science has many wonders. Electricity is one of its greatest wonders. It is a source of energy. It can run any type of machinery. With the help of electricity, we can light our rooms, run buses and trains and machinery, lift water for irrigation and can accomplish a multitude of other tasks. Much of the progress that mankind has made in different fields right from the stone age to the modern age is due to the progress made in the filed of science. Not only material progress but also the mental outlook of man has been influenced by it. Agriculture, business, transport, communication and medicine to name a few are all highly indebted to the wonders of science. We have become scientifically much more advanced than our ancestors. This is because the world has undergone a tremendous change because of the rapid strides made by science and technology. The discovery and development of a large number of powerful energy sources – coal, petroleum, natural gas, electricity etc. – have enabled humanity to conquer the barriers of nature. All these have facilitated the growth of fast modes of transport and communication, which have metamorphosed the world into a global village. Science has given man the means of travelling to the moon. Science is a great help in the agricultural field...

Words: 2098 - Pages: 9

Premium Essay

Science

...Blessing of Science Blessings of science are numerous. Science has completely changed the living style of man. Now man is living in a totally 18 century. From home to office, from farm to factory, form village to town, in short everywhere in life now we can see the unlimited blessing of science. At home, we find that science has provided many comforts to the human beings. Whether it is kitchen, lounge, shaker, chopper, toaster and many other appliance have brought a revolution in the working of a kitchen and a housewife. Although it is a fact that science can not fight with fate and it often fails to defeat nature yet it has done a lot to minimize the disastrous effects of nature. Scientists have invented such machines like air conditioner and heater that can give comfort to the man in hot summers and in extreme winters respectively. Now there are such instruments, which can warn man against floods, earthquakes and windstorm. After getting such warnings human beings are able to take preventive measures. Travelling and transportation were very difficult and paining in the past but now the miracles of science have made the travelling a luxury. Now there are variety of means of transportation like buses, cars, trains and aero-planes that have decreased the distances and have made the journey a comfort. Now hundreds of people can travel from own country to the other country in one train or in one aero-plane. The distance that could be covered by the people in the months...

Words: 1787 - Pages: 8

Premium Essay

Science

...Advantage Science gives us safe food, free from harmful bacteria, in clean containers or hygienic tins. It also teaches us to eat properly, indicating a diet balanced in protein and carbohydrate and containing vitamins. The results is freedom from disease and prolonged life. In pre-scientific days, food was monotonous and sometimes dangerous; today it is safe and varied. It is varied because through improved sea, land and air transport food can now be freely imported and exported. Science has also improved clothing and made it more appropriate for climatic and working conditions. Man-made fibers and versatile spinning machines, today enable us to dress in clothes both comfortable and smart without being expensive. Home, school and office all bear witness to the progress and application of science. Nowadays, most homes possess electric lighting and cooking, but many also have washing machines, vacuum cleaners and kitchen appliances, all designed to increase comfort and cleanliness and reduce drudgery. Science produces the fan which cools the air, the machinery which makes the furniture and fabrics, and hundred and one other features for good living. The books and papers are at school, and again everything from the piece of chalk to the closed-circuit television of instruction are the direct or indirect results of scientific progress. Learning is therefore easier. And clerical work is made far more speedy and efficient by the office typewriter, quite apart from the hundreds of...

Words: 572 - Pages: 3

Free Essay

Science

...One of the major shortcomings of science supposedly is a lack of communication between scientists and the general public. Many argue that too often, science is only presented in written academic journals that are not so easily obtained by the general public. This is discussed on a daily basis and was argued in the aftermath of the 2011 earthquake and tsunami in Japan, as well as in on-going debate about other scientific theories and ideas. However, people fail to realize a few things. One of the major things is that, in terms of an earthquake or tsunami, you simply cannot predict anything like that. You cannot blame scientists for not being able to predict an earthquake like a meteorologist can predict weather events. Scientists can study things like seismic activity and they can make assumptions as to what may happen should an earthquake of a high magnitude hit and cause something catastrophic like a tsunami. Yet, some fail to realize that some safety measures were taken, and even inspectors that visited the Fukushima Nuclear power plant asked Japanese authorities to increase safety measures further. According to a France24 news article written three months after the catastrophe, “A three-page summary was issued at the end of the 18-member team’s May 24-June 2 inspector mission to Japan. It said the country underestimated the threat from tsunamis to the Fukushima plant and urged sweeping changes to its regulatory system. Japanese authorities have been criticised for...

Words: 769 - Pages: 4

Free Essay

Science

...SCIENCE My second month in Gusa Regional Science High School! Do you want to know what are the activities and what have I learn this month? As we all know this month is “Nutrition Month,” so I am excited what are the activities that would be held in celebrating the nutrition month. Come! and let us know what happened this July. On the first day of July we answer our wortext. We answer page 17, 1-5 in ½ lengthwise. The next day we had a contest about the scientist. We were gouped into two groups, group a and group b. Group a scored 27 while group b scored 31. Group b win with the score of 31, while group a lose with the score of 27. Group a’s punishment is they have to dance. The boys did it but the girls pleaded that they will just sing rather than dance. Teacher Cass agreed, and in the middle of singing “Nasayo Na Ang Lahat,”Teacher Cass gestured to the boys to join the girls singing. The boys didn’t insist in joining the girls. On Thursday, the rain was falling hard so teacher Cass is the one who come to us. We were trapped in Teacher Lory’s classroom. We had another game same us what we did yesterday. This time its boys vs girls. The girls won the game and as expected boys got a punishment. Their punishment was they did a fashion show. Some...

Words: 372 - Pages: 2

Premium Essay

Science

...In this essay I will focus on the events surrounding the regulation of Alar (diaminozide) up to and including 1985, as a case-study of knowledge and decision-making amidst uncertainty (418-19). I pick this time period in particular, because it is when the NRDC and other public interest groups began their campaign in protest against the EPA's decision to not ban Alar. My analysis of the events surrounding Alar will take shape around a critique of Michael Fumento's article "Environmental Hysteria: The Alar Scare," in which he paints the NRDC as "fanatics" launching a "smear campaign" not founded in any rational decision-making. This is an important argument to counter, because it has not only been taken up by many to condemn citizen-group action in the case of Alar, but to criticize their activities in many other regulatory processes. The chief framework used to devalue public action in these cases is the technocratic model, wherein it is believed that decisions can be best made by objective, rational experts acting based upon scientific knowledge. In this case, we can see a perfect example of when a decision was decided by scientific experts, in accordance with the technocratic model. Fumento and other supporters of the technocratic mode privilege the scientific knowledge of bodies such as the Scientific Advisory Panel in this case over other forms of knowledge. He denounces NRDC as fanatics based on his claim that they acted in spite of, and in contradiction to scientific...

Words: 2159 - Pages: 9

Premium Essay

Science

...Scientific papers are for sharing your own original research work with other scientists or for reviewing the research conducted by others. As such, they are critical to the evolution of modern science, in which the work of one scientist builds upon that of others. To reach their goal, papers must aim to inform, not impress. They must be highly readable — that is, clear, accurate, and concise. They are more likely to be cited by other scientists if they are helpful rather than cryptic or self-centered. Scientific papers typically have two audiences: first, the referees, who help the journal editor decide whether a paper is suitable for publication; and second, the journal readers themselves, who may be more or less knowledgeable about the topic addressed in the paper. To be accepted by referees and cited by readers, papers must do more than simply present a chronological account of the research work. Rather, they must convince their audience that the research presented is important, valid, and relevant to other scientists in the same field. To this end, they must emphasize both the motivation for the work and the outcome of it, and they must include just enough evidence to establish the validity of this outcome. Papers that report experimental work are often structured chronologically in five sections: first, Introduction; then Materials and Methods, Results, and Discussion (together, these three sections make up the paper's body); and finally, Conclusion. The Introduction...

Words: 373 - Pages: 2