Head office, Rana Pratap Bagh, Delhi011 2721 1512+91 97116 99511

Programming & Web Development

HTML and web design

Building web pages with HTML and giving them a layout and style.

Suits: Students from class 10 onwards

Duration, fees and batch timings are quoted by the head office or your centre.

Two students writing code together on a laptop and a desktop computer

The study book of this course

  • HTML and CSS
Lessons
7
Practice questions
35
Free ebooks
3

About the course

What the web design course is about

Every web page is built with HTML and styled with CSS. The course starts with the structure of an HTML5 document and works through text, lists, links, images, tables, forms and the semantic elements that name the parts of a page.

The CSS half covers selectors, colours and fonts, the box model, Flexbox and Grid, and responsive design, so a page works on a phone as well as a laptop.

What you will practise

Drawn from the lessons of the study books below.

  1. 01

    Write a valid HTML5 page with headings, paragraphs, lists, links and images

  2. 02

    Build tables and forms

  3. 03

    Use header, nav, main, article, section, aside and footer

  4. 04

    Style text and colour with CSS selectors

  5. 05

    Lay out a page with the box model, Flexbox and CSS Grid

  6. 06

    Make a page responsive, so it works on every screen size

What you will learn

7 lessons, 21 exercises

Every lesson of the study book that comes with this course in the student portal, with the key points of each lesson and exercises to try. Your centre gives you the syllabus, the duration and the fee.

Study book

HTML and CSS

Build web pages with HTML5 and style them with CSS3, from document structure, text, tables and forms to selectors, the box model, Flexbox, Grid and responsive design.

  • 7 lessons
  • About 23 min of reading
  • 35 practice questions
  • 25 key terms
  1. 1The structure of an HTML5 document4 min read · 5 key points · 3 exercises

    Key points

    • HTML is a markup language that labels the structure of content; it is not a programming language.
    • An element is usually an opening tag, content and a closing tag; attributes go in the opening tag as name="value".
    • Every page starts with <!DOCTYPE html> and has one html element containing a head and a body.
    • The head holds information about the page, such as charset, viewport and title; the body holds the visible content.
    • Void elements such as br, img, input and meta have no closing tag.

    Try this

    1. Open Notepad, type the HTML5 skeleton with the doctype, html (lang set to en), head and body elements, set the title to My First Page, save it as index.html in a new folder named website with All files as the save type and UTF-8 encoding, and open it in Chrome or Edge to check that the title shows on the browser tab.
    2. In the same page, add an h1 heading with your name, two paragraphs about your favourite subject, an hr line between them, a br line break inside one paragraph and a comment that marks where the second paragraph starts; reload the page and confirm that the comment is not displayed.
    3. Add a sentence containing the rupee sign ₹ and a few words in Hindi and check that they display correctly, then right-click any web page, choose View page source and write down five element names and two attributes you recognise.
  2. 2Headings, paragraphs, lists, links and images4 min read · 4 key points · 3 exercises

    Key points

    • Use one h1 for the page title and go down the heading levels in order, without skipping.
    • ul makes a bulleted list and ol a numbered list; every item is an li.
    • The a element creates links; href can be an absolute URL, a relative path, a #id on the same page, mailto: or tel:.
    • Every img needs alt text that describes it, or alt="" if it is purely decorative.

    Try this

    1. Build a page about your town with one h1, three h2 sections and an h3 under one of them, write a paragraph in each section, use strong for one important warning and em for one stressed word, and put a postal address on three lines using br.
    2. Add an unordered list of five things to carry to an exam, an ordered list of the steps to make tea with a nested list under one step, and change the ordered list to Roman numerals with its type attribute; then create contact.html and link the two pages to each other with relative links.
    3. Save a photo in an images folder, show it with an img element that has descriptive alt text, width and height, then misspell the file name to see the alt text appear in place of the image; also add a link that jumps to a section by its id, an email link using mailto: and a phone link using tel:.
  3. 3Tables and forms3 min read · 5 key points · 3 exercises

    Key points

    • Use tables only for tabular data: tr makes a row, th a header cell and td a data cell.
    • colspan joins cells across columns and rowspan joins cells down rows.
    • Link every input to a label by matching the label's for attribute to the input's id.
    • method="get" puts form data in the URL; method="post" sends it in the request body, which suits passwords.
    • Radio buttons with the same name allow one choice; checkboxes allow several.

    Try this

    1. Make a marksheet table for five students with a caption, a thead row of Roll No, Name, Hindi, English, Maths and Total headings, a tbody with their marks, and a tfoot row in which the words Class average span the first two columns using colspan.
    2. Create your weekly class timetable as a table with the periods down the first column and the days across the top, use rowspan to show a two-period practical as one tall cell and colspan to show the lunch break as one cell across all the days.
    3. Build an admission enquiry form with a label for every control: text inputs for name and email, a tel input for phone, a date input for date of birth, radio buttons for morning or evening batch inside a fieldset with a legend, checkboxes for three subjects, a select for the city, a textarea and a submit button; make the name required, try submitting it empty, then leave out the action attribute so that the form sends its data back to the same page, set method to get, submit it filled in and read the name=value pairs added to the address bar.
  4. 4Semantic HTML5 elements3 min read · 5 key points · 3 exercises

    Key points

    • Semantic elements describe what content is, which helps screen readers, search engines and other developers.
    • header, nav, main, article, section, aside and footer name the common parts of a page.
    • Use one visible main per page for the content unique to that page.
    • article is for self-contained content; section groups related content under a heading.
    • div and span carry no meaning and are used when no semantic element fits.

    Try this

    1. Write a page for an imaginary electronics shop using header, nav with three links, main, two article elements for two products, an aside with a buying tip and a footer with the address, without using a single div.
    2. Write a short page built only from div elements with classes such as menu, content, sidebar and bottom, then replace each div with the matching semantic element and check that there is exactly one main and that it is not inside header, footer, nav, article or aside.
    3. Give one article its own header with the product name and a footer with the date it was added, place a figure with an image and a figcaption inside it, add a section with its own h2 that groups both products, and write a comment beside each article, section and aside explaining why you chose that element.
  5. 5CSS basics: selectors, colours and fonts3 min read · 5 key points · 3 exercises

    Key points

    • A CSS rule is a selector followed by declarations of the form property: value;
    • Use an external stylesheet linked from the head for real websites.
    • Class selectors start with a dot and can be reused; ID selectors start with # and must be unique.
    • When rules conflict, !important wins, then higher specificity, then the rule written later.
    • Colours can be named, hex, rgb() or hsl(); font-family lists fallbacks ending in a generic family.

    Try this

    1. Create style.css, link it from the head of index.html with a link element, set the body font-family to "Noto Sans", Arial, sans-serif with a font-size of 1rem and a line-height of 1.6, then colour the h1 with a named colour, a hex code and an rgb() value in turn.
    2. Give two paragraphs the class price and one heading the id offer, style them with .price and #offer selectors, add a nav a rule and an a:hover rule that changes the link colour, and style h1 and h2 together with one grouped selector.
    3. Write two rules that give the same paragraph different colours, one using the element selector p and one using a class selector, predict which colour wins and check in the browser; then swap the order of the rules, and finally add !important to the element rule and note the result each time.
  6. 6The box model and Flexbox3 min read · 5 key points · 3 exercises

    Key points

    • Every element is a box of content, padding, border and margin.
    • With the default content-box, width covers only the content; border-box includes padding and border.
    • Margin and padding shorthand runs clockwise: top, right, bottom, left.
    • display: flex on a container lines up its children along one axis.
    • justify-content works on the main axis and align-items on the cross axis.

    Try this

    1. Style a .card with width 300px, padding 20px, a 5px solid border and margin 16px, check in the browser developer tools (F12) that it takes 350px of width, then add box-sizing: border-box and confirm that it becomes exactly 300px wide.
    2. Give four boxes margins written with one, two and four values and label each box with the values you used, centre a box that has a fixed width with margin: 0 auto, and place a paragraph with a 20px bottom margin above one with a 30px top margin to see that the gap is 30px, not 50px.
    3. Build a navigation bar with display: flex containing a logo, four links and a search box, use justify-content: space-between, align-items: center and gap: 12px, give the search box flex: 1, add flex-wrap: wrap and narrow the window to watch the items wrap onto a new line.
  7. 7CSS Grid and responsive design3 min read · 5 key points · 3 exercises

    Key points

    • Grid lays out rows and columns together; Flexbox handles one direction at a time.
    • repeat(3, 1fr) makes three equal columns; fr is a share of the free space.
    • grid-column: span 2 makes an item two columns wide.
    • Responsive pages need the viewport meta tag, flexible sizes and media queries.
    • Mobile-first means base styles for phones, then min-width media queries for larger screens.

    Try this

    1. Lay out six product cards with display: grid, grid-template-columns: repeat(3, 1fr) and a 16px gap, make the first card span two columns with grid-column: span 2, then change the columns to 2fr 1fr 1fr and see how the space is shared.
    2. Build a gallery of nine photos with grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)), add the rule img { max-width: 100%; height: auto; }, and drag the browser window from wide to narrow, counting how many columns fit at each width.
    3. Write a mobile-first product page that shows one column by default, two columns from a min-width of 600px and four from 1024px, check that the viewport meta tag is in the head, then open device emulation with F12 and Ctrl+Shift+M and test it at 390px for sideways scrolling, readable text and buttons large enough to tap.
Glossary: 25 key terms of HTML and CSS
Alt text
A short description of an image, written in the img element's alt attribute, that screen readers read aloud and browsers show if the image fails to load.
Attribute
Extra information written in an opening tag as name="value", such as the href of a link or the src of an image.
Box model
The way a browser draws every element as a rectangular box made of content, padding, border and margin, from the inside out.
Cascade
The rules CSS uses to decide which declaration wins when several set the same property on an element: importance first, then specificity, then the order the rules are written in.
Class selector
A CSS selector that starts with a dot, such as .price, and styles every element whose class attribute contains that name.
CSS
Cascading Style Sheets, the language that controls how HTML looks, including colours, fonts, spacing and layout.
CSS Grid
A CSS layout method, switched on with display: grid, that places items in rows and columns at the same time.
Doctype
The declaration on the first line of an HTML file that tells the browser the page is HTML5, so that it displays it in standards mode.
Element
One part of an HTML page, usually made of an opening tag, its content and a closing tag, such as a paragraph or a heading.
Flexbox
A CSS layout method, switched on with display: flex on a container, that lines up its direct children along one direction, as a row or a column, letting them wrap onto new lines when flex-wrap is set.
fr unit
A CSS Grid unit meaning one fraction of the free space, so 2fr 1fr makes the first column twice as wide as the second.
HTML
HyperText Markup Language, the markup language that labels the structure of a web page, such as its headings, paragraphs, links and images.
ID selector
A CSS selector that starts with #, such as #cart, and styles the one element whose id attribute has that name, which must be unique on the page.
Label
A form element tied to an input by matching its for attribute to the input's id, so that clicking it focuses the input and screen readers announce it.
Margin
The transparent space outside an element's border that pushes neighbouring elements away.
Media query
A block of CSS written with @media whose rules apply only when a condition is true, such as the browser window (the viewport) being at least 600px wide.
Mobile-first
A way of writing CSS in which the base styles suit phones and min-width media queries add layout for wider screens.
Padding
The space inside an element's box between its content and its border, which is filled by the element's background colour.
Pseudo-class
A selector part written after a colon that targets an element in a particular state, such as a:hover or input:focus.
Responsive design
Designing a page so that its layout adapts to every screen size, using the viewport meta tag, flexible sizes and media queries.
Selector
The part of a CSS rule that chooses which HTML elements the rule's declarations apply to.
Semantic element
An HTML element whose name describes the meaning of its content, such as header, nav, main, article or footer.
Specificity
The weight of a CSS selector, used to decide which of two conflicting declarations wins when neither is marked !important: an inline style beats an ID, an ID beats a class or pseudo-class, and a class beats an element selector.
Tag
A name written inside angle brackets that marks where an element starts or ends, such as the opening and closing tags of a paragraph.
Void element
An element such as br, img, input or meta that has no content and therefore no closing tag.

Practice and study material

Study books and timed practice tests in the student portal

Students sign in to read the study books lesson by lesson, print them, mark lessons as done and test themselves with timed practice tests, every answer explained.

  • 1study book
  • 7lessons
  • 35practice questions
  • 25glossary terms

How the practice tests work

  • Fresh questions each time

    Up to 20 questions are picked at random from the subject’s question bank.

  • One minute per question

    A timer counts down. When it reaches zero, your answers are sent automatically.

  • Move around freely

    Skip a question, flag it, and come back to change your answer before you submit.

  • Learn from every answer

    At the end you see the right answer and an explanation for each question.

  • Read, print and keep track

    Each study book has its lessons, key points, exercises and a glossary. Print a lesson, or mark it as done.

Try 3 practice questions

Real questions from this course’s question banks. Pick an answer to see the explanation.

  1. HTML and CSS · Question 1

    Which colour is #ffffff?

    Show the answer

    Answer: C. White

    Each pair of hex digits is red, green and blue; ff is the maximum, so all three at full strength give white.

  2. HTML and CSS · Question 2

    Which CSS rule stops large images from overflowing a narrow phone screen?

    Show the answer

    Answer: B. img { max-width: 100%; height: auto; }

    max-width: 100% keeps an image no wider than its container, and height: auto keeps its proportions.

  3. HTML and CSS · Question 3

    In an HTML table, which element creates a header cell?

    Show the answer

    Answer: A. <th>

    th is a header cell; td is a data cell, tr is a row and thead groups the header rows.

Free ebooks

3 free ebooks for this course

Branded PDF books to read on your phone or print: the study books of this course and more. Free for anyone, no sign-in needed.

Careers

Careers this course leads towards

The kind of work these skills are used for. Each guide explains what the job involves, the skills it asks for and how to get started.

  • Web developer

    Building and updating websites with HTML, CSS and JavaScript, and connecting them to data.

  • Graphic designer and DTP operator

    Laying out visiting cards, posters, pamphlets and banners, and preparing files that print correctly.

How admission works

From your first question to your certificate.

The usual steps, at the head office in Delhi or at an authorised member centre.

Who can join
Students above 12 years of age.
Where
The Delhi head office and authorised member centres.
Fees and timings
On WhatsApp at +91 97116 99511, or by phone on 011 2721 1512.
Start with a question
  1. 1

    Ask about the course

    Call or WhatsApp the head office, or visit your nearest member centre. Ask for the duration, the fee and the batch timings in writing.

  2. 2

    Fill the admission form

    Admission forms are supplied by the head office to every centre.

  3. 3

    Learn in class

    Attend your batch at the centre, with the course material and study notes, and sign in to the student portal for the study books and practice tests.

  4. 4

    Take the exam

    The institute prefers written exams, taken in front of a teacher.

  5. 5

    Receive your certificate

    Students who pass get a Gurukul Technicals Institute certificate and marksheet. Employers can verify it with the head office.

Questions

Questions about the web design course

Still have a question?

Chat on WhatsApp
Who can join the web design course?

Students above 12 years of age can take admission, at the Delhi head office or at an authorised member centre. The course suits students from class 10 onwards. Tell the head office or your centre what you already know, and they will suggest where to start.

How long is the course and what is the fee?

Duration, fees and batch timings depend on the course and the centre. Ask the head office or your nearest member centre, and get the details in writing before you pay.

Where are the classes?

At the head office in Delhi (A-10, Chief Commissioner Colony, opposite Rana Pratap Bagh) and at authorised member centres. Call or WhatsApp the head office to find the nearest centre.

What do I need to use the study books and practice tests?

A phone or a computer with an internet connection, and the login your centre gives you at enrolment. The student portal opens in an ordinary web browser, so there is nothing to install. Student login.

How do the practice tests work?

Sign in to the student portal and choose a subject. Each test picks up to 20 questions at random from that subject’s question bank and gives you one minute per question, with a timer that sends your answers automatically when it reaches zero. You can skip a question, flag it and come back before you submit, and at the end you see the right answer and an explanation for every question. This course has 35 practice questions across 1 subject, and you can take the tests as often as you like.

Is there an exam and a certificate?

Yes. The institute prefers written exams, taken in front of a teacher. Students who pass receive a Gurukul Technicals Institute certificate and marksheet.

How is a Gurukul Technicals Institute certificate verified?

On the verify certificate page, anyone can enter a certificate number and check it against the institute’s online register, which covers certificates issued through the portal. For older certificates, or if there is any doubt, send a copy to the head office by email or WhatsApp; the reply comes within 2 working days.

Are the ebooks on this page really free?

Yes. The 3 ebooks for this course are free PDF downloads for anyone, whether or not you join. The whole library has 100 free ebooks: browse them all.

Ready to start the web design course?

Ask the head office for the duration, the fee, the batch timings and your nearest member centre.

WhatsApp us