Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Javascript Selectors - Javascript Tutorial for Beginners With Examples
Play lesson

Web Development Tutorials For Beginners - Javascript Selectors - Javascript Tutorial for Beginners With Examples

Launch Your Web Development Journey: Master HTML, CSS, JavaScript, and GitHub with LearnCode.academy's Expert-Led Tutorials!

4.0 (2)
24 learners

What you'll learn

Create and style web pages using HTML and CSS fundamentals

Build responsive websites for optimal display on multiple devices

Implement interactive features using JavaScript and jQuery

Manage version control and collaboration with GitHub basics

This course includes

  • 5.3 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

In this Javascript tutorial for beginners, we're going to be using Javascript selectors to access the DOM (document object model) and interact with our webpage in realtime. Selectors allow us to search for elements in the web page, get those html elements, and do things with them. Selector methods are: document.getElementsByTagName('div') document.getElementsByClassName('done') document.getElementById('my-id') document.querySelector('#my-id') document.querySelectorAll('.classname') Once you have selected an html element, you can modify it: document.getElementById('my-id').innerHTML = "new html" document.getElementById('my-id').className = "newclass otherclass" Hopefully you liked this javascript tutorial for beginners with examples (hopefully you like every web development tutorial I crank out) As you can see, selectors are powerful in Javascript and even if you're a javascript beginner, you can make any and every change to your web page. -~-~~-~~~-~~-~- Also watch: "Responsive Design Tutorial - Tips for making web sites look great on any device" https://www.youtube.com/watch?v=fgOO9YUFlGI -~-~~-~~~-~~-~-

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere