beginners-step-by-step-coding-course-learn-computer-programming-the-easy-way

Page 210

Exploring basic HTML HTML is the most basic building block of the Web. An HTML file contains all the text, images, and data that is displayed on the browser. It also includes a list of any other files, such as fonts, styles, and scripts that are required to render the HTML elements correctly. HTML tags An HTML tag is a keyword, or a set of characters, that defines the format of a web page and determines how its content is displayed on screen. The combination and order of the HTML tags determine the structure and design of the HTML document. A client browser uses the information in each tag to understand the nature of the tags’ content and how to display them correctly. The combination of a tag and its content is known as an element. Some tags, called parent tags, can contain other tags, called children tags. Most tags must have an opening and closing tag, like a

<body></b o The <body> dy> tag contains al l th data, and im e text, that are dis ages played when the document HTML is open in a browse ed r.

<p></p> This tag contains the text that should appear as a paragraph on screen. The browser starts a new line and adds margins for spacing around the paragraph.

set of brackets, but some tags do not require a closing tag and include a closing slash to indicate that they are single tags. Element

<div>

<span>content</span>

Indented child tag

</div>

Opening tag

</div> <div> > tag iv d The < er for all ain t n o c ments is a ML ele nd the HT be st yled a p. n u a o r c g t a a th ed as lays n io it s po g disp This ta ents on elem line. a ne w

<a></a> The <a> (anchor) tag describes a hyperlink, which is used to link one page to another. This tag contains the “href” attribute (see p.211), which holds the link’s destination.

<h1></h1> The <h1/h2/h3/h4/h 5/h6> tags indicate that the tex t is a header. <h1> is usually used for of the page, while the the title others are used to style smalle r headings on the document.

Parent tag

Content

Closing tag

<img/> is used to The <img/> tag on the page. e ag describe an im contains the url Its “src” at tribute location of e th to s int that po the image file.

l> <html></htm apply to tags that r te ou e ar e The Thes L document. the entire HTM cates the markup g indi first <html> ta for the document, language used tag marks the end ml> and the </ht web page. of the

<br/> The <br/> tag tells the browser to start a new line. It is a single tag, with the closing slash included before the closing greater-than sign.


Turn static files into dynamic content formats.

Create a flipbook

Articles inside

Other programming languages

5min
pages 344-347

PROJECT: Responsive website

52min
pages 304-343

ACKNOWLEDGMENTS

1min
page 360

INDEX

26min
pages 352-359

GLOSSARY

16min
pages 348-351

Graphic user interfaces

2min
pages 286-287

Libraries and frameworks

2min
pages 284-285

Object-oriented JavaScript

2min
pages 282-283

JavaScript debugging

3min
pages 280-281

Functions in JavaScript

2min
pages 278-279

Input and output

3min
pages 272-273

Loops in JavaScript

5min
pages 274-277

Logic and branching

2min
pages 270-271

Variables and data types

6min
pages 266-269

PROJECT: Styling the web

29min
pages 242-263

Code editors

4min
pages 208-209

Build a better website

4min
pages 214-215

Responsive layouts

2min
pages 240-241

HTML forms and hyperlinks

3min
pages 212-213

How the Web works

3min
pages 206-207

Exploring basic HTML

4min
pages 210-211

Pygame Zero

2min
pages 176-177

PROJECT: Budget manager

20min
pages 158-175

Logic operators and branching

3min
pages 104-105

Objects and classes

2min
pages 156-157

PROJECT: Team allocator

14min
pages 118-129

Libraries

3min
pages 116-117

What is Python?

3min
pages 94-95

Loops in Python

5min
pages 108-111

Installing Python

3min
pages 96-97

Using functions

3min
pages 50-51

Sending messages

3min
pages 48-49

Input

3min
pages 46-47

Logic and decisions

3min
pages 44-45

Managing program flow

4min
pages 40-41

Manipulating data

3min
pages 42-43

Output using movement

4min
pages 36-37

Output using looks and sounds

4min
pages 38-39

Coloured blocks and scripts

3min
pages 34-35

FOREWORD

2min
pages 10-11

What is programming?

3min
pages 16-17

Programming languages

6min
pages 22-27

What is Scratch?

2min
pages 28-29

About this book

3min
pages 12-15

Working as a software developer

2min
pages 20-21

Coding in the real world

1min
pages 18-19
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.